Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error with GTF file when using htseq-count MDonlin Bioinformatics 13 01-13-2015 08:29 AM
htseq-count error message roll Bioinformatics 3 01-30-2014 02:30 AM
htseq-count error with tophat input moser Introductions 4 10-21-2013 12:35 AM
Strange error when using htseq-count shhuang Bioinformatics 13 11-19-2012 12:40 AM
htseq-count error sissi Bioinformatics 0 03-20-2012 11:40 PM

Thread Tools
Old 02-19-2014, 04:20 AM   #1
Location: Urbana Illinois

Join Date: Jan 2013
Posts: 28
Default Error when using HTSeq count

I used Tophat to produce a bam file from paired end RNAseq data, as well as unpaired reads that were retained after trimming. I then sorted by read name and converted the bam to a sam file. When I run HTSeq with the following arguments:

python -m intersection-strict -s yes 13_accepted_hits.sam Sus_scrofa.gtf

I get an error message:

100000 GFF lines processed.
200000 GFF lines processed.
300000 GFF lines processed.
400000 GFF lines processed.
496967 GFF lines processed.
Error occured when processing SAM input (line 4684 of file 13_acc
'pair_alignments' needs a sequence of paired-end alignments
[Exception type: ValueError, raised in]

It looks to me that there are unpaired reads in the sam file that are causing the problem. Do I have to run separate Tophat alignments with the paired-end and unpaired data, then run the sam files through HTSeq and add the resulting counts together? Is there no way to use HTSeq with a both paired and unpaired reads in the same file? Thanks.
shocker8786 is offline   Reply With Quote
Old 02-19-2014, 05:08 PM   #2
Senior Member
Location: Pathum Thani, Thailand

Join Date: Nov 2009
Posts: 190

HTSeq requires that the file is name sorted, but the default sorting of some programs is position sorting. I had the same problem, resorting by name fixed it. I think it can handle paired end and non paired end in the same file (not certain), the problem comes when the name indicates a paired read but the next line is a diferent read.

samtools sort -n in.bam out.sort
Jeremy is offline   Reply With Quote
Old 02-19-2014, 10:10 PM   #3
Location: Urbana Illinois

Join Date: Jan 2013
Posts: 28

As I said in the original post, I sorted by read name. However I know the unpaired reads have the /1 and /2 read name endings, so maybe that could be the issue?
shocker8786 is offline   Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -8. The time now is 11:47 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO