Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • cdry7ue
    Member
    • Feb 2011
    • 20

    SAM header missing in BFAST

    Nils,
    I am using the command
    bfast postprocess -f ref.fa -i run8.baf > run8.sam
    I get the sam file but the header is missing. Is there a qucik way to get the header in there too.
    thanks
    -Ashish
  • nilshomer
    Nils Homer
    • Nov 2008
    • 1283

    #2
    Note: I moved this to its own thread since it had nothing to do with the previous thread.

    The header is printed by BFAST and should not be missing. Could you post "head run8.sam"? Were there any warning/error messages?

    Nils

    Comment

    • cdry7ue
      Member
      • Feb 2011
      • 20

      #3
      Nils,
      My bad, there is no problem with BFAST. I was trying to have RSamtools package read a sam file and it was producing an error, apparently it only reads bam.

      > X<-readBamGappedAlignments('run8_12.sam')
      Error in .io_bam(.scan_bam, file, index, reverseComplement, tmpl, param = param) :
      SAM/BAM header missing or empty
      file: 'X:\Ashish\nextgen\ion3\bfast_processed\run8_12.sam'

      However it works once it is turned into bam using samtools
      samtools view -bS run8_default.sam >run8_default.bam

      X<-readBamGappedAlignments('run8_default.bam')

      Nils I was wondering if there is a way to filter reads from the .baf file based on the real
      alignment quality score.(Also is there anyway this score can be seen in the sam file to filter on later ?) E.g. I would want to keep the read with score 3550, while getting rid of the read with -250 in score column(see below).

      @MNZKY:4:144 0 1
      GTG..bla.. :>>..bla..bla.. 1
      1 1 + 3550 255 103 gtgc…bla..bla
      @MNZKY:4:127 0 1
      GTG..bla.. ))..bla..bla.. 1
      1 1 + -250 255 108 gtgc…bla..bla

      Thanks for your quick response....

      Comment

      • nilshomer
        Nils Homer
        • Nov 2008
        • 1283

        #4
        Take a look at "bfast postprocess". You can also remove low quality alignments from the SAM by using the AS tag.

        Comment

        • cdry7ue
          Member
          • Feb 2011
          • 20

          #5
          I was wondering if there is scripts that are available to do that. If not I could always write my own to shave off lines with less than desired AS values. Btw are there any other dependencies in SAM like number of lines etc in the header?

          Comment

          • cdry7ue
            Member
            • Feb 2011
            • 20

            #6
            Nils,
            I was wondering if the type of quality score encoding would alter the workings of BFast in any way. I am guessing as long as it is of PHRED type, the offset of 33 or 64 (Illumina) shouldnt really matter, since you are probably using some type of additive scheme in you local smith waterman scoring algorithm?
            Thanks
            Ashish

            Comment

            • nilshomer
              Nils Homer
              • Nov 2008
              • 1283

              #7
              Originally posted by cdry7ue View Post
              Nils,
              I was wondering if the type of quality score encoding would alter the workings of BFast in any way. I am guessing as long as it is of PHRED type, the offset of 33 or 64 (Illumina) shouldnt really matter, since you are probably using some type of additive scheme in you local smith waterman scoring algorithm?
              Thanks
              Ashish
              It doesn't matter in BFAST, but since the quality string is directly outputted to the SAM file, it may not be compliant if the qualities are in +64 format. My advice is to always have them in Sanger PHRED format.

              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
              11 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 06-30-2026, 05:37 AM
              0 responses
              14 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 06-26-2026, 11:10 AM
              0 responses
              20 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 06-17-2026, 06:09 AM
              0 responses
              54 views
              0 reactions
              Last Post SEQadmin2  
              Working...