I put 10 .bam files (from Tophat) through the same samtools & htseq-count commands, and 3/10 didn't work (each with their own error) in htseq.
$ samtools view -h -o sample.sam sample.bam
$ htseq-count --stranded no -i gene_id sample.sam genes.gtf > sample.gene.counts
The errors are:
1) ...596437 GFF lines processed.
Error occured when reading beginning of SAM/BAM file.
[Exception type: StopIteration, raised in count.py:84]
This one particularly confuses me since the program didn't choke on any of the other sam files that were prepared the same way.
2) ...20000000 SAM alignment records processed.
Error occured when processing SAM input (line 20080682 of file TH2/DEprep/BR2_N2In.sam):
('SAM line does not contain at least 11 tab-delimited fields.', 'line 20080682 of file TH2/DEprep/BR2_N2In.sam')
[Exception type: ValueError, raised in _HTSeq.pyx:1276]
3) ...35089676 SAM alignments processed.
[Errno 5] Input/output error
[Exception type: IOError, raised in count.py:212]
Any suggestions for how I should fix these problems?
$ samtools view -h -o sample.sam sample.bam
$ htseq-count --stranded no -i gene_id sample.sam genes.gtf > sample.gene.counts
The errors are:
1) ...596437 GFF lines processed.
Error occured when reading beginning of SAM/BAM file.
[Exception type: StopIteration, raised in count.py:84]
This one particularly confuses me since the program didn't choke on any of the other sam files that were prepared the same way.
2) ...20000000 SAM alignment records processed.
Error occured when processing SAM input (line 20080682 of file TH2/DEprep/BR2_N2In.sam):
('SAM line does not contain at least 11 tab-delimited fields.', 'line 20080682 of file TH2/DEprep/BR2_N2In.sam')
[Exception type: ValueError, raised in _HTSeq.pyx:1276]
3) ...35089676 SAM alignments processed.
[Errno 5] Input/output error
[Exception type: IOError, raised in count.py:212]
Any suggestions for how I should fix these problems?
Comment