<p>Your code runs without error on my laptop (macOS 13.2.1; R v4.2.2; Rstudio 2022.07.2), so I have some further questions that might help with troubleshooting (too many to include in a comment):</p>
<ul>
<li>Does the <a href="https://github.com/roblanf/sangeranalyseR#quick-start-guide" rel="nofollow noreferrer">example from the docs</a> run without errors/warnings on your system?</li>
<li>Did you install the sangeranalyseR package via Bioconductor (per the <a href="https://github.com/roblanf/sangeranalyseR#quick-start-guide" rel="nofollow noreferrer">docs</a>)?</li>
<li>Do you have the most up-to-date Bioconducter installed?</li>
<li>Have you tried running the example code in a 'fresh' session?</li>
<li>Are you able to please run the command <code>sessionInfo()</code> and edit your question to include the output?</li>
<li>If you run your example via the <a href="https://reprex.tidyverse.org/" rel="nofollow noreferrer">reprex package</a>, are there any differences between your output and my output?</li>
</ul>
<p>The code from your question run on my laptop:</p>
<pre class="lang-r prettyprint-override"><code># BiocManager::install(&quot;sangeranalyseR&quot;)
library(sangeranalyseR)
#&gt; Loading required package: stringr
#&gt; Loading required package: ape
#&gt; Loading required package: Biostrings
#&gt; Loading required package: BiocGenerics
#&gt; 
#&gt; Attaching package: 'BiocGenerics'
#&gt; The following objects are masked from 'package:stats':
#&gt; 
#&gt;     IQR, mad, sd, var, xtabs
#&gt; The following objects are masked from 'package:base':
#&gt; 
#&gt;     anyDuplicated, aperm, append, as.data.frame, basename, cbind,
#&gt;     colnames, dirname, do.call, duplicated, eval, evalq, Filter, Find,
#&gt;     get, grep, grepl, intersect, is.unsorted, lapply, Map, mapply,
#&gt;     match, mget, order, paste, pmax, pmax.int, pmin, pmin.int,
#&gt;     Position, rank, rbind, Reduce, rownames, sapply, setdiff, sort,
#&gt;     table, tapply, union, unique, unsplit, which.max, which.min
#&gt; Loading required package: S4Vectors
#&gt; Loading required package: stats4
#&gt; 
#&gt; Attaching package: 'S4Vectors'
#&gt; The following objects are masked from 'package:base':
#&gt; 
#&gt;     expand.grid, I, unname
#&gt; Loading required package: IRanges
#&gt; Loading required package: XVector
#&gt; Loading required package: GenomeInfoDb
#&gt; 
#&gt; Attaching package: 'Biostrings'
#&gt; The following object is masked from 'package:ape':
#&gt; 
#&gt;     complement
#&gt; The following object is masked from 'package:base':
#&gt; 
#&gt;     strsplit
#&gt; Loading required package: DECIPHER
#&gt; Loading required package: RSQLite
#&gt; Loading required package: parallel
#&gt; Loading required package: reshape2
#&gt; Loading required package: phangorn
#&gt; Loading required package: sangerseqR
#&gt; Loading required package: gridExtra
#&gt; 
#&gt; Attaching package: 'gridExtra'
#&gt; The following object is masked from 'package:BiocGenerics':
#&gt; 
#&gt;     combine
#&gt; Loading required package: shiny
#&gt; Loading required package: shinydashboard
#&gt; 
#&gt; Attaching package: 'shinydashboard'
#&gt; The following object is masked from 'package:graphics':
#&gt; 
#&gt;     box
#&gt; Loading required package: shinyjs
#&gt; 
#&gt; Attaching package: 'shinyjs'
#&gt; The following object is masked from 'package:shiny':
#&gt; 
#&gt;     runExample
#&gt; The following object is masked from 'package:RSQLite':
#&gt; 
#&gt;     show
#&gt; The following object is masked from 'package:Biostrings':
#&gt; 
#&gt;     show
#&gt; The following object is masked from 'package:GenomeInfoDb':
#&gt; 
#&gt;     show
#&gt; The following object is masked from 'package:XVector':
#&gt; 
#&gt;     show
#&gt; The following object is masked from 'package:IRanges':
#&gt; 
#&gt;     show
#&gt; The following object is masked from 'package:S4Vectors':
#&gt; 
#&gt;     show
#&gt; The following object is masked from 'package:stats4':
#&gt; 
#&gt;     show
#&gt; The following objects are masked from 'package:methods':
#&gt; 
#&gt;     removeClass, show
#&gt; Loading required package: data.table
#&gt; 
#&gt; Attaching package: 'data.table'
#&gt; The following objects are masked from 'package:reshape2':
#&gt; 
#&gt;     dcast, melt
#&gt; The following object is masked from 'package:IRanges':
#&gt; 
#&gt;     shift
#&gt; The following objects are masked from 'package:S4Vectors':
#&gt; 
#&gt;     first, second
#&gt; Loading required package: plotly
#&gt; Loading required package: ggplot2
#&gt; 
#&gt; Attaching package: 'plotly'
#&gt; The following object is masked from 'package:ggplot2':
#&gt; 
#&gt;     last_plot
#&gt; The following object is masked from 'package:phangorn':
#&gt; 
#&gt;     add_boxplot
#&gt; The following object is masked from 'package:XVector':
#&gt; 
#&gt;     slice
#&gt; The following object is masked from 'package:IRanges':
#&gt; 
#&gt;     slice
#&gt; The following object is masked from 'package:S4Vectors':
#&gt; 
#&gt;     rename
#&gt; The following object is masked from 'package:stats':
#&gt; 
#&gt;     filter
#&gt; The following object is masked from 'package:graphics':
#&gt; 
#&gt;     layout
#&gt; Loading required package: DT
#&gt; 
#&gt; Attaching package: 'DT'
#&gt; The following objects are masked from 'package:shiny':
#&gt; 
#&gt;     dataTableOutput, renderDataTable
#&gt; Loading required package: zeallot
#&gt; Loading required package: excelR
#&gt; Loading required package: shinycssloaders
#&gt; Loading required package: ggdendro
#&gt; Loading required package: shinyWidgets
#&gt; 
#&gt; Attaching package: 'shinyWidgets'
#&gt; The following object is masked from 'package:shinyjs':
#&gt; 
#&gt;     alert
#&gt; Loading required package: openxlsx
#&gt; Loading required package: tools
#&gt; Loading required package: rmarkdown
#&gt; Loading required package: knitr
#&gt; Loading required package: seqinr
#&gt; 
#&gt; Attaching package: 'seqinr'
#&gt; The following object is masked from 'package:shiny':
#&gt; 
#&gt;     a
#&gt; The following object is masked from 'package:sangerseqR':
#&gt; 
#&gt;     read.abif
#&gt; The following object is masked from 'package:Biostrings':
#&gt; 
#&gt;     translate
#&gt; The following objects are masked from 'package:ape':
#&gt; 
#&gt;     as.alignment, consensus
#&gt; Loading required package: BiocStyle
#&gt; 
#&gt; Attaching package: 'BiocStyle'
#&gt; The following objects are masked from 'package:rmarkdown':
#&gt; 
#&gt;     html_document, md_document, pdf_document
#&gt; The following object is masked from 'package:shiny':
#&gt; 
#&gt;     markdown
#&gt; Loading required package: logger
#&gt; Welcome to sangeranalyseR
data(&quot;sangerAlignmentData&quot;)
data(&quot;sangerContigData&quot;)
data(&quot;sangerReadFData&quot;)

rawDataDir &lt;- system.file(&quot;extdata&quot;, package = &quot;sangeranalyseR&quot;)
fastaFN &lt;- file.path(rawDataDir, &quot;fasta&quot;, &quot;SangerAlignment&quot;, &quot;Sanger_all_reads.fa&quot;)
my_sangerAlignmentFa &lt;- new(&quot;SangerAlignment&quot;,
                            inputSource          = &quot;FASTA&quot;,
                            processMethod        = &quot;REGEX&quot;,
                            FASTA_File           = fastaFN,
                            REGEX_SuffixForward  = &quot;_[0-9]*_F<span class="math-container">$",
                        REGEX_SuffixReverse  = "_[0-9]*_R$</span>&quot;,
                            refAminoAcidSeq      = &quot;SRQWLFSTNHKDIGTLYFIFGAWAGMVGTSLSILIRAELGHPGALIGDDQIYNVIVTAHAFIMIFFMVMPIMIGGFGNWLVPLMLGAPDMAFPRMNNMSFWLLPPALSLLLVSSMVENGAGTGWTVYPPLSAGIAHGGASVDLAIFSLHLAGISSILGAVNFITTVINMRSTGISLDRMPLFVWSVVITALLLLLSLPVLAGAITMLLTDRNLNTSFFDPAGGGDPILYQHLFWFFGHPEVYILILPGFGMISHIISQESGKKETFGSLGMIYAMLAIGLLGFIVWAHHMFTVGMDVDTRAYFTSATMIIAVPTGIKIFSWLATLHGTQLSYSPAILWALGFVFLFTVGGLTGVVLANSSVDIILHDTYYVVAHFHYVLSMGAVFAIMAGFIHWYPLFTGLTLNNKWLKSHFIIMFIGVNLTFFPQHFLGLAGMPRRYSDYPDAYTTWNIVSTIGSTISLLGILFFFFIIWESLVSQRQVIYPIQLNSSIEWYQNTPPAEHSYSELPLLTN&quot;,
                            minReadsNum           = 2,
                            minReadLength         = 20,
                            minFractionCall       = 0.5,
                            maxFractionLost       = 0.5,
                            geneticCode           = GENETIC_CODE,
                            acceptStopCodons      = TRUE,
                            readingFrame          = 1,
                            processorsNum         = 2)
#&gt; Assessing frameshifts in nucleotide sequences:
#&gt; ================================================================================
#&gt; 
#&gt; Time difference of 0.05 secs
#&gt; Assessing frameshifts in nucleotide sequences:
#&gt; ================================================================================
#&gt; 
#&gt; Time difference of 0.03 secs
#&gt; Assessing frameshifts in nucleotide sequences:
#&gt; ================================================================================
#&gt; 
#&gt; Time difference of 0.03 secs
#&gt; Assessing frameshifts in nucleotide sequences:
#&gt; ================================================================================
#&gt; 
#&gt; Time difference of 0.03 secs

writeFasta(my_sangerAlignmentFa,
           outputDir         = tempdir(),
           compress          = FALSE,
           compression_level = NA,
           selection         = &quot;all&quot;)

generateReport(my_sangerAlignmentFa,
               outputDir           = tempdir(),
               includeSangerRead   = TRUE,
               includeSangerContig = TRUE)
#&gt; processing file: SangerRead_Report_fasta.Rmd
#&gt; output file: SangerRead_Report_fasta.knit.md
#&gt; /usr/local/bin/pandoc +RTS -K512m -RTS SangerRead_Report_fasta.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /private/var/folders/gf/3p_ynkts411bs238rtw3y0b40000gn/T/Rtmplj2Uy8/SangerAlignment/Achl_ACHLO006-09/Sanger_all_reads/SangerRead_Report_fasta.html --lua-filter /Library/Frameworks/R.framework/Versions/4.2/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.2/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --embed-resources --standalone --variable bs3=TRUE --section-divs --table-of-contents --toc-depth 3 --variable toc_float=1 --variable toc_selectors=h1,h2,h3 --variable toc_collapsed=1 --variable toc_smooth_scroll=1 --variable toc_print=1 --template /Library/Frameworks/R.framework/Versions/4.2/Resources/library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /var/folders/gf/3p_ynkts411bs238rtw3y0b40000gn/T//Rtmplj2Uy8/rmarkdown-str3926187706b9.html
#&gt; 
#&gt; Output created: /private/var/folders/gf/3p_ynkts411bs238rtw3y0b40000gn/T/RtmplI8nQX/SangerAlignment/SangerAlignment_Report.html
#&gt; [1] &quot;/private/var/folders/gf/3p_ynkts411bs238rtw3y0b40000gn/T/RtmplI8nQX/SangerAlignment/SangerAlignment_Report.html&quot;
</code></pre>
<p><sup>Created on 2023-03-02 with <a href="https://reprex.tidyverse.org" rel="nofollow noreferrer">reprex v2.0.2</a></sup></p>
<hr />
<p>Example from the docs:</p>
<pre class="lang-r prettyprint-override"><code>library(sangeranalyseR)
#&gt; Loading required package: stringr
#&gt; Loading required package: ape
#&gt; Loading required package: Biostrings
#&gt; Loading required package: BiocGenerics
#&gt; 
#&gt; Attaching package: 'BiocGenerics'
#&gt; The following objects are masked from 'package:stats':
#&gt; 
#&gt;     IQR, mad, sd, var, xtabs
#&gt; The following objects are masked from 'package:base':
#&gt; 
#&gt;     anyDuplicated, aperm, append, as.data.frame, basename, cbind,
#&gt;     colnames, dirname, do.call, duplicated, eval, evalq, Filter, Find,
#&gt;     get, grep, grepl, intersect, is.unsorted, lapply, Map, mapply,
#&gt;     match, mget, order, paste, pmax, pmax.int, pmin, pmin.int,
#&gt;     Position, rank, rbind, Reduce, rownames, sapply, setdiff, sort,
#&gt;     table, tapply, union, unique, unsplit, which.max, which.min
#&gt; Loading required package: S4Vectors
#&gt; Loading required package: stats4
#&gt; 
#&gt; Attaching package: 'S4Vectors'
#&gt; The following objects are masked from 'package:base':
#&gt; 
#&gt;     expand.grid, I, unname
#&gt; Loading required package: IRanges
#&gt; Loading required package: XVector
#&gt; Loading required package: GenomeInfoDb
#&gt; 
#&gt; Attaching package: 'Biostrings'
#&gt; The following object is masked from 'package:ape':
#&gt; 
#&gt;     complement
#&gt; The following object is masked from 'package:base':
#&gt; 
#&gt;     strsplit
#&gt; Loading required package: DECIPHER
#&gt; Loading required package: RSQLite
#&gt; Loading required package: parallel
#&gt; Loading required package: reshape2
#&gt; Loading required package: phangorn
#&gt; Loading required package: sangerseqR
#&gt; Loading required package: gridExtra
#&gt; 
#&gt; Attaching package: 'gridExtra'
#&gt; The following object is masked from 'package:BiocGenerics':
#&gt; 
#&gt;     combine
#&gt; Loading required package: shiny
#&gt; Loading required package: shinydashboard
#&gt; 
#&gt; Attaching package: 'shinydashboard'
#&gt; The following object is masked from 'package:graphics':
#&gt; 
#&gt;     box
#&gt; Loading required package: shinyjs
#&gt; 
#&gt; Attaching package: 'shinyjs'
#&gt; The following object is masked from 'package:shiny':
#&gt; 
#&gt;     runExample
#&gt; The following object is masked from 'package:RSQLite':
#&gt; 
#&gt;     show
#&gt; The following object is masked from 'package:Biostrings':
#&gt; 
#&gt;     show
#&gt; The following object is masked from 'package:GenomeInfoDb':
#&gt; 
#&gt;     show
#&gt; The following object is masked from 'package:XVector':
#&gt; 
#&gt;     show
#&gt; The following object is masked from 'package:IRanges':
#&gt; 
#&gt;     show
#&gt; The following object is masked from 'package:S4Vectors':
#&gt; 
#&gt;     show
#&gt; The following object is masked from 'package:stats4':
#&gt; 
#&gt;     show
#&gt; The following objects are masked from 'package:methods':
#&gt; 
#&gt;     removeClass, show
#&gt; Loading required package: data.table
#&gt; 
#&gt; Attaching package: 'data.table'
#&gt; The following objects are masked from 'package:reshape2':
#&gt; 
#&gt;     dcast, melt
#&gt; The following object is masked from 'package:IRanges':
#&gt; 
#&gt;     shift
#&gt; The following objects are masked from 'package:S4Vectors':
#&gt; 
#&gt;     first, second
#&gt; Loading required package: plotly
#&gt; Loading required package: ggplot2
#&gt; 
#&gt; Attaching package: 'plotly'
#&gt; The following object is masked from 'package:ggplot2':
#&gt; 
#&gt;     last_plot
#&gt; The following object is masked from 'package:phangorn':
#&gt; 
#&gt;     add_boxplot
#&gt; The following object is masked from 'package:XVector':
#&gt; 
#&gt;     slice
#&gt; The following object is masked from 'package:IRanges':
#&gt; 
#&gt;     slice
#&gt; The following object is masked from 'package:S4Vectors':
#&gt; 
#&gt;     rename
#&gt; The following object is masked from 'package:stats':
#&gt; 
#&gt;     filter
#&gt; The following object is masked from 'package:graphics':
#&gt; 
#&gt;     layout
#&gt; Loading required package: DT
#&gt; 
#&gt; Attaching package: 'DT'
#&gt; The following objects are masked from 'package:shiny':
#&gt; 
#&gt;     dataTableOutput, renderDataTable
#&gt; Loading required package: zeallot
#&gt; Loading required package: excelR
#&gt; Loading required package: shinycssloaders
#&gt; Loading required package: ggdendro
#&gt; Loading required package: shinyWidgets
#&gt; 
#&gt; Attaching package: 'shinyWidgets'
#&gt; The following object is masked from 'package:shinyjs':
#&gt; 
#&gt;     alert
#&gt; Loading required package: openxlsx
#&gt; Loading required package: tools
#&gt; Loading required package: rmarkdown
#&gt; Loading required package: knitr
#&gt; Loading required package: seqinr
#&gt; 
#&gt; Attaching package: 'seqinr'
#&gt; The following object is masked from 'package:shiny':
#&gt; 
#&gt;     a
#&gt; The following object is masked from 'package:sangerseqR':
#&gt; 
#&gt;     read.abif
#&gt; The following object is masked from 'package:Biostrings':
#&gt; 
#&gt;     translate
#&gt; The following objects are masked from 'package:ape':
#&gt; 
#&gt;     as.alignment, consensus
#&gt; Loading required package: BiocStyle
#&gt; 
#&gt; Attaching package: 'BiocStyle'
#&gt; The following objects are masked from 'package:rmarkdown':
#&gt; 
#&gt;     html_document, md_document, pdf_document
#&gt; The following object is masked from 'package:shiny':
#&gt; 
#&gt;     markdown
#&gt; Loading required package: logger
#&gt; Welcome to sangeranalyseR
rawDataDir &lt;- system.file(&quot;extdata&quot;, package = &quot;sangeranalyseR&quot;)
parentDir &lt;- file.path(rawDataDir, 'Allolobophora_chlorotica', 'ACHLO')

ACHLO_contigs &lt;- SangerAlignment(ABIF_Directory     = parentDir,
                                 REGEX_SuffixForward = &quot;_[0-9]*_F.ab1<span class="math-container">$",
                             REGEX_SuffixReverse = "_[0-9]*_R.ab1$</span>&quot;)

launchApp(ACHLO_contigs)
writeFasta(ACHLO_contigs)
generateReport(ACHLO_contigs)
</code></pre>
<p><sup>Created on 2023-03-02 with <a href="https://reprex.tidyverse.org" rel="nofollow noreferrer">reprex v2.0.2</a></sup></p>
<hr />
<p>My sessionInfo output:</p>
<pre class="lang-r prettyprint-override"><code>sessionInfo()
#&gt; R version 4.2.2 (2022-10-31)
#&gt; Platform: x86_64-apple-darwin17.0 (64-bit)
#&gt; Running under: macOS Big Sur ... 10.16
#&gt; 
#&gt; Matrix products: default
#&gt; BLAS:   /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib
#&gt; LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
#&gt; 
#&gt; locale:
#&gt; [1] en_AU.UTF-8/en_AU.UTF-8/en_AU.UTF-8/C/en_AU.UTF-8/en_AU.UTF-8
#&gt; 
#&gt; attached base packages:
#&gt;  [1] tools     parallel  stats4    stats     graphics  grDevices utils    
#&gt;  [8] datasets  methods   base     
#&gt; 
#&gt; other attached packages:
#&gt;  [1] sangeranalyseR_1.8.0  logger_0.2.2          BiocStyle_2.26.0     
#&gt;  [4] seqinr_4.2-23         knitr_1.42            rmarkdown_2.20       
#&gt;  [7] openxlsx_4.2.5.2      shinyWidgets_0.7.6    ggdendro_0.1.23      
#&gt; [10] shinycssloaders_1.0.0 excelR_0.4.0          zeallot_0.1.0        
#&gt; [13] DT_0.27               plotly_4.10.1         ggplot2_3.4.1        
#&gt; [16] data.table_1.14.8     shinyjs_2.1.0         shinydashboard_0.7.2 
#&gt; [19] shiny_1.7.4           gridExtra_2.3         sangerseqR_1.34.0    
#&gt; [22] phangorn_2.11.1       reshape2_1.4.4        DECIPHER_2.26.0      
#&gt; [25] RSQLite_2.3.0         Biostrings_2.66.0     GenomeInfoDb_1.34.9  
#&gt; [28] XVector_0.38.0        IRanges_2.32.0        S4Vectors_0.36.2     
#&gt; [31] BiocGenerics_0.44.0   ape_5.7               stringr_1.5.0        
#&gt; 
#&gt; loaded via a namespace (and not attached):
#&gt;  [1] nlme_3.1-162           bitops_1.0-7           fs_1.6.1              
#&gt;  [4] bit64_4.0.5            httr_1.4.5             R.cache_0.16.0        
#&gt;  [7] bslib_0.4.2            utf8_1.2.3             R6_2.5.1              
#&gt; [10] DBI_1.1.3              lazyeval_0.2.2         colorspace_2.1-0      
#&gt; [13] ade4_1.7-22            withr_2.5.0            tidyselect_1.2.0      
#&gt; [16] bit_4.0.5              compiler_4.2.2         cli_3.6.0             
#&gt; [19] sass_0.4.5             scales_1.2.1           quadprog_1.5-8        
#&gt; [22] digest_0.6.31          R.utils_2.12.2         pkgconfig_2.0.3       
#&gt; [25] htmltools_0.5.4        styler_1.9.0           fastmap_1.1.1         
#&gt; [28] htmlwidgets_1.6.1      rlang_1.0.6            rstudioapi_0.14       
#&gt; [31] jquerylib_0.1.4        generics_0.1.3         jsonlite_1.8.4        
#&gt; [34] zip_2.2.2              dplyr_1.1.0            R.oo_1.25.0           
#&gt; [37] RCurl_1.98-1.10        magrittr_2.0.3         GenomeInfoDbData_1.2.9
#&gt; [40] Matrix_1.5-3           Rcpp_1.0.10            munsell_0.5.0         
#&gt; [43] fansi_1.0.4            lifecycle_1.0.3        R.methodsS3_1.8.2     
#&gt; [46] stringi_1.7.12         yaml_2.3.7             MASS_7.3-58.2         
#&gt; [49] zlibbioc_1.44.0        plyr_1.8.8             grid_4.2.2            
#&gt; [52] blob_1.2.3             promises_1.2.0.1       crayon_1.5.2          
#&gt; [55] lattice_0.20-45        pillar_1.8.1           igraph_1.4.1          
#&gt; [58] codetools_0.2-19       fastmatch_1.1-3        reprex_2.0.2          
#&gt; [61] glue_1.6.2             evaluate_0.20          BiocManager_1.30.20   
#&gt; [64] vctrs_0.5.2            httpuv_1.6.9           gtable_0.3.1          
#&gt; [67] purrr_1.0.1            tidyr_1.3.0            cachem_1.0.7          
#&gt; [70] xfun_0.37              mime_0.12              xtable_1.8-4          
#&gt; [73] later_1.3.0            viridisLite_0.4.1      tibble_3.1.8          
#&gt; [76] memoise_2.0.1          ellipsis_0.3.2
</code></pre>

CC BY-SA 4.0
2023-03-03T07:48:24.370Z
I used your code and ran the launchapp() function on the contigs. Below is the error code. Listening onhttp://127.0.0.1:6825
Warning: Error in value[[3L]]: Couldn't normalize path in `addResourcePath`, with arguments: `prefix` = 'AdminLTE-2.0.6'; `directoryPath` = 'F:/biocbuild/bbs-3.16-bioc/R/library/shinydashboard/AdminLTE'
  3: runApp
  2: print.shiny.appobj
  1: <Anonymous>
Taeen Jidaan
CC BY-SA 4.0
2023-03-03T08:08:13.090Z
Hi, Thank you for responding back. I am using Windows 10 R version 4.2.2. I edited my question to include the sessioninfo() for the package. I also recently commented the error I encountered from using your code. It's probably because my version of R is not updated because its Windows.
Taeen Jidaan
CC BY-SA 4.0
2023-03-03T08:08:23.457Z
Another comment: I tried updating the Bioconductor package but I am using the newest version of it. However, when I used 'BiocManager::install(version='devel')', I ran across this error: Error: Bioconductor version '3.17' requires R version '4.3'; use
`BiocManager::install(version = '3.16')` with R version 4.2; see
https://bioconductor.org/install'. Is it because I am using Windows? If so, how could I use the example code in another program?
Taeen Jidaan
CC BY-SA 4.0
2023-03-03T08:11:06.347Z
Another comment: I knitted your code again and this was the error I encountered: 
`Error in parse_block(g[-1], g[1], params.src, markdown_mode) : 
Duplicate chunk label 'unnamed-chunk-1', which has been used for the chunk:
library(reprex)
library(sangeranalyseR)
data("sangerAlignmentData")
data("sangerContigData")
data("sangerReadFData")
Calls: <Anonymous> ... process_file -> split_file -> lapply -> FUN -> parse_block                                                                           
Execution halted'
Taeen Jidaan
CC BY-SA 4.0
2023-03-05T22:37:28.873Z
Looks like you my have a few issues to deal with. One potential issue is your shiny package install. First thing I'd do is, in a new session, reinstall shiny (`install.packages("shiny")`) and run the example code from https://shiny.rstudio.com/gallery/plot-interaction-basic.html, then any issues with shiny and related packages should be able to be identified and solved.
jared_mamrot
CC BY-SA 4.0
2023-03-02T04:13:57.590Z
2023-03-03T04:34:48.757Z
2023-03-03T04:34:48.757Z
jared_mamrot
<p>I am doing a project where I am reproducing the analysis from the article &quot;sangeranalyseR: Simple and Interactive Processing of Sanger Sequencing Data in R&quot;. Below is the example chunk for Sanger Alignment. Below are the package and datasets.</p>
<pre class="lang-r prettyprint-override"><code>library(sangeranalyseR)
data(&quot;sangerAlignmentData&quot;)
data(&quot;sangerContigData&quot;)
data(&quot;sangerReadFData&quot;)
</code></pre>
<p>Below is the code for Sanger Alignment, similar to the code for Sanger Contig and Sanger Reading.</p>
<pre class="lang-r prettyprint-override"><code>rawDataDir &lt;- system.file(&quot;extdata&quot;, package = &quot;sangeranalyseR&quot;)
fastaFN &lt;- file.path(rawDataDir, &quot;fasta&quot;, &quot;SangerAlignment&quot;, &quot;Sanger_all_reads.fa&quot;)
my_sangerAlignmentFa &lt;- new(&quot;SangerAlignment&quot;,
                            inputSource          = &quot;FASTA&quot;,
                            processMethod        = &quot;REGEX&quot;,
                            FASTA_File           = fastaFN,
                            REGEX_SuffixForward  = &quot;_[0-9]*_F<span class="math-container">$",
                        REGEX_SuffixReverse  = "_[0-9]*_R$</span>&quot;,
                            refAminoAcidSeq      = &quot;SRQWLFSTNHKDIGTLYFIFGAWAGMVGTSLSILIRAELGHPGALIGDDQIYNVIVTAHAFIMIFFMVMPIMIGGFGNWLVPLMLGAPDMAFPRMNNMSFWLLPPALSLLLVSSMVENGAGTGWTVYPPLSAGIAHGGASVDLAIFSLHLAGISSILGAVNFITTVINMRSTGISLDRMPLFVWSVVITALLLLLSLPVLAGAITMLLTDRNLNTSFFDPAGGGDPILYQHLFWFFGHPEVYILILPGFGMISHIISQESGKKETFGSLGMIYAMLAIGLLGFIVWAHHMFTVGMDVDTRAYFTSATMIIAVPTGIKIFSWLATLHGTQLSYSPAILWALGFVFLFTVGGLTGVVLANSSVDIILHDTYYVVAHFHYVLSMGAVFAIMAGFIHWYPLFTGLTLNNKWLKSHFIIMFIGVNLTFFPQHFLGLAGMPRRYSDYPDAYTTWNIVSTIGSTISLLGILFFFFIIWESLVSQRQVIYPIQLNSSIEWYQNTPPAEHSYSELPLLTN&quot;,
                            minReadsNum           = 2,
                            minReadLength         = 20,
                            minFractionCall       = 0.5,
                            maxFractionLost       = 0.5,
                            geneticCode           = GENETIC_CODE,
                            acceptStopCodons      = TRUE,
                            readingFrame          = 1,
                            processorsNum         = 1)

launchApp(my_sangerAlignmentFa)

writeFasta(my_sangerAlignmentFa,
           outputDir         = tempdir(),
           compress          = FALSE,
           compression_level = NA,
           selection         = &quot;all&quot;)

generateReport(my_sangerAlignmentFa,
               outputDir           = tempdir(),
               includeSangerRead   = TRUE,
               includeSangerContig = TRUE)
</code></pre>
<p>There are two problems that occurred for me. One is that the launchapp() function created an error for me stating</p>
<pre><code>INFO [2023-03-01 14:25:52] Your input is 'SangerAlignment' S4 instance
INFO [2023-03-01 14:25:52] SangerAlignment with 'FASTA' inputSource
cannot run Shiny app (You don't need to do trimming or base calling)
NULL
</code></pre>
<p>How can I fix this error?</p>
<p>Another error that occurred within knitting. I ran the same code without the launchapp() function and an error that I never seen before said this</p>
<pre><code>Quitting from lines NA-219 (SangerRead_Report_fasta.Rmd)  Error in parse_block(g[-1], g[1], params.src, markdown_mode) : 
Duplicate chunk label 'unnamed-chunk-1', which has been used for the chunk:
library(sangeranalyseR) library(rentrez) Calls: &lt;Anonymous&gt; ...
process_file -&gt; split_file -&gt; lapply -&gt; FUN -&gt; parse_block

Execution halted
</code></pre>
<p>Is it my RStudio or is the code itself. Is there anything I am missing?</p>
<pre><code>sessionInfo(sangeranalysesR)
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22621)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8 
[2] LC_CTYPE=English_United States.utf8   
[3] LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.utf8    

attached base packages:
character(0)

other attached packages:
[1] sangeranalyseR_1.8.0

loaded via a namespace (and not attached):
  [1] utils_4.2.2            nlme_3.1-161          
  [3] fs_1.6.1               bitops_1.0-7          
  [5] bit64_4.0.5            httr_1.4.4            
  [7] GenomeInfoDb_1.34.6    tools_4.2.2           
  [9] bslib_0.4.2            utf8_1.2.2            
 [11] R6_2.5.1               DT_0.27               
 [13] DBI_1.1.3              lazyeval_0.2.2        
 [15] BiocGenerics_0.44.0    colorspace_2.1-0      
 [17] rhdf5filters_1.10.0    ade4_1.7-20           
 [19] withr_2.5.0            tidyselect_1.2.0      
 [21] gridExtra_2.3          phangorn_2.11.1       
 [23] bit_4.0.5              compiler_4.2.2        
 [25] cli_3.5.0              datasets_4.2.2        
 [27] shinyjs_2.1.0          plotly_4.10.1         
 [29] ggdendro_0.1.23        base_4.2.2            
 [31] sass_0.4.5             scales_1.2.1          
 [33] quadprog_1.5-8         stringr_1.5.0         
 [35] digest_0.6.31          rmarkdown_2.20        
 [37] sangerseqR_1.34.0      XVector_0.38.0        
 [39] pkgconfig_2.0.3        htmltools_0.5.4       
 [41] sessioninfo_1.2.2      fastmap_1.1.0         
 [43] excelR_0.4.0           grDevices_4.2.2       
 [45] htmlwidgets_1.6.1      rlang_1.0.6           
 [47] rstudioapi_0.14        RSQLite_2.2.20        
 [49] shiny_1.7.4            jquerylib_0.1.4       
 [51] generics_0.1.3         jsonlite_1.8.4        
 [53] BiocParallel_1.32.5    zip_2.2.2             
 [55] dplyr_1.1.0            RCurl_1.98-1.10       
 [57] magrittr_2.0.3         GenomeInfoDbData_1.2.9
 [59] biomformat_1.26.0      Matrix_1.5-3          
 [61] Rhdf5lib_1.20.0        Rcpp_1.0.10           
 [63] munsell_0.5.0          S4Vectors_0.36.1      
 [65] fansi_1.0.4            logger_0.2.2          
 [67] DECIPHER_2.26.0        ape_5.6-2             
 [69] shinycssloaders_1.0.0  lifecycle_1.0.3       
 [71] yaml_2.3.7             stringi_1.7.12        
 [73] MASS_7.3-58.2          zlibbioc_1.44.0       
 [75] rhdf5_2.42.0           plyr_1.8.8            
 [77] grid_4.2.2             blob_1.2.3            
 [79] parallel_4.2.2         promises_1.2.0.1      
 [81] shinydashboard_0.7.2   crayon_1.5.2          
 [83] methods_4.2.2          lattice_0.20-45       
 [85] Biostrings_2.66.0      zeallot_0.1.0         
 [87] knitr_1.42             pillar_1.8.1          
 [89] igraph_1.3.5           seqinr_4.2-23         
 [91] reshape2_1.4.4         codetools_0.2-19      
 [93] stats4_4.2.2           fastmatch_1.1-3       
 [95] reprex_2.0.2           BiocVersion_3.16.0    
 [97] glue_1.6.2             evaluate_0.20         
 [99] BiocManager_1.30.20    data.table_1.14.6     
[101] vctrs_0.5.2            httpuv_1.6.8          
[103] graphics_4.2.2         gtable_0.3.1          
[105] purrr_1.0.1            tidyr_1.3.0           
[107] cachem_1.0.6           ggplot2_3.4.0         
[109] openxlsx_4.2.5.1       xfun_0.36             
[111] mime_0.12              xtable_1.8-4          
[113] later_1.3.0            viridisLite_0.4.1     
[115] tibble_3.1.8           stats_4.2.2           
[117] memoise_2.0.1          IRanges_2.32.0        
[119] shinyWidgets_0.7.6     ellipsis_0.3.2        
[121] BiocStyle_2.26.0
<span class="math-container">```</span> 
</code></pre>

<r><phylogenetics><bioconductor>
Sanger Sequencing Knitting Error
# Sanger Sequencing Knitting Error

(Asked by: username_0 on 2023-03-01)

I am doing a project where I am reproducing the analysis from the article "sangeranalyseR: Simple and Interactive Processing of Sanger Sequencing Data in R". Below is the example chunk for Sanger Alignment. Below are the package and datasets.
library(sangeranalyseR)
data("sangerAlignmentData")
data("sangerContigData")
data("sangerReadFData")

Below is the code for Sanger Alignment, similar to the code for Sanger Contig and Sanger Reading.
rawDataDir <- system.file("extdata", package = "sangeranalyseR")
fastaFN <- file.path(rawDataDir, "fasta", "SangerAlignment", "Sanger_all_reads.fa")
my_sangerAlignmentFa <- new("SangerAlignment",
                            inputSource          = "FASTA",
                            processMethod        = "REGEX",
                            FASTA_File           = fastaFN,
                            REGEX_SuffixForward  = "_[0-9]*_F$",
                        REGEX_SuffixReverse  = "_[0-9]*_R$",
                            refAminoAcidSeq      = "SRQWLFSTNHKDIGTLYFIFGAWAGMVGTSLSILIRAELGHPGALIGDDQIYNVIVTAHAFIMIFFMVMPIMIGGFGNWLVPLMLGAPDMAFPRMNNMSFWLLPPALSLLLVSSMVENGAGTGWTVYPPLSAGIAHGGASVDLAIFSLHLAGISSILGAVNFITTVINMRSTGISLDRMPLFVWSVVITALLLLLSLPVLAGAITMLLTDRNLNTSFFDPAGGGDPILYQHLFWFFGHPEVYILILPGFGMISHIISQESGKKETFGSLGMIYAMLAIGLLGFIVWAHHMFTVGMDVDTRAYFTSATMIIAVPTGIKIFSWLATLHGTQLSYSPAILWALGFVFLFTVGGLTGVVLANSSVDIILHDTYYVVAHFHYVLSMGAVFAIMAGFIHWYPLFTGLTLNNKWLKSHFIIMFIGVNLTFFPQHFLGLAGMPRRYSDYPDAYTTWNIVSTIGSTISLLGILFFFFIIWESLVSQRQVIYPIQLNSSIEWYQNTPPAEHSYSELPLLTN",
                            minReadsNum           = 2,
                            minReadLength         = 20,
                            minFractionCall       = 0.5,
                            maxFractionLost       = 0.5,
                            geneticCode           = GENETIC_CODE,
                            acceptStopCodons      = TRUE,
                            readingFrame          = 1,
                            processorsNum         = 1)

launchApp(my_sangerAlignmentFa)

writeFasta(my_sangerAlignmentFa,
           outputDir         = tempdir(),
           compress          = FALSE,
           compression_level = NA,
           selection         = "all")

generateReport(my_sangerAlignmentFa,
               outputDir           = tempdir(),
               includeSangerRead   = TRUE,
               includeSangerContig = TRUE)

There are two problems that occurred for me. One is that the launchapp() function created an error for me stating
INFO [2023-03-01 14:25:52] Your input is 'SangerAlignment' S4 instance
INFO [2023-03-01 14:25:52] SangerAlignment with 'FASTA' inputSource
cannot run Shiny app (You don't need to do trimming or base calling)
NULL

How can I fix this error?
Another error that occurred within knitting. I ran the same code without the launchapp() function and an error that I never seen before said this
Quitting from lines NA-219 (SangerRead_Report_fasta.Rmd)  Error in parse_block(g[-1], g[1], params.src, markdown_mode) : 
Duplicate chunk label 'unnamed-chunk-1', which has been used for the chunk:
library(sangeranalyseR) library(rentrez) Calls:  ...
process_file -> split_file -> lapply -> FUN -> parse_block

Execution halted

Is it my RStudio or is the code itself. Is there anything I am missing?
sessionInfo(sangeranalysesR)
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22621)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8 
[2] LC_CTYPE=English_United States.utf8   
[3] LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.utf8    

attached base packages:
character(0)

other attached packages:
[1] sangeranalyseR_1.8.0

loaded via a namespace (and not attached):
  [1] utils_4.2.2            nlme_3.1-161          
  [3] fs_1.6.1               bitops_1.0-7          
  [5] bit64_4.0.5            httr_1.4.4            
  [7] GenomeInfoDb_1.34.6    tools_4.2.2           
  [9] bslib_0.4.2            utf8_1.2.2            
 [11] R6_2.5.1               DT_0.27               
 [13] DBI_1.1.3              lazyeval_0.2.2        
 [15] BiocGenerics_0.44.0    colorspace_2.1-0      
 [17] rhdf5filters_1.10.0    ade4_1.7-20           
 [19] withr_2.5.0            tidyselect_1.2.0      
 [21] gridExtra_2.3          phangorn_2.11.1       
 [23] bit_4.0.5              compiler_4.2.2        
 [25] cli_3.5.0              datasets_4.2.2        
 [27] shinyjs_2.1.0          plotly_4.10.1         
 [29] ggdendro_0.1.23        base_4.2.2            
 [31] sass_0.4.5             scales_1.2.1          
 [33] quadprog_1.5-8         stringr_1.5.0         
 [35] digest_0.6.31          rmarkdown_2.20        
 [37] sangerseqR_1.34.0      XVector_0.38.0        
 [39] pkgconfig_2.0.3        htmltools_0.5.4       
 [41] sessioninfo_1.2.2      fastmap_1.1.0         
 [43] excelR_0.4.0           grDevices_4.2.2       
 [45] htmlwidgets_1.6.1      rlang_1.0.6           
 [47] rstudioapi_0.14        RSQLite_2.2.20        
 [49] shiny_1.7.4            jquerylib_0.1.4       
 [51] generics_0.1.3         jsonlite_1.8.4        
 [53] BiocParallel_1.32.5    zip_2.2.2             
 [55] dplyr_1.1.0            RCurl_1.98-1.10       
 [57] magrittr_2.0.3         GenomeInfoDbData_1.2.9
 [59] biomformat_1.26.0      Matrix_1.5-3          
 [61] Rhdf5lib_1.20.0        Rcpp_1.0.10           
 [63] munsell_0.5.0          S4Vectors_0.36.1      
 [65] fansi_1.0.4            logger_0.2.2          
 [67] DECIPHER_2.26.0        ape_5.6-2             
 [69] shinycssloaders_1.0.0  lifecycle_1.0.3       
 [71] yaml_2.3.7             stringi_1.7.12        
 [73] MASS_7.3-58.2          zlibbioc_1.44.0       
 [75] rhdf5_2.42.0           plyr_1.8.8            
 [77] grid_4.2.2             blob_1.2.3            
 [79] parallel_4.2.2         promises_1.2.0.1      
 [81] shinydashboard_0.7.2   crayon_1.5.2          
 [83] methods_4.2.2          lattice_0.20-45       
 [85] Biostrings_2.66.0      zeallot_0.1.0         
 [87] knitr_1.42             pillar_1.8.1          
 [89] igraph_1.3.5           seqinr_4.2-23         
 [91] reshape2_1.4.4         codetools_0.2-19      
 [93] stats4_4.2.2           fastmatch_1.1-3       
 [95] reprex_2.0.2           BiocVersion_3.16.0    
 [97] glue_1.6.2             evaluate_0.20         
 [99] BiocManager_1.30.20    data.table_1.14.6     
[101] vctrs_0.5.2            httpuv_1.6.8          
[103] graphics_4.2.2         gtable_0.3.1          
[105] purrr_1.0.1            tidyr_1.3.0           
[107] cachem_1.0.6           ggplot2_3.4.0         
[109] openxlsx_4.2.5.1       xfun_0.36             
[111] mime_0.12              xtable_1.8-4          
[113] later_1.3.0            viridisLite_0.4.1     
[115] tibble_3.1.8           stats_4.2.2           
[117] memoise_2.0.1          IRanges_2.32.0        
[119] shinyWidgets_0.7.6     ellipsis_0.3.2        
[121] BiocStyle_2.26.0
```

**Tags:** r, phylogenetics, bioconductor

---

## 1 answers

### Answer by username_1 on 2023-03-02. Score: 3

Your code runs without error on my laptop (macOS 13.2.1; R v4.2.2; Rstudio 2022.07.2), so I have some further questions that might help with troubleshooting (too many to include in a comment):

Does the example from the docs run without errors/warnings on your system?
Did you install the sangeranalyseR package via Bioconductor (per the docs)?
Do you have the most up-to-date Bioconducter installed?
Have you tried running the example code in a 'fresh' session?
Are you able to please run the command sessionInfo() and edit your question to include the output?
If you run your example via the reprex package, are there any differences between your output and my output?

The code from your question run on my laptop:
# BiocManager::install("sangeranalyseR")
library(sangeranalyseR)
#> Loading required package: stringr
#> Loading required package: ape
#> Loading required package: Biostrings
#> Loading required package: BiocGenerics
#> 
#> Attaching package: 'BiocGenerics'
#> The following objects are masked from 'package:stats':
#> 
#>     IQR, mad, sd, var, xtabs
#> The following objects are masked from 'package:base':
#> 
#>     anyDuplicated, aperm, append, as.data.frame, basename, cbind,
#>     colnames, dirname, do.call, duplicated, eval, evalq, Filter, Find,
#>     get, grep, grepl, intersect, is.unsorted, lapply, Map, mapply,
#>     match, mget, order, paste, pmax, pmax.int, pmin, pmin.int,
#>     Position, rank, rbind, Reduce, rownames, sapply, setdiff, sort,
#>     table, tapply, union, unique, unsplit, which.max, which.min
#> Loading required package: S4Vectors
#> Loading required package: stats4
#> 
#> Attaching package: 'S4Vectors'
#> The following objects are masked from 'package:base':
#> 
#>     expand.grid, I, unname
#> Loading required package: IRanges
#> Loading required package: XVector
#> Loading required package: GenomeInfoDb
#> 
#> Attaching package: 'Biostrings'
#> The following object is masked from 'package:ape':
#> 
#>     complement
#> The following object is masked from 'package:base':
#> 
#>     strsplit
#> Loading required package: DECIPHER
#> Loading required package: RSQLite
#> Loading required package: parallel
#> Loading required package: reshape2
#> Loading required package: phangorn
#> Loading required package: sangerseqR
#> Loading required package: gridExtra
#> 
#> Attaching package: 'gridExtra'
#> The following object is masked from 'package:BiocGenerics':
#> 
#>     combine
#> Loading required package: shiny
#> Loading required package: shinydashboard
#> 
#> Attaching package: 'shinydashboard'
#> The following object is masked from 'package:graphics':
#> 
#>     box
#> Loading required package: shinyjs
#> 
#> Attaching package: 'shinyjs'
#> The following object is masked from 'package:shiny':
#> 
#>     runExample
#> The following object is masked from 'package:RSQLite':
#> 
#>     show
#> The following object is masked from 'package:Biostrings':
#> 
#>     show
#> The following object is masked from 'package:GenomeInfoDb':
#> 
#>     show
#> The following object is masked from 'package:XVector':
#> 
#>     show
#> The following object is masked from 'package:IRanges':
#> 
#>     show
#> The following object is masked from 'package:S4Vectors':
#> 
#>     show
#> The following object is masked from 'package:stats4':
#> 
#>     show
#> The following objects are masked from 'package:methods':
#> 
#>     removeClass, show
#> Loading required package: data.table
#> 
#> Attaching package: 'data.table'
#> The following objects are masked from 'package:reshape2':
#> 
#>     dcast, melt
#> The following object is masked from 'package:IRanges':
#> 
#>     shift
#> The following objects are masked from 'package:S4Vectors':
#> 
#>     first, second
#> Loading required package: plotly
#> Loading required package: ggplot2
#> 
#> Attaching package: 'plotly'
#> The following object is masked from 'package:ggplot2':
#> 
#>     last_plot
#> The following object is masked from 'package:phangorn':
#> 
#>     add_boxplot
#> The following object is masked from 'package:XVector':
#> 
#>     slice
#> The following object is masked from 'package:IRanges':
#> 
#>     slice
#> The following object is masked from 'package:S4Vectors':
#> 
#>     rename
#> The following object is masked from 'package:stats':
#> 
#>     filter
#> The following object is masked from 'package:graphics':
#> 
#>     layout
#> Loading required package: DT
#> 
#> Attaching package: 'DT'
#> The following objects are masked from 'package:shiny':
#> 
#>     dataTableOutput, renderDataTable
#> Loading required package: zeallot
#> Loading required package: excelR
#> Loading required package: shinycssloaders
#> Loading required package: ggdendro
#> Loading required package: shinyWidgets
#> 
#> Attaching package: 'shinyWidgets'
#> The following object is masked from 'package:shinyjs':
#> 
#>     alert
#> Loading required package: openxlsx
#> Loading required package: tools
#> Loading required package: rmarkdown
#> Loading required package: knitr
#> Loading required package: seqinr
#> 
#> Attaching package: 'seqinr'
#> The following object is masked from 'package:shiny':
#> 
#>     a
#> The following object is masked from 'package:sangerseqR':
#> 
#>     read.abif
#> The following object is masked from 'package:Biostrings':
#> 
#>     translate
#> The following objects are masked from 'package:ape':
#> 
#>     as.alignment, consensus
#> Loading required package: BiocStyle
#> 
#> Attaching package: 'BiocStyle'
#> The following objects are masked from 'package:rmarkdown':
#> 
#>     html_document, md_document, pdf_document
#> The following object is masked from 'package:shiny':
#> 
#>     markdown
#> Loading required package: logger
#> Welcome to sangeranalyseR
data("sangerAlignmentData")
data("sangerContigData")
data("sangerReadFData")

rawDataDir <- system.file("extdata", package = "sangeranalyseR")
fastaFN <- file.path(rawDataDir, "fasta", "SangerAlignment", "Sanger_all_reads.fa")
my_sangerAlignmentFa <- new("SangerAlignment",
                            inputSource          = "FASTA",
                            processMethod        = "REGEX",
                            FASTA_File           = fastaFN,
                            REGEX_SuffixForward  = "_[0-9]*_F$",
                        REGEX_SuffixReverse  = "_[0-9]*_R$",
                            refAminoAcidSeq      = "SRQWLFSTNHKDIGTLYFIFGAWAGMVGTSLSILIRAELGHPGALIGDDQIYNVIVTAHAFIMIFFMVMPIMIGGFGNWLVPLMLGAPDMAFPRMNNMSFWLLPPALSLLLVSSMVENGAGTGWTVYPPLSAGIAHGGASVDLAIFSLHLAGISSILGAVNFITTVINMRSTGISLDRMPLFVWSVVITALLLLLSLPVLAGAITMLLTDRNLNTSFFDPAGGGDPILYQHLFWFFGHPEVYILILPGFGMISHIISQESGKKETFGSLGMIYAMLAIGLLGFIVWAHHMFTVGMDVDTRAYFTSATMIIAVPTGIKIFSWLATLHGTQLSYSPAILWALGFVFLFTVGGLTGVVLANSSVDIILHDTYYVVAHFHYVLSMGAVFAIMAGFIHWYPLFTGLTLNNKWLKSHFIIMFIGVNLTFFPQHFLGLAGMPRRYSDYPDAYTTWNIVSTIGSTISLLGILFFFFIIWESLVSQRQVIYPIQLNSSIEWYQNTPPAEHSYSELPLLTN",
                            minReadsNum           = 2,
                            minReadLength         = 20,
                            minFractionCall       = 0.5,
                            maxFractionLost       = 0.5,
                            geneticCode           = GENETIC_CODE,
                            acceptStopCodons      = TRUE,
                            readingFrame          = 1,
                            processorsNum         = 2)
#> Assessing frameshifts in nucleotide sequences:
#> ================================================================================
#> 
#> Time difference of 0.05 secs
#> Assessing frameshifts in nucleotide sequences:
#> ================================================================================
#> 
#> Time difference of 0.03 secs
#> Assessing frameshifts in nucleotide sequences:
#> ================================================================================
#> 
#> Time difference of 0.03 secs
#> Assessing frameshifts in nucleotide sequences:
#> ================================================================================
#> 
#> Time difference of 0.03 secs

writeFasta(my_sangerAlignmentFa,
           outputDir         = tempdir(),
           compress          = FALSE,
           compression_level = NA,
           selection         = "all")

generateReport(my_sangerAlignmentFa,
               outputDir           = tempdir(),
               includeSangerRead   = TRUE,
               includeSangerContig = TRUE)
#> processing file: SangerRead_Report_fasta.Rmd
#> output file: SangerRead_Report_fasta.knit.md
#> /usr/local/bin/pandoc +RTS -K512m -RTS SangerRead_Report_fasta.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /private/var/folders/gf/3p_ynkts411bs238rtw3y0b40000gn/T/Rtmplj2Uy8/SangerAlignment/Achl_ACHLO006-09/Sanger_all_reads/SangerRead_Report_fasta.html --lua-filter /Library/Frameworks/R.framework/Versions/4.2/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.2/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --embed-resources --standalone --variable bs3=TRUE --section-divs --table-of-contents --toc-depth 3 --variable toc_float=1 --variable toc_selectors=h1,h2,h3 --variable toc_collapsed=1 --variable toc_smooth_scroll=1 --variable toc_print=1 --template /Library/Frameworks/R.framework/Versions/4.2/Resources/library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /var/folders/gf/3p_ynkts411bs238rtw3y0b40000gn/T//Rtmplj2Uy8/rmarkdown-str3926187706b9.html
#> 
#> Output created: /private/var/folders/gf/3p_ynkts411bs238rtw3y0b40000gn/T/RtmplI8nQX/SangerAlignment/SangerAlignment_Report.html
#> [1] "/private/var/folders/gf/3p_ynkts411bs238rtw3y0b40000gn/T/RtmplI8nQX/SangerAlignment/SangerAlignment_Report.html"

Created on 2023-03-02 with reprex v2.0.2

Example from the docs:
library(sangeranalyseR)
#> Loading required package: stringr
#> Loading required package: ape
#> Loading required package: Biostrings
#> Loading required package: BiocGenerics
#> 
#> Attaching package: 'BiocGenerics'
#> The following objects are masked from 'package:stats':
#> 
#>     IQR, mad, sd, var, xtabs
#> The following objects are masked from 'package:base':
#> 
#>     anyDuplicated, aperm, append, as.data.frame, basename, cbind,
#>     colnames, dirname, do.call, duplicated, eval, evalq, Filter, Find,
#>     get, grep, grepl, intersect, is.unsorted, lapply, Map, mapply,
#>     match, mget, order, paste, pmax, pmax.int, pmin, pmin.int,
#>     Position, rank, rbind, Reduce, rownames, sapply, setdiff, sort,
#>     table, tapply, union, unique, unsplit, which.max, which.min
#> Loading required package: S4Vectors
#> Loading required package: stats4
#> 
#> Attaching package: 'S4Vectors'
#> The following objects are masked from 'package:base':
#> 
#>     expand.grid, I, unname
#> Loading required package: IRanges
#> Loading required package: XVector
#> Loading required package: GenomeInfoDb
#> 
#> Attaching package: 'Biostrings'
#> The following object is masked from 'package:ape':
#> 
#>     complement
#> The following object is masked from 'package:base':
#> 
#>     strsplit
#> Loading required package: DECIPHER
#> Loading required package: RSQLite
#> Loading required package: parallel
#> Loading required package: reshape2
#> Loading required package: phangorn
#> Loading required package: sangerseqR
#> Loading required package: gridExtra
#> 
#> Attaching package: 'gridExtra'
#> The following object is masked from 'package:BiocGenerics':
#> 
#>     combine
#> Loading required package: shiny
#> Loading required package: shinydashboard
#> 
#> Attaching package: 'shinydashboard'
#> The following object is masked from 'package:graphics':
#> 
#>     box
#> Loading required package: shinyjs
#> 
#> Attaching package: 'shinyjs'
#> The following object is masked from 'package:shiny':
#> 
#>     runExample
#> The following object is masked from 'package:RSQLite':
#> 
#>     show
#> The following object is masked from 'package:Biostrings':
#> 
#>     show
#> The following object is masked from 'package:GenomeInfoDb':
#> 
#>     show
#> The following object is masked from 'package:XVector':
#> 
#>     show
#> The following object is masked from 'package:IRanges':
#> 
#>     show
#> The following object is masked from 'package:S4Vectors':
#> 
#>     show
#> The following object is masked from 'package:stats4':
#> 
#>     show
#> The following objects are masked from 'package:methods':
#> 
#>     removeClass, show
#> Loading required package: data.table
#> 
#> Attaching package: 'data.table'
#> The following objects are masked from 'package:reshape2':
#> 
#>     dcast, melt
#> The following object is masked from 'package:IRanges':
#> 
#>     shift
#> The following objects are masked from 'package:S4Vectors':
#> 
#>     first, second
#> Loading required package: plotly
#> Loading required package: ggplot2
#> 
#> Attaching package: 'plotly'
#> The following object is masked from 'package:ggplot2':
#> 
#>     last_plot
#> The following object is masked from 'package:phangorn':
#> 
#>     add_boxplot
#> The following object is masked from 'package:XVector':
#> 
#>     slice
#> The following object is masked from 'package:IRanges':
#> 
#>     slice
#> The following object is masked from 'package:S4Vectors':
#> 
#>     rename
#> The following object is masked from 'package:stats':
#> 
#>     filter
#> The following object is masked from 'package:graphics':
#> 
#>     layout
#> Loading required package: DT
#> 
#> Attaching package: 'DT'
#> The following objects are masked from 'package:shiny':
#> 
#>     dataTableOutput, renderDataTable
#> Loading required package: zeallot
#> Loading required package: excelR
#> Loading required package: shinycssloaders
#> Loading required package: ggdendro
#> Loading required package: shinyWidgets
#> 
#> Attaching package: 'shinyWidgets'
#> The following object is masked from 'package:shinyjs':
#> 
#>     alert
#> Loading required package: openxlsx
#> Loading required package: tools
#> Loading required package: rmarkdown
#> Loading required package: knitr
#> Loading required package: seqinr
#> 
#> Attaching package: 'seqinr'
#> The following object is masked from 'package:shiny':
#> 
#>     a
#> The following object is masked from 'package:sangerseqR':
#> 
#>     read.abif
#> The following object is masked from 'package:Biostrings':
#> 
#>     translate
#> The following objects are masked from 'package:ape':
#> 
#>     as.alignment, consensus
#> Loading required package: BiocStyle
#> 
#> Attaching package: 'BiocStyle'
#> The following objects are masked from 'package:rmarkdown':
#> 
#>     html_document, md_document, pdf_document
#> The following object is masked from 'package:shiny':
#> 
#>     markdown
#> Loading required package: logger
#> Welcome to sangeranalyseR
rawDataDir <- system.file("extdata", package = "sangeranalyseR")
parentDir <- file.path(rawDataDir, 'Allolobophora_chlorotica', 'ACHLO')

ACHLO_contigs <- SangerAlignment(ABIF_Directory     = parentDir,
                                 REGEX_SuffixForward = "_[0-9]*_F.ab1$",
                             REGEX_SuffixReverse = "_[0-9]*_R.ab1$")

launchApp(ACHLO_contigs)
writeFasta(ACHLO_contigs)
generateReport(ACHLO_contigs)

Created on 2023-03-02 with reprex v2.0.2

My sessionInfo output:
sessionInfo()
#> R version 4.2.2 (2022-10-31)
#> Platform: x86_64-apple-darwin17.0 (64-bit)
#> Running under: macOS Big Sur ... 10.16
#> 
#> Matrix products: default
#> BLAS:   /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib
#> LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
#> 
#> locale:
#> [1] en_AU.UTF-8/en_AU.UTF-8/en_AU.UTF-8/C/en_AU.UTF-8/en_AU.UTF-8
#> 
#> attached base packages:
#>  [1] tools     parallel  stats4    stats     graphics  grDevices utils    
#>  [8] datasets  methods   base     
#> 
#> other attached packages:
#>  [1] sangeranalyseR_1.8.0  logger_0.2.2          BiocStyle_2.26.0     
#>  [4] seqinr_4.2-23         knitr_1.42            rmarkdown_2.20       
#>  [7] openxlsx_4.2.5.2      shinyWidgets_0.7.6    ggdendro_0.1.23      
#> [10] shinycssloaders_1.0.0 excelR_0.4.0          zeallot_0.1.0        
#> [13] DT_0.27               plotly_4.10.1         ggplot2_3.4.1        
#> [16] data.table_1.14.8     shinyjs_2.1.0         shinydashboard_0.7.2 
#> [19] shiny_1.7.4           gridExtra_2.3         sangerseqR_1.34.0    
#> [22] phangorn_2.11.1       reshape2_1.4.4        DECIPHER_2.26.0      
#> [25] RSQLite_2.3.0         Biostrings_2.66.0     GenomeInfoDb_1.34.9  
#> [28] XVector_0.38.0        IRanges_2.32.0        S4Vectors_0.36.2     
#> [31] BiocGenerics_0.44.0   ape_5.7               stringr_1.5.0        
#> 
#> loaded via a namespace (and not attached):
#>  [1] nlme_3.1-162           bitops_1.0-7           fs_1.6.1              
#>  [4] bit64_4.0.5            httr_1.4.5             R.cache_0.16.0        
#>  [7] bslib_0.4.2            utf8_1.2.3             R6_2.5.1              
#> [10] DBI_1.1.3              lazyeval_0.2.2         colorspace_2.1-0      
#> [13] ade4_1.7-22            withr_2.5.0            tidyselect_1.2.0      
#> [16] bit_4.0.5              compiler_4.2.2         cli_3.6.0             
#> [19] sass_0.4.5             scales_1.2.1           quadprog_1.5-8        
#> [22] digest_0.6.31          R.utils_2.12.2         pkgconfig_2.0.3       
#> [25] htmltools_0.5.4        styler_1.9.0           fastmap_1.1.1         
#> [28] htmlwidgets_1.6.1      rlang_1.0.6            rstudioapi_0.14       
#> [31] jquerylib_0.1.4        generics_0.1.3         jsonlite_1.8.4        
#> [34] zip_2.2.2              dplyr_1.1.0            R.oo_1.25.0           
#> [37] RCurl_1.98-1.10        magrittr_2.0.3         GenomeInfoDbData_1.2.9
#> [40] Matrix_1.5-3           Rcpp_1.0.10            munsell_0.5.0         
#> [43] fansi_1.0.4            lifecycle_1.0.3        R.methodsS3_1.8.2     
#> [46] stringi_1.7.12         yaml_2.3.7             MASS_7.3-58.2         
#> [49] zlibbioc_1.44.0        plyr_1.8.8             grid_4.2.2            
#> [52] blob_1.2.3             promises_1.2.0.1       crayon_1.5.2          
#> [55] lattice_0.20-45        pillar_1.8.1           igraph_1.4.1          
#> [58] codetools_0.2-19       fastmatch_1.1-3        reprex_2.0.2          
#> [61] glue_1.6.2             evaluate_0.20          BiocManager_1.30.20   
#> [64] vctrs_0.5.2            httpuv_1.6.9           gtable_0.3.1          
#> [67] purrr_1.0.1            tidyr_1.3.0            cachem_1.0.7          
#> [70] xfun_0.37              mime_0.12              xtable_1.8-4          
#> [73] later_1.3.0            viridisLite_0.4.1      tibble_3.1.8          
#> [76] memoise_2.0.1          ellipsis_0.3.2

> **Comments:**
> **username_0**: I used your code and ran the launchapp() function on the contigs. Below is the error code. Listening onhttp://127.0.0.1:6825 Warning: Error in value[[3L]]: Couldn't normalize path in `addResourcePath`, with arguments: `prefix` = 'AdminLTE-2.0.6'; `directoryPath` = 'F:/biocbuild/bbs-3.16-bioc/R/library/shinydashboard/AdminLTE'   3: runApp   2: print.shiny.appobj   1: <Anonymous>  
> **username_0**: Hi, Thank you for responding back. I am using Windows 10 R version 4.2.2. I edited my question to include the sessioninfo() for the package. I also recently commented the error I encountered from using your code. It's probably because my version of R is not updated because its Windows.  
> **username_0**: Another comment: I tried updating the Bioconductor package but I am using the newest version of it. However, when I used 'BiocManager::install(version='devel')', I ran across this error: Error: Bioconductor version '3.17' requires R version '4.3'; use `BiocManager::install(version = '3.16')` with R version 4.2; see https://bioconductor.org/install'. Is it because I am using Windows? If so, how could I use the example code in another program?  
> **username_0**: Another comment: I knitted your code again and this was the error I encountered:  `Error in parse_block(g[-1], g[1], params.src, markdown_mode) :  Duplicate chunk label 'unnamed-chunk-1', which has been used for the chunk: library(reprex) library(sangeranalyseR) data("sangerAlignmentData") data("sangerContigData") data("sangerReadFData") Calls: <Anonymous> ... process_file -> split_file -> lapply -> FUN -> parse_block                                                                            Execution halted'  
> **username_1**: Looks like you my have a few issues to deal with. One potential issue is your shiny package install. First thing I'd do is, in a new session, reinstall shiny (`install.packages("shiny")`) and run the example code from https://shiny.rstudio.com/gallery/plot-interaction-basic.html, then any issues with shiny and related packages should be able to be identified and solved.  

---

