Question: HTSeq: Error at the end of HTSeq analysis and an output of .count file with 0 byte
0
gravatar for saywhoa
3.7 years ago by
saywhoa0
Canada
saywhoa0 wrote:

At the beginning of the process I get this warning:

Warning: Read HS1_07961:1:1308:18104:63516#3 claims to have an aligned mate which could not be found in an adjacent line.

Then, at the end of the SAM file, I get:

10800000 SAM alignment record pairs processed.
10900000 SAM alignment record pairs processed.
Error occured when processing SAM input (record #11138334 in file 7961_1_3.bam):
  reference_id -1 out of range 0<=tid<22
  [Exception type: ValueError, raised in calignmentfile.pyx:640]

and my output .count file was empty, with 0 byte.

The code I entered for this process is: htseq-count -f bam -s no -a 10 7961_1_3.bam Mus_musculus.GRCm38.82.gtf > 7961_1_3.count

note that my BAM files contain pair ended strands.

 Any help will be appreciated!
 Thank you in advance.

 

rna-seq htseq • 2.0k views
ADD COMMENTlink modified 3.7 years ago by Biostar ♦♦ 20 • written 3.7 years ago by saywhoa0

What's the output of samtools view 7961_1_3.bam | awk '{if(NR==11138334) print $0}'? It's likely that there's a malformed line.

ADD REPLYlink written 3.7 years ago by Devon Ryan90k
is this thw last line of the bam file? maybe it's truncated, for some reason...
ADD REPLYlink written 3.7 years ago by Martombo2.4k

Is your bam sorted by name? htseq-count expects pairs to be sorted by name, thus they should be on adjacent lines.
 

ADD REPLYlink written 3.7 years ago by h.mon26k

GTF file wrong?

ADD REPLYlink written 3.7 years ago by Alex Voronin10

How was the BAM file generated? Does it pass Picard tools validation?

ADD REPLYlink written 3.7 years ago by Chris Cole680
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1889 users visited in the last hour