nanoporetech / dorado

Oxford Nanopore's Basecaller
https://nanoporetech.com/
Other
439 stars 53 forks source link

Question on using dorado trim for barcode removal #909

Closed sachiwije closed 5 days ago

sachiwije commented 6 days ago

Hi I have a simple question about using dorado trim

I did an amplicon sequencing run using the EXP-PBC096. The sequencing was run with live base calling using MinKNOW. However, the HTML report showed that barcode trimming was "off". However, the reads were split into separate folders with barcodes.

Therefore I ran

dorado trim --primer-sequences ~/path_to/16s_ont_primers.fasta --emit-fastq sample.fastq.gz On concatenated fastq.gz files in each barcode folder.

Dorado version to run dorado trimis: v0.7.2

The following versions are the ones in MinKnow MinKNOW core : 5.9.12 Dorado 7.3.11 Bream: 7.9.9 Script Configuration: 5.9.18

The help section of dorado trim mentions "Adapter/primer trimming tool." My question is does this also remove the barcodes?

Thank you

malton-ont commented 6 days ago

Hi @sachiwije,

dorado~trim~ will only trim barcodes when it is also classifying. If you have untrimmed reads, it is safe to barcode again with dorado demux if you use 0.7.1 or later.

See this issue for more details.

sachiwije commented 6 days ago

Thanks. Is it correct to say an amplicon read is when using EXP-PBC096

5'-adaptersequence-barcode-primer-DNAsequence-3'

If dorado trim is run with primer trimming on such a read, the output will be

5'-barcode-DNAsequence-3' ? So basically, stitch the barcode back to the DNA sequence? I am not sure if I am missing something.

malton-ont commented 6 days ago

Hi @sachiwije,

Apologies, I misread your initial message. dorado trim does not attempt to identify barcodes at all - it is dorado demux that will trim barcodes when classifying!

dorado trim will trim everything from the detected adapter/primer position(s). If that includes the barcode due to the ordering of the sections in the kit, then the barcode will also be trimmed.

sachiwije commented 6 days ago

Great! Thank you. I don't have to reprocess the reads :)