Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

collapse_isoforms_by_sam.py - can not iterate over samfile without header #199

Open
ckitsoulis opened this issue Mar 4, 2022 · 2 comments

Comments

@ckitsoulis
Copy link

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

@JBreunig
Copy link

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

@ckitsoulis
Copy link
Author

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.

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

No branches or pull requests

2 participants