Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

creating bam files for 6mA and 4mC #1106

Open
Qvdauwer opened this issue Sep 6, 2023 · 1 comment
Open

creating bam files for 6mA and 4mC #1106

Qvdauwer opened this issue Sep 6, 2023 · 1 comment

Comments

@Qvdauwer
Copy link

Qvdauwer commented Sep 6, 2023

Dear,

I would like to use nanopolish to call methylation for 5mC, 6mA, and 4mC.

When I try it using following commands, it works and seems to produce a normal output:

nanopolish call-methylation -v -t 14 -q cpg -r /projects/methylation_work/isolates/Isolates/isolates_29_09_part_2/barcoded/reads/barcode17.fastq.gz -b barcode17_reads_nanopolish_sorted.bam -g /projects/methylation_work/isolates/Isolates/isolates_29_09_part_2/barcoded/assemblies/barcode17_trycycler.fasta > methylation_calls_nanopolish_bc17_29_09_5mC.tsv

nanopolish call-methylation -v -t 14 -q dam -r /projects/methylation_work/isolates/Isolates/isolates_29_09_part_2/barcoded/reads/barcode17.fastq.gz -b barcode17_reads_nanopolish_sorted.bam -g /projects/methylation_work/isolates/Isolates/isolates_29_09_part_2/barcoded/assemblies/barcode17_trycycler.fasta > methylation_calls_nanopolish_bc17_29_09_6mA.tsv

nanopolish call-methylation -v -t 14 -q dcm -r /projects/methylation_work/isolates/Isolates/isolates_29_09_part_2/barcoded/reads/barcode17.fastq.gz -b barcode17_reads_nanopolish_sorted.bam -g /projects/methylation_work/isolates/Isolates/isolates_29_09_part_2/barcoded/assemblies/barcode17_trycycler.fasta > methylation_calls_nanopolish_bc17_29_09_4mC.tsv

But when I add the --modbam-output-name tag, only 5mC works:

nanopolish call-methylation -v -t 14 -q cpg -r /projects/methylation_work/isolates/Isolates/isolates_29_09_part_2/barcoded/rea.gz -b barcode17_reads_nanopolish_sorted.bam -g /projects/methylation_work/isolates/Isolates/isolates_29_09_part_2/barcoded/assemblies/barcode17_trycycler.fasta --modbam-output-name  methyolish_bc17_29_09_5mC.bam
[post-run summary] total reads: 67258, unparseable: 0, qc fail: 58, could not calibrate: 67, no alignment: 2106, bad fast5: 0

nanopolish call-methylation -v -t 14 -q dam -r /projects/methylation_work/isolates/Isolates/isolates_29_09_part_2/barcoded/rea.gz -b barcode17_reads_nanopolish_sorted.bam -g /projects/methylation_work/isolates/Isolates/isolates_29_09_part_2/barcoded/assemblies/barcode17_trycycler.fasta --modbam-output-name  methyolish_bc17_29_09_6mA.bam
nanopolish: src/basemods/nanopolish_basemods.cpp:135: bam1_t* create_modbam_record(const bam1_t*, const std::map<int, ScoredSite>&, const MethylationCallingParameters&): Assertion `callinget->get_name() == "cpg"' failed.
Aborted

nanopolish call-methylation -v -t 14 -q dcm -r /projects/methylation_work/isolates/Isolates/isolates_29_09_part_2/barcoded/rea.gz -b barcode17_reads_nanopolish_sorted.bam -g /projects/methylation_work/isolates/Isolates/isolates_29_09_part_2/barcoded/assemblies/barcode17_trycycler.fasta --modbam-output-name  methyolish_bc17_29_09_4mC.bam
nanopolish: src/basemods/nanopolish_basemods.cpp:37: void get_modification_symbols(const Alphabet*, char&, char): Assertion `alphabet->num_recognition_sites() == 1' failed.
Aborted

Does to conversion to bam output only work for the cpg pattern?

Thanks in advance,
Quentin

@jts
Copy link
Owner

jts commented Sep 6, 2023

Hi,

Yes, the modbam support only works for CpG methylation. If you need modbams for other modifications and contexts I recommend using ONT's callers (guppy/dorado/remora).

Jared

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants