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
                  Advancing Precision Medicine for Rare Diseases in Children
                  by seqadmin




                  Many organizations study rare diseases, but few have a mission as impactful as Rady Children’s Institute for Genomic Medicine (RCIGM). “We are all about changing outcomes for children,” explained Dr. Stephen Kingsmore, President and CEO of the group. The institute’s initial goal was to provide rapid diagnoses for critically ill children and shorten their diagnostic odyssey, a term used to describe the long and arduous process it takes patients to obtain an accurate...
                  12-16-2024, 07:57 AM
                • seqadmin
                  Recent Advances in Sequencing Technologies
                  by seqadmin



                  Innovations in next-generation sequencing technologies and techniques are driving more precise and comprehensive exploration of complex biological systems. Current advancements include improved accessibility for long-read sequencing and significant progress in single-cell and 3D genomics. This article explores some of the most impactful developments in the field over the past year.

                  Long-Read Sequencing
                  Long-read sequencing has seen remarkable advancements,...
                  12-02-2024, 01:49 PM

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by seqadmin, 12-17-2024, 10:28 AM
                0 responses
                33 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 12-13-2024, 08:24 AM
                0 responses
                49 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 12-12-2024, 07:41 AM
                0 responses
                34 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 12-11-2024, 07:45 AM
                0 responses
                46 views
                0 likes
                Last Post seqadmin  
                Working...
                X