Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • shocker8786
    Member
    • Jan 2013
    • 28

    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 count.py -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
    epted_hits.sam):
    'pair_alignments' needs a sequence of paired-end alignments
    [Exception type: ValueError, raised in __init__.py:612]

    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.
  • Jeremy
    Senior Member
    • Nov 2009
    • 190

    #2
    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

    Comment

    • shocker8786
      Member
      • Jan 2013
      • 28

      #3
      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?

      Comment

      Latest Articles

      Collapse

      • GATTACAT
        Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
        by GATTACAT
        Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
        Yesterday, 11:43 AM
      • SEQadmin2
        Nine Things a Sample Prep Scientist Thinks About Before Sequencing
        by SEQadmin2


        I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

        Here are nine questions we think about, in roughly the order they matter, before...
        06-18-2026, 07:11 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, 06-30-2026, 05:37 AM
      0 responses
      11 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 06-26-2026, 11:10 AM
      0 responses
      18 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 06-17-2026, 06:09 AM
      0 responses
      52 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 06-09-2026, 11:58 AM
      0 responses
      111 views
      0 reactions
      Last Post SEQadmin2  
      Working...