Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • saskak
    Member
    • Mar 2011
    • 10

    htseq-count error, AssertionError

    Hi all,

    I am having a bit of a problem with htseq-count. I have single-end stranded RNA-seq experiment, aligned with tophat-2.0.14. SAM file is names sorted and using HTSeq-0.6.1p1 on Mac 10.7.5 with python 2.7. I also tried a few other versions of HTSeq, but it comes out with the same result.

    When trying to run htseq-count:
    htseq-count --stranded=reverse -t exon --idattr=gene_id --mode=intersection-nonempty ./test.sam ./gtf.gtf > ./htseq_count.txt

    I get this error message:
    Error:
    [Exception type: AssertionError, raised in __init__.py:599]


    Here are a few lines of my sam file:
    HWI-ST1146:240:C5HD2ACXX:1:1101:1040:33602 16 X 13759664 50 100M * 0 0 GGATGCCTCCAATGACCGACTGAAGCCGACCAAGTGGCTGACCGCCACCGAGCTGGAGAACGTGCCCTNCCTCAACGACATCACCTGGGAGCGTTTGGAG
    C<C@BBCCCCECB>9BCCDCCC<<5BBC>CCCCCBCC?@>9CDA<HGGIFIIGHFF<HHIIIIGGB:0#IGIHGFHFEHEDHEIIIIHHH@HFFFFF@@@ AS:i:-1 XN:i:0 XM:i:1 XO:i:0 XG:i:0 NM:i:1 MD:Z:68C31 YT:Z:UU NH:i:1 XS:A:+
    HWI-ST1146:240:C5HD2ACXX:1:1101:1041:2544 0 2L 450124 50 68M1I30M * 0 0 GATCCATTCGCCCACCGGCTTGGTTACGTACNACTTTCCGCCTTCATGGTTCAGCATAAAGTTTATGATTTTTTTTGACGATCTTGCGCTGGTCTCGCA
    CCCFFFFFHFHHHJJJIIIJJHIBBFEHHHI#08?FHIIJJJGIJEHIJ=@AEA?AHFBE@7;@CCCCEEEDCB@@>?CBB@BDDCDDDBBBCDCDC<@ AS:i:-9 XN:i:0 XM:i:1 XO:i:1 XG:i:1 NM:i:2 MD:Z:31A66 YT:Z:UU NH:i:1 XS:A:-
    HWI-ST1146:240:C5HD2ACXX:1:1101:1041:10782 0 2L 2191942 50 100M * 0 0 CGCTCATTCACATAGGTCACCTTGGTGGCCGNTTGACCCTGGCCCTGGCTCTTGTCCTTCTCCTTTTCGGATATCGTCCTCTCGATGGAGCAGGAGGCCG CC@FFFFFGDFHHJJJEGGJI@HIJHJJJJJ#1?DFHIGIJIIIGHIIGIJJJJIJIJJJJJIJEEHDE6BFCCE=CBDDDDDDCDDDCBDDDDD?BBB5 AS:i:-1 XN:i:0 XM:i:1 XO:i:0 XG:i:0 NM:i:1 MD:Z:31C68 YT:Z:UU NH:i:1 XS:A:-
    HWI-ST1146:240:C5HD2ACXX:1:1101:1041:30995 16 3R 7900087 50 100M * 0 0 AAGGCAAGGATCCACCTTTCCTGCTAGAAGTCAGCGCACAAATCACTTTTGTTCTGTTCCTGCTGTTCNTGACCATCATTCTGATGAACCTGCTCGTGGG @:?CA>ACA><B@:9DDDBADDCA@CDDCEADFFHCHCIHG@@@7FHDHJIJIJIIHIGFIHEGB?11#IHGIIIIHFCHJJHGFEBHHHFFDDFFFCC@ AS:i:-1 XN:i:0 XM:i:1 XO:i:0 XG:i:0 NM:i:1 MD:Z:68G31 YT:Z:UU NH:i:1 XS:A:+
    HWI-ST1146:240:C5HD2ACXX:1:1101:1041:48103 16 2L 14617161 50 100M * 0 0 AACCAGAACGGAGCCATCTGGAAACTGGACTTGGGCGCCCTGGAGGCCATCCAGTGGACCAAGCACTGNGACTCCGGCATCTAAGAAGTGATACTCCCAA
    >BBBABBBBBBA4>BAA>;A@;5>@:BB?B?695(ECECEE@FAC@CCFEFFFDEFIEF??;F?:0#IIFGFCBAIHHEBEEIIIFFFA:=DDDD@@@ AS:i:-3 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:36A31G31 YT:Z:UU NH:i:1 XS:A:+


    If I use another experiment with paired-end reads it works without a problem. As far as I can get it is an error related to "paired-end handling", although my reads are single-end.
    It would appear that htseq-count recognises my reads as paired-end rather than single-end. It also does not matter if I have selected stranded= yes,no or reverse, same error.

    Would really appreciate any help.
  • saskak
    Member
    • Mar 2011
    • 10

    #2
    Forgot to say that tophat was supplied with --library fr-firststrand

    Comment

    • dpryan
      Devon Ryan
      • Jul 2011
      • 3478

      #3
      What happens if you do a "samtools view -f 1 -c test.sam"? If you have even a single alignment with an incorrect pairing flag then that'll break things.

      Comment

      • saskak
        Member
        • Mar 2011
        • 10

        #4
        Originally posted by dpryan View Post
        What happens if you do a "samtools view -f 1 -c test.sam"? If you have even a single alignment with an incorrect pairing flag then that'll break things.
        I get 0 with samtools view -f 1 -c test.sam

        All of the flags are either 0 or 16. htseq-count breaks on the first read it encounters.

        Comment

        • saskak
          Member
          • Mar 2011
          • 10

          #5
          It is probably something to do with my htseq installation, as the same input works on fedora 20.
          I still cannot understand, if it is installation problem, why would the same installation work with paired-end data and not with single-end.

          Comment

          • dpryan
            Devon Ryan
            • Jul 2011
            • 3478

            #6
            Very strange indeed. To tell you the truth, I'm not sure where exactly that assert is being called. The most likely __init__.py on that version of HTSeq that I have installed locally doesn't have an assert() on that line. I suspect that you're correct about this being a weird installation problem. Perhaps just deinstalling/reinstalling will fix things.

            Comment

            • GenoMax
              Senior Member
              • Feb 2008
              • 7142

              #7
              @saskak: Are those two installs using two different default versions of python?

              Comment

              • saskak
                Member
                • Mar 2011
                • 10

                #8
                Originally posted by GenoMax View Post
                @saskak: Are those two installs using two different default versions of python?
                These are two different installs, one on MacOsX and another on fedora 20. Both are the default versions of python (2.7)
                Last edited by saskak; 07-06-2015, 04:07 AM.

                Comment

                Latest Articles

                Collapse

                • SEQadmin2
                  Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
                  by SEQadmin2



                  Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
                  ...
                  07-09-2026, 11:10 AM
                • SEQadmin2
                  Cancer Drug Resistance: The Lingering Barrier to Rising Survival
                  by SEQadmin2



                  Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

                  There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
                  07-08-2026, 05:17 AM
                • 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.
                  07-01-2026, 11:43 AM

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by SEQadmin2, 07-13-2026, 10:26 AM
                0 responses
                20 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 07-09-2026, 10:04 AM
                0 responses
                30 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 07-08-2026, 10:08 AM
                0 responses
                17 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 07-07-2026, 11:05 AM
                0 responses
                34 views
                0 reactions
                Last Post SEQadmin2  
                Working...