Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Dethecor
    replied
    pysam dependency

    Hi all,

    indeed certain functions in HTSeq depend on an installed pysam. We have changed this so that now this error is only raised if one actually tries to call one of these functions while not having pysam installed.
    HTSeq version 0.5.3p7 includes this change (if you do not want to upgrade you can always just install pysam)

    Cheers,
    Paul

    Leave a comment:


  • EGrassi
    replied
    Originally posted by phred View Post
    Thanks chad for the workaround, I will give it a try.

    Having installed HTSeq 0.5.3p6, I now get the following message:

    Code:
    $ htseq-count
    
    Traceback (most recent call last):
      File "/home/support/apps/cports/rhel-6.x86_64/gnu/HTSeq/0.5.3p6_Python_2.7.2/bin/htseq-count", line 3, in <module>
        import HTSeq.scripts.count
      File "/home/support/apps/cports/rhel-6.x86_64/gnu/HTSeq/0.5.3p6_Python_2.7.2/lib/python/HTSeq/__init__.py", line 8, in <module>
        from _HTSeq import *
      File "_HTSeq.pyx", line 11, in init HTSeq._HTSeq (src/_HTSeq.c:30228)
    ImportError: No module named pysam
    I am wondering has anyone else encountered this?
    Yep, but I solved it installing pysam from http://pysam.googlecode.com/files/pysam-0.6.tar.gz !

    Leave a comment:


  • phred
    replied
    Thanks chad for the workaround, I will give it a try.

    Having installed HTSeq 0.5.3p6, I now get the following message:

    Code:
    $ htseq-count
    
    Traceback (most recent call last):
      File "/home/support/apps/cports/rhel-6.x86_64/gnu/HTSeq/0.5.3p6_Python_2.7.2/bin/htseq-count", line 3, in <module>
        import HTSeq.scripts.count
      File "/home/support/apps/cports/rhel-6.x86_64/gnu/HTSeq/0.5.3p6_Python_2.7.2/lib/python/HTSeq/__init__.py", line 8, in <module>
        from _HTSeq import *
      File "_HTSeq.pyx", line 11, in init HTSeq._HTSeq (src/_HTSeq.c:30228)
    ImportError: No module named pysam
    I am wondering has anyone else encountered this?

    Leave a comment:


  • chadn737
    replied
    A very quick and dirty workaround that I used until they fixed the problem in Tophat and since I'm really not familiar with Python was to replace the missing quality scores with the read sequence itself. That way its guaranteed to be the same length as the read and HTSeq-count is happy.

    Code:
    awk '$11=="*"' accepted_hits.sam > noquals.sam;
    awk '$11 !~ /^\*$/' accepted_hits.sam > tmp.sam;
    awk 'FNR==NR{a[NR]=$10;next}{$11=a[FNR]}1' noquals.sam noquals.sam > tmp2.sam;
    awk -v OFS="\t" '$1=$1' tmp2.sam > tmp3.sam
    cat tmp.sam tmp3.sam > accepted_hits2.sam;
    rm tmp.sam tmp2.sam tmp3.sam noquals.sam;
    Then just run HTSeq-count on the accepted_hits2.sam

    Not pretty (I'm still a novice at this stuff, so I settle for what works for me), but it gets the job done if you don't want to realign it and if you don't want to fiddle around with the HTSeq-count code. Of course if Simon Anders has fixed the issue, then thats obviously a better solution than this.

    Leave a comment:


  • EGrassi
    replied
    Yep, thanks! Now that problem does not occur anymore.
    It's claiming to have some troubles about the sort order of the bam (which cuffdiff used without problems) but as long as I've not read all the docs it's my time to work now

    Leave a comment:


  • Simon Anders
    replied
    Sorry, it seems we made some mix-up between version 0.5.3p4 and 0.5.3p5. Essentially, p5 undid some fixes in p4, including the one for "*" qualities. Now, there is version 0.5.3p6, which should clean up this mess. Please let me know if you still have problems.

    Leave a comment:


  • EGrassi
    replied
    Originally posted by phred View Post
    Code:
    >htseq-count
    ....
    
    >Released under the terms of the GNU General
    >Public License v3. Part of the 'HTSeq' framework, version 0.5.3p3.
    I presume the footnote was just not updated with the new release?

    Same here. Re-aligning all the reads with the new tophat would be cumbersome, I'll try to dig in the python and find a workaround...

    Leave a comment:


  • dharan
    replied
    Hi
    As far as I know, I think the only option will be to rerun the TopHat with the new version (v2.3). I think the only problem is dealing with the * qualities in the sam files and that has been resolved in the latest version.

    Leave a comment:


  • phred
    replied
    I am having the same issue with HTSeq dealing with alignments from Tophat 2.

    I installed HTSeq/0.5.3p5 but the issue persists. The alignments were done using Tophat 2.0.0

    Code:
    Error occured in line 36 of file R13a_m_accepted_hits.sam.
    Error: ("'seq' and 'qualstr' do not have the same length.", 
    'line 36 of file R13a_m_accepted_hits.sam')
    [Exception type: ValueError, raised in _HTSeq.pyx:765]
    It would like to avoid having to re-align all of my samples with a newer version of Tophat. Any suggestions?

    Incidentally, when I was checking the installation as suggested above, the following appears with the v0.5.3p5 of HTSeq:


    Code:
    >htseq-count
    ....
    
    >Released under the terms of the GNU General
    >Public License v3. Part of the 'HTSeq' framework, version 0.5.3p3.
    I presume the footnote was just not updated with the new release?

    Leave a comment:


  • dharan
    replied
    Originally posted by chadn737 View Post
    As an aside, the latest version of Tophat 2 no longer has the "*" qualities problems.
    TopHat new version (v2.03) has now solved the problem caused in HTSeq.

    Thanks a lot..!!

    Leave a comment:


  • chadn737
    replied
    As an aside, the latest version of Tophat 2 no longer has the "*" qualities problems.

    Leave a comment:


  • dharan
    replied
    May be there might be a problem with the installation. I will go through it again and let you know if there are any problems still.
    Thanks

    Leave a comment:


  • maubp
    replied
    Can you double check which HTSeq you are using? Perhaps an older copy is taking precedence in your PATH, or the update didn't install properly.

    Leave a comment:


  • dharan
    replied
    Hi,

    Here is the line from that file:


    HWI-ST790:1:1101:1261:140607#ACTTGA 329 contig_126150 342 3 100M * 0 0 GTCCAGGTTGGTGGACCTCTCAATCATGTTGTCACCCTCAAACCCAGAGATGGGGACGAAGGGAACCTTGTTAGGGTTGTAGCCGACCTTCTTCAGGTAG * AS:i:-7 XN:i:0 XM:i:2 XO:i:0 XG:i:0 NM:i:2 MD:Z:3A67C28 YT:Z:UU NH:i:2 CC:Z:contig_223383 CP:i:208 HI:i:0

    Cheers,
    Dharanya

    Leave a comment:


  • maubp
    replied
    It would be nice if the HTSeq error message included the two unmatched lengths - but can you show us what line 2671032 of your input file is? This may not be due to the * for missing qualities at all, but a real error in the data.

    Leave a comment:

Latest Articles

Collapse

  • SEQadmin2
    Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
    by SEQadmin2



    Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

    Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
    ...
    10-14-2026, 09:55 AM
  • SEQadmin2
    New Genomics Technologies Take Aim at Long-Standing Limits
    by SEQadmin2


    Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

    We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
    ...
    09-28-2026, 10:25 AM

ad_right_rmr

Collapse

News

Collapse

Topics Statistics Last Post
Started by SEQadmin2, 10-22-2026, 11:13 AM
0 responses
26 views
0 reactions
Last Post SEQadmin2  
Started by SEQadmin2, 10-22-2026, 10:48 AM
0 responses
20 views
0 reactions
Last Post SEQadmin2  
Started by SEQadmin2, 10-15-2026, 10:52 AM
0 responses
36 views
0 reactions
Last Post SEQadmin2  
Started by SEQadmin2, 10-14-2026, 05:39 AM
0 responses
43 views
0 reactions
Last Post SEQadmin2  
Working...