nanoporetech / dorado

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

Using bam files demuxed by Dorado with NanoPlot? #787

Closed tchrisboles closed 6 months ago

tchrisboles commented 6 months ago

Using bam files demuxed by Dorado with NanoPlot?

Please describe the issue:

I ran rapid barcoding library (SQK-RBK114-24) on MinIon using barcodes 1-4. I basecalled the pod5 file and aligned the data to hg38 using dorado basecaller in sup mode. I separated the bam file into bc0X.bam files using dorado demux. After sorting and indexing I tried to run NanoPlot on the files to get run summary data.

I ran NanoPlot on the entire un-demuxed bam file and got the expected NanoPlot output.

When I run NanoPlot on the demuxed bc0X.bam files, NanoPlot throws an error. (I have contacted NanoPlot github about this.)

My question is whether dorado demux bam file headers differ from standard headers produced by dorado basecaller.

Thanks.

tijyojwad commented 6 months ago

Hi - what version of dorado are you using? (please fill out the issue template so we have all that information available)

Does NanoPlot need aligned BAMs? Starting from dorado v0.6.0 running demux after aligning will remove alignment information. That's because by default dorado demux trims barcodes and that invalidates alignment information.

So you can either -

  1. Run demux with --no-trim option which retains alignment info
  2. Run demux with basecalling (i.e. dorado basecaller ... --kit-name SQK-RBK114-24 --reference <ref.fa> > out.bam) followed by dorado demux --no-classify --output-dir <folder> out.bam
tchrisboles commented 6 months ago

Joyjit, yes, I believe NanoPlot does require aligned files when using bam input. Dorado for linux 0.6.1+79b5da5. Your answer makes perfect sense. Many thanks. Issue can be closed.

Best regards,

Chris Boles, Ph.D, Chief Scientific Officer Sage Science, Inc., 500 Cummings Center, Suite 2400, Beverly, MA 01915 Direct Office: +1-978-522-6284, Mobile: +1-781-856-2165 Company: +1-978-922-1832 @.***

This e-mail may contain information that is confidential or privileged. If you are not the intended recipient, do not read, copy or distribute the e-mail or any attachments. Instead, please notify the sender and delete the e-mail and any attachments. Thank you.

On Thu, May 2, 2024 at 12:38 PM Joyjit Daw @.***> wrote:

Hi - what version of dorado are you using? (please fill out the issue template so we have all that information available)

Does NanoPlot need aligned BAMs? Starting from dorado v0.6.0 running demux after aligning will remove alignment information. That's because by default dorado demux trims barcodes and that invalidates alignment information.

So you can either -

  1. Run demux with --no-trim option which retains alignment info
  2. Run demux with basecalling (i.e. dorado basecaller ... --kit-name SQK-RBK114-24 --reference > out.bam) followed by dorado demux --no-classify --output-dir out.bam

— Reply to this email directly, view it on GitHub https://github.com/nanoporetech/dorado/issues/787#issuecomment-2091021229, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH7SXXILJWGIEP35TRB73J3ZAJTYHAVCNFSM6AAAAABHDZSXZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJRGAZDCMRSHE . You are receiving this because you authored the thread.Message ID: @.***>