jts / nanopolish

Signal-level algorithms for MinION data
MIT License
559 stars 159 forks source link

modbam Null iterator error #1054

Closed GianlucaMattei closed 1 year ago

GianlucaMattei commented 1 year ago

Hello, I am trying to obtain a modbam file using Nanopolish call-methylation:

nanopolish call-methylation -r ${DEFPATH}/${SAMPLE}.fastq -b ${DEFPATH}/${SAMPLE}.${REF}.${ALIGNER}.${VERSION}.srt.bam -g /data2/utility/references/genomics/hs37d5.decoy.fa -t ${THN} -w 7:101458959-101927249 --modbam-output --modbam-output-name ${DEFPATH}/${SAMPLE}.methylcalls.${REF}.${ALIGNER}.${VERSION}.mod.bam

Anyway when I run this command after few seconds I got this error:

[bam process] iterating over region: /data2/gmattei/Nanopore/Methylation/Nanopolish/S1A14.methylcalls.hs37d5.decoy.Minimap2.2.24-r1122.mod.bam
[E::sam_itr_next] Null iterator

Additional info: Originally I had 5 different ONT runs (to increase to coverage), thus I concatenated the fastq files in a single one by:

cat ${DEFPATH}/Runs/${SAMPLE}_run_*/fastq_pass/* > ${DEFPATH}/${SAMPLE}.fastq

during Nanopolish indexing I used the folder containing all the fast5 from the different 5 runs:

ls ${DEFPATH}/Fast5/ S1A14_run_1 S1A14_run_2 S1A14_run_3 S1A14_run_4 S1A14_run_5 all of which contain a fast5_pass folder

The command I used for indexing:

nanopolish index -d ${DEFPATH}/Fast5/ ${DEFPATH}/${SAMPLE}.fastq

I am using the last version of Nanopolish (0.14), I aligned the fastq to hs37d5.decoy.fa with minimap2 (version 2.24-r1122).

Is that a bug or I am doing something wrong? Thanks G.

jts commented 1 year ago

Hi,

I think there is a small error in your command, there should not be a --modbam-output option (providing --modbam-output-name turns modbam mode on).

Jared

On Mon, Jan 23, 2023 at 5:35 AM GianlucaMattei @.***> wrote:

Hello, I am trying to obtain a modbam file using Nanopolish call-methylation:

nanopolish call-methylation -r ${DEFPATH}/${SAMPLE}.fastq -b ${DEFPATH}/${SAMPLE}.${REF}.${ALIGNER}.${VERSION}.srt.bam -g /data2/utility/references/genomics/hs37d5.decoy.fa -t ${THN} -w 7:101458959-101927249 --modbam-output --modbam-output-name ${DEFPATH}/${SAMPLE}.methylcalls.${REF}.${ALIGNER}.${VERSION}.mod.bam Anyway when I run this command after few seconds I got this error:

[bam process] iterating over region: /data2/gmattei/Nanopore/Methylation/Nanopolish/S1A14.methylcalls.hs37d5.decoy.Minimap2.2.24-r1122.mod.bam [E::sam_itr_next] Null iterator

Additional info: Originally I had 5 different ONT runs (to increase to coverage), thus I concatenated the fastq files in a single one by:

cat ${DEFPATH}/Runs/${SAMPLE}run/fastq_pass/ > ${DEFPATH}/${SAMPLE}.fastq

during Nanopolish indexing I used the folder containing all the fast5 from the different 5 runs:

ls ${DEFPATH}/Fast5/ S1A14_run_1 S1A14_run_2 S1A14_run_3 S1A14_run_4 S1A14_run_5

all of which contain a fast5_pass folder

The command I used for indexing:

nanopolish index -d ${DEFPATH}/Fast5/ ${DEFPATH}/${SAMPLE}.fastq

I am using the last version of Nanopolish (0.14), I aligned the fastq to hs37d5.decoy.fa with minimap2 (version 2.24-r1122).

Is that a bug or I am doing something wrong? Thanks G.

— Reply to this email directly, view it on GitHub https://github.com/jts/nanopolish/issues/1054, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC7DH7T67L76JK6JUID4R3WTZNFJANCNFSM6AAAAAAUDVOMBA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

GianlucaMattei commented 1 year ago

Hi, I think there is a small error in your command, there should not be a --modbam-output option (providing --modbam-output-name turns modbam mode on). Jared On Mon, Jan 23, 2023 at 5:35 AM GianlucaMattei @.> wrote: Hello, I am trying to obtain a modbam file using Nanopolish call-methylation: nanopolish call-methylation -r ${DEFPATH}/${SAMPLE}.fastq -b ${DEFPATH}/${SAMPLE}.${REF}.${ALIGNER}.${VERSION}.srt.bam -g /data2/utility/references/genomics/hs37d5.decoy.fa -t ${THN} -w 7:101458959-101927249 --modbam-output --modbam-output-name ${DEFPATH}/${SAMPLE}.methylcalls.${REF}.${ALIGNER}.${VERSION}.mod.bam Anyway when I run this command after few seconds I got this error: [bam process] iterating over region: /data2/gmattei/Nanopore/Methylation/Nanopolish/S1A14.methylcalls.hs37d5.decoy.Minimap2.2.24-r1122.mod.bam [E::sam_itr_next] Null iterator Additional info: Originally I had 5 different ONT runs (to increase to coverage), thus I concatenated the fastq files in a single one by: cat ${DEFPATH}/Runs/${SAMPLE}run/fastq_pass/ > ${DEFPATH}/${SAMPLE}.fastq during Nanopolish indexing I used the folder containing all the fast5 from the different 5 runs: ls ${DEFPATH}/Fast5/ S1A14_run_1 S1A14_run_2 S1A14_run_3 S1A14_run_4 S1A14_run_5 all of which contain a fast5_pass folder The command I used for indexing: nanopolish index -d ${DEFPATH}/Fast5/ ${DEFPATH}/${SAMPLE}.fastq I am using the last version of Nanopolish (0.14), I aligned the fastq to hs37d5.decoy.fa with minimap2 (version 2.24-r1122). Is that a bug or I am doing something wrong? Thanks G. — Reply to this email directly, view it on GitHub <#1054>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC7DH7T67L76JK6JUID4R3WTZNFJANCNFSM6AAAAAAUDVOMBA . You are receiving this because you are subscribed to this thread.Message ID: @.>

Incredible it was just that. Thanks a lot!