nanoporetech / dorado

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

About nanopore data analysis pipeline #373

Closed Flower9618 closed 5 months ago

Flower9618 commented 10 months ago

Hello, I would like to know whether dorado can do the adapter trimming for nanopore DNA sequence.

When I get the nanopore sequence data (.pod5), I need to do the adapter trimming, mapping and methylation calling. But I can not find one tool or some tools which can do these things because of the inconsistence of the file format.

If you have any suggestions, I would really appreciate it.

Thank you.

tijyojwad commented 9 months ago

Hi @Flower9618 - thank you for raising this request. We have adapter trimming high on our priority list and expect to release it within the next couple of releases. In the meantime, you can use the guppy_barcoder standalone tool to trim adapters. So you can basecall with modified bases using dorado and then trim barcodes with guppy_barcoder. Would that unblock you for now?

Flower9618 commented 9 months ago

Hi, @tijyojwad . Thank you so much for your reply. I have two questions and would like to ask for your advice if I basecall with modified bases using dorado and then trim barcodes with guppy_barcoder:

  1. When I basecall with modified bases using dorado, it will tell me the CG position and the methylation state of this CG position, even this CG is on the adapter of the molecule. In other words, the methylation information is based on the original sequence before trimming adapter. So, after I trim adapter with guppy, how can I map the methylation information from dorado into the trimmed sequence.

  2. because my data has no barcode, in this situation, can I use which tool to do the adapter trimming.

Thank you so much.

tijyojwad commented 9 months ago

because my data has no barcode, in this situation, can I use which tool to do the adapter trimming.

Yes adapter trimming can be used without barcodes.

how can I map the methylation information from dorado into the trimmed sequence.

So the trimming tool should take care of that for you, and adjust the methylation tags accordingly so the new tags are relative to the trimmed sequence. I will double check if that's indeed happening.

tijyojwad commented 9 months ago

Hi @Flower9618 - I checked internally and the guppy_barcoder tool doesn't trim the methylation tags. We will be releasing support in the upcoming dorado release for barcode trimming which will have logic for correctly trimming the methylation tags. You could use that logic while adapter trimming support gets added to dorado in a subsequent release.

Psy-Fer commented 9 months ago

Hello,

Please fix it so it reads ubam/usam while you do that. The docs on release for the dorado server said it could do that, and there are args for it, but it doesn't work. Will need that for trimming mod tables... Unless you want to mess around with fastq headers after samtools fastq -T'*'...which I highly doubt.

Cheers, James

ArtRand commented 9 months ago

One other alternative as I brought up in https://github.com/nanoporetech/dorado/issues/381, is to use modkit repair to "fix" the base modification tags after trimming (where the trimming tool does not trim the MM/ML tags). I should add, however, that modkit does not fix the move table, just the MM/ML tags.

Flower9618 commented 9 months ago

Thank you so much for your advice. @ArtRand

HalfPhoton commented 5 months ago

Dorado added adapter detection and trimming in 0.5.0 and all other questions have been answered. Thanks for the feature request!