nanoporetech / dorado

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

Demuxing custom barcodes giving all unclassified reads #640

Closed kaiseriskera closed 3 months ago

kaiseriskera commented 4 months ago

Hello! I'm currently attempting to use Dorado (dorado-0.5.3-osx-arm64) for demultiplexing my sequencing bam file. I have roughly around ~5500 unique barcodes and they do not belong to any kit, and thus used the --barcode-arrangement and --barcode-sequences option. All barcodes are 12-mer long and flanked by the prefix "CCACCCAG" and suffix "CAATTGGC" as shown below:

------------ Read ------------ CCACCCAGNNNNNNNNNNNNCAATTGGC ----

I have tried tweaking the scoring options but I'm still getting only unclassified bam.

This is my command for demultiplexing: /Users/User1/Downloads/dorado-0.5.3-osx-arm64/bin/dorado demux --barcode-arrangement /Users/User1/Downloads/VEM/custom_barcode.toml --barcode-sequences /Users/User1/Downloads/VEM/Results/Barcode_QC/custom_barcodes.fa --output-dir /Users/User1/Downloads/VEM/Results/demux /Users/User1/Downloads/VEM/Data/splicelib_5k.bam

I have also attached my toml and custom barcodes fasta files for your reference.

custom_barcode.toml

Screenshot 2024-02-20 at 8 55 07 AM

custom_barcodes.fa

Screenshot 2024-02-20 at 8 55 15 AM

Will appreciate any help! Thank you!

ethan-mcq commented 4 months ago

Have you looked for your barcode sequence in your bam file when opening it? We ran into a few runs where this happened, but it was due to barcodes not actually ligating onto the strand.

tijyojwad commented 3 months ago

Hi @kaiseriskera - are your barcodes only at the 3' end of the read? When only mask1_* is specified, dorado looks at the 5' end to find the barcode, ignoring the 3' end. We at present don't support specifying 3' end barcodes only (although we're working on adding that to a future release).

For your use case, I would suggest also adding mask2_* and barcode2_pattern with the same flank/sequence information which will force dorado to look at both ends. It won't find anything on the 5' end but any confident hits on the 3' will lead to a classification.

tijyojwad commented 3 months ago

Hi @kaiseriskera - closing this for since I haven't heard from you. Please re-open if you still need help.