roblanf / sangeranalyseR

functions to analyse sanger sequencing reads in R
MIT License
95 stars 24 forks source link

batch SangerRead instance generation from AB1 #93

Open christyhandel opened 7 months ago

christyhandel commented 7 months ago

I am looking to quickly analyze and generate FASTA files for n AB1 files. All AB1 files are unrelated to one another, and only F reads exist, i.e., no contigs can be generated from F/R reads of the same sample.

Below is an example code for single AB1 analysis ("sample1") and FASTA generation. I would like to do multiple at a time (hundreds).

sample1 <- file.path(".../sample1_F_A01.ab1")

sample1_sangerReadF <- SangerRead(readFeature    = "Forward Read",
readFileName          = sample1,
geneticCode           = GENETIC_CODE,
TrimmingMethod        = "M1",
M1TrimmingCutoff      = 0.06,
M2CutoffQualityScore  = NULL,
M2SlidingWindowSize   = NULL,
baseNumPerRow         = 100,
heightPerRow          = 200,
signalRatioCutoff     = 0.33,
showTrimmed           = TRUE)

sample1_sangerReadF

sample1_sangerReadF@objectResults@readResultTable

qualityBasePlot(sample1_sangerReadF)

writeFasta(sample1_sangerReadF,
outputDir         = fasta_dir,
compress          = FALSE,
compression_level = NA)

fasta_report <- file.path(".../report")

generateReport(sample1_sangerReadF,
outputDir = fasta_report)

Any help is appreciated. Thanks :)