Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • htseq-count error RNAME == '*' although flag bit &0x0004 cleared"

    Hi all

    I do rna-seq , after tophat mapping, I got 6 aligned.bam file . And I played them by Cuffdiff, it works. However, if I try Htseq-count on 6 aligned.bam file (I have sorted and transfer it to SAM), one of them have error and hence I cannot get the counts table.

    The error is

    Error occured when processing SAM input (line 4241616 of file aligned_sn.sam): ("Malformed SAM line: RNAME == '*' although flag bit &0x0004 cleared", 'line 4241616 of file aligned_sn.sam') [Exception type: ValueError, raised in _HTSeq.pyx:1294]

    I check the line 4241616 of SAM file, it is

    B500959:23:HW5G2BGXX:1:21303:20052:4160 0 * 411525 50 22M1949N18M * 0 0 AAAGAATCAAGAGCTGCAGCGGGCAAGGCAGAGAGAGAAG AAAAAEEEEE6EEEEAEEEEEEEE/EE<EEEEAEEEEEEE AS:i:0 XM:i:2 XO:i:0 XG:i:0 MD:Z:0G18T20 NM:i:2 XS:A:+ NH:i:1
    I don't know why does it happen because it is first time I have this error, I am very confused. I know RNAME == '*' means an unmapped segment without coordinate.

    Now I want to know

    (1)Why does it happen?
    (2)What will I do?

    Thank you!

  • #2
    Somehow you corrupted your BAM file, that alignment your showed shouldn't exist. Go back through your processing and try to determine when this alignment was introduced in this form and correct however that was done. My guess is that at some point you changed a BAM header and jumbled things up.

    Comment


    • #3
      Originally posted by dpryan View Post
      Somehow you corrupted your BAM file, that alignment your showed shouldn't exist. Go back through your processing and try to determine when this alignment was introduced in this form and correct however that was done. My guess is that at some point you changed a BAM header and jumbled things up.
      1.Do you mean I need to re-map the sample?
      2. Doe it mean that My cuffdiff could also potentially have problem?
      I ran 6 samples in a loop (Mapping, sorting BAM, Counting Reads)and hence I think the error shouldn't happen. But it happened, strange....
      Thank you!

      Comment


      • #4
        Originally posted by super0925 View Post
        1.Do you mean I need to re-map the sample?
        2. Doe it mean that My cuffdiff could also potentially have problem?
        I ran 6 samples in a loop (Mapping, sorting BAM, Counting Reads)and hence I think the error shouldn't happen. But it happened, strange....
        Thank you!
        1. Maybe, depends on where the problem occurred.
        2. I wouldn't trust the cuffdiff results if you fed it this file.

        Comment


        • #5
          Originally posted by dpryan View Post
          1. Maybe, depends on where the problem occurred.
          2. I wouldn't trust the cuffdiff results if you fed it this file.
          OK. I will try re-run it.
          I use
          Code:
          tophat2 -o outdir  --library-type fr-firststrand --keep-fasta-order --GTF genes.gtf  genome.fa Trimmed.fastq
          and get the aligned.bam, which I don't think there are any problems.
          However, Cuffdiff got the differential expression results on the bam file I talked above, which is beyond my expection...

          Comment


          • #6
            Originally posted by dpryan View Post
            1. Maybe, depends on where the problem occurred.
            2. I wouldn't trust the cuffdiff results if you fed it this file.
            Sorry I got SAME error!!
            I re-run the tophat, get the accepted_hits.bam , command is as follows:

            Code:
            [B]tophat2 -o outdir  --library-type fr-firststrand --keep-fasta-order --GTF genes.gtf  genome.fa Trimmed.fastq
            samtools sort -o aligned.bam -n -@ 8 accepted_hits.bam
            samtools view -o aligned.sam aligned.bam
            htseq-count -s yes aligned.sam genes.gtf>subset[/B]
            But I still get the error:

            Error occured when processing SAM input (line 4240949 of file Hor_sn.sam):
            ("Malformed SAM line: RNAME == '*' although flag bit &0x0004 cleared", 'line 4240949 of file Hor_sn.sam')
            [Exception type: ValueError, raised in _HTSeq.pyx:1294]


            But this time is not 'line 4241616' but 'line 4240949 '. both SAM files have 1 row with '*' at column 3, on line 4241616 and 4240949 , respectively.
            Last edited by super0925; 04-29-2016, 07:18 AM.

            Comment


            • #7
              Weird, I assume this same alignment is in the original "accepted_hits.bam" file. What happens if you don't specify "--keep-fasta-order"?

              Comment


              • #8
                Originally posted by dpryan View Post
                Weird, I assume this same alignment is in the original "accepted_hits.bam" file. What happens if you don't specify "--keep-fasta-order"?
                Hi D
                I tried it, but still get the error.
                "Error occured when processing SAM input (line 4240949 of file aligned.sam):
                ("Malformed SAM line: RNAME == '*' although flag bit &0x0004 cleared", 'line 4240949 of file aligned.sam')
                "
                What is your suggestion?
                Leave it and only stick to Cuffdiff? Or remove this line in SAM and to do HTseq and edgeR?
                Thank you!

                Comment

                Latest Articles

                Collapse

                • seqadmin
                  Strategies for Sequencing Challenging Samples
                  by seqadmin


                  Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                  03-22-2024, 06:39 AM
                • seqadmin
                  Techniques and Challenges in Conservation Genomics
                  by seqadmin



                  The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

                  Avian Conservation
                  Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
                  03-08-2024, 10:41 AM

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by seqadmin, 03-27-2024, 06:37 PM
                0 responses
                12 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 03-27-2024, 06:07 PM
                0 responses
                11 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 03-22-2024, 10:03 AM
                0 responses
                53 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 03-21-2024, 07:32 AM
                0 responses
                69 views
                0 likes
                Last Post seqadmin  
                Working...
                X