Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • susanklein
    Senior Member
    • Feb 2014
    • 116

    HTseq error

    Hi,

    anyone know how to solve these cigar type errors in HTseq? Seems ti is unusable until its solved..

    python -m HTSeq.scripts.count in_sorted.bam ref.gff -f bam -s no -t CDS -m union -i locus_tag

    Error occured when reading beginning of SAM/BAM file.
    Unknown CIGAR code '=' encountered.
    [Exception type: ValueError, raised in _HTSeq.pyx:1163]

    Or better yet, another progam to get raw counts from bam and gff files. Don't say 'bedtools' because that doesn't work either.. endlessly gives '0' as all the counts.

    Thanks,

    S.
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    featureCounts is much faster. I'm a little surprised that htseq-count was never updated to support the = and X cigar operators.

    Comment

    • susanklein
      Senior Member
      • Feb 2014
      • 116

      #3
      which package is featureCounts from? I need to script, preferably in python, to handle a large number of bam files, so its hard to interact with R (can't script in R). I guess I will have to learn R!

      s.

      Comment

      • Michael.Ante
        Senior Member
        • Oct 2011
        • 127

        #4
        It seems your bam file is encoded with v1.4, there the CIGAR string distinguishes between matches and missmatches. You can use reformat.sh from the bbmap suite in order to convert from SAM1.4 to SAM1.3. See https://www.biostars.org/p/182156/#182160 and http://seqanswers.com/forums/showthread.php?t=46174
        Last edited by Michael.Ante; 04-12-2016, 12:28 AM. Reason: typo

        Comment

        • dpryan
          Devon Ryan
          • Jul 2011
          • 3478

          #5
          featureCounts is part of the subRead package, which is written in either java or C++ (I'd have to look). We script this in python as well. Since it's a regular executable it's not a problem to do.

          Comment

          • shi
            Wei Shi
            • Feb 2010
            • 236

            #6
            Originally posted by dpryan View Post
            featureCounts is part of the subRead package, which is written in either java or C++ (I'd have to look). We script this in python as well. Since it's a regular executable it's not a problem to do.
            It is written in C (not C++ or java).

            Comment

            • susanklein
              Senior Member
              • Feb 2014
              • 116

              #7
              featureCounts works great. Thanks for the tip.

              Comment

              • GenoMax
                Senior Member
                • Feb 2008
                • 7142

                #8
                Originally posted by shi View Post
                It is written in C (not C++ or java).
                @Wei: Any update on adding support for SAM v.1.4 tags to featureCounts?

                Comment

                • dpryan
                  Devon Ryan
                  • Jul 2011
                  • 3478

                  #9
                  Originally posted by shi View Post
                  It is written in C (not C++ or java).
                  I knew I should have looked this up... :P

                  Comment

                  • shi
                    Wei Shi
                    • Feb 2010
                    • 236

                    #10
                    Originally posted by GenoMax View Post
                    @Wei: Any update on adding support for SAM v.1.4 tags to featureCounts?
                    Hi @GenoMax, could you be more specific on what tags you'd like featureCounts to support?

                    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.
                      07-01-2026, 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, 07-02-2026, 11:08 AM
                    0 responses
                    23 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 06-30-2026, 05:37 AM
                    0 responses
                    23 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 06-26-2026, 11:10 AM
                    0 responses
                    23 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 06-17-2026, 06:09 AM
                    0 responses
                    55 views
                    0 reactions
                    Last Post SEQadmin2  
                    Working...