cDNA_Cupcake icon indicating copy to clipboard operation
cDNA_Cupcake copied to clipboard

collapse_isoforms_by_sam.py - can not iterate over samfile without header

Open ckitsoulis opened this issue 2 years ago • 2 comments

Hello,

This the first time I am using Cupcake to handle IsoSeq data. I am trying to collapse HQ isoforms from IsoSeq reads (FASTA file) with collapse_isoforms_by_sam.py but it fails. I have already tried mapping the reads with minimap2 and GMAP in case the problem was caused by these tools and their produced SAM file, but the result is the same. I'm getting the following error:

''' Traceback (most recent call last): File "/home1/christos_k/software/cDNA_Cupcake/cupcake/tofu/collapse_isoforms_by_sam.py", line 452, in main(args) File "/home1/christos_k/software/cDNA_Cupcake/cupcake/tofu/collapse_isoforms_by_sam.py", line 330, in main region_list_ignore, chunk_regions_list = multiprocess_predefine_regions(args.sam, args.cpus) File "/home1/christos_k/software/cDNA_Cupcake/cupcake/tofu/collapse_isoforms_by_sam.py", line 169, in multiprocess_predefine_regions for prev in reader: File "pysam/libcalignmentfile.pyx", line 1850, in pysam.libcalignmentfile.AlignmentFile.iter NotImplementedError: can not iterate over samfile without header '''

It would be very helpful if you could help me with this problem. Thank you.

Christos

ckitsoulis avatar Mar 04 '22 10:03 ckitsoulis

FYI, I just ran into the same thing only when I tried to use multiple cpus (--cpus). It ran fine with the default 1.

JBreunig avatar Mar 15 '22 02:03 JBreunig

FYI, I just ran into the same thing only when I tried to use multiple cpus (--cpus). It ran fine with the default 1.

Thank you for your response, I will give it a try. However, it seems to work fine with multiple CPUs and BAM file as input.

ckitsoulis avatar Mar 15 '22 09:03 ckitsoulis