dorado icon indicating copy to clipboard operation
dorado copied to clipboard

How can we demultiplex, duplex calls only?

Open AyshaSezmis opened this issue 1 year ago • 10 comments

Hi Dorado team,

I have performed dorado duplex calls, then from the resulting BAM file, I have used the below command to only compile a bam file consisting of duplex calls: samtools view recovered_duplex.bam | grep "dx:i:1"| samtools view -O BAM -o Duplex_only.bam

Then I use samtools sort to sort the resulting bam file before using guppy_barcoder to demultiplex it, but guppy throws everthing into unclassified directory, no barcodes have been demultiplexed.

On the other hand, guppy demultiplexs the original bam file including the simplex calls (e.g. recovered_duplex.bam), however, when i closely inspect the resulting barcoded files, I only see simplex calls that are demultiplexed, I can not detect any of the duplex calls.

Is this an intended outcome? If so, how can we demultiplex duplex called reads also?

Many thanks for your help, Best wishes, Aysha

AyshaSezmis avatar Jun 01 '23 20:06 AyshaSezmis

Hey @AyshaSezmis

Is this an intended outcome? If so, how can we demultiplex duplex called reads also?

Yes, this is expected as the duplex calls will no longer contain the barcodes. The simplest approach would be to duplex call the demultiplexed simplex reads again. We will think about how to make this easier for the next release of dorado.

iiSeymour avatar Jun 01 '23 22:06 iiSeymour

Hi @iiSeymour

Hey @AyshaSezmis

Is this an intended outcome? If so, how can we demultiplex duplex called reads also?

Yes, this is expected as the duplex calls will no longer contain the barcodes. The simplest approach would be to duplex call the demultiplexed simplex reads again. We will think about how to make this easier for the next release of dorado.

This doesn't sound like a simple approach at all... Can you elaborate on that? How do you run dorado on the "demultiplexed simplex reads", I thought that you needed the raw pod5 files for it?

Thanks!

IdoBar avatar Jun 29 '23 00:06 IdoBar

That is unfortunate and makes it all the more annoying that guppy doesn't demultiplex the raw files anymore right now (except during live basecalling for some reason....). If that were still possible you could just feed the demultiplexed pod5s to dorado. Even though you'd have to basecall twice. Please quickly finish work on dorado built in demultiplexing (including demultiplexing and outputting demultiplexed pod5s for later reuse).

JWDebler avatar Jul 05 '23 03:07 JWDebler

Hi!

As you recommended I will duplex call the simplex demultiplexed reads. However, as mentioned above I will need pod5 files. So, a way could be to recover the reads corresponding to each barcode separately by their ID in the original pod5 files. Do you have a solution available to recover specific reads from pod5 files?

Thanks!

HannahBenisty avatar Jul 05 '23 08:07 HannahBenisty

Hi @HannahBenisty - the pod5 documentation to filter data by read-ids is here - https://pod5-file-format.readthedocs.io/en/latest/docs/tools.html#pod5-filter

tijyojwad avatar Jul 05 '23 12:07 tijyojwad

Is there anything new on this (maybe with version 0.4.0) ? It seems to be a huge waste not to be able to leverage duplex calls in barcoded runs since they are in the data. Does anybody have a way of doing this (maybe with other tools than dorado) ?

vdruelle avatar Oct 12 '23 13:10 vdruelle

Hi @vdruelle - we're currently working on enabling barcode demultiplexing for duplex, and should be available in the next release.

tijyojwad avatar Oct 12 '23 14:10 tijyojwad

Great, looking forward to it then ! :)

vdruelle avatar Oct 13 '23 12:10 vdruelle

Hi @tijyojwad,

just wanted to check if barcode demultiplexing has been integrated into dorado duplex yes, since there have been several releases since October, but I haven't seen anything about it in the release notes (or missed it). Cheers.

JWDebler avatar Aug 12 '24 05:08 JWDebler

Hi @JWDebler,

This is on hold at the moment while we work on other priorities.

malton-ont avatar Aug 21 '24 10:08 malton-ont