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

              • SEQadmin2
                Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
                by SEQadmin2



                Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
                ...
                07-09-2026, 11:10 AM
              • SEQadmin2
                Cancer Drug Resistance: The Lingering Barrier to Rising Survival
                by SEQadmin2



                Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

                There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
                07-08-2026, 05:17 AM
              • 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

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by SEQadmin2, Yesterday, 10:26 AM
              0 responses
              13 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-09-2026, 10:04 AM
              0 responses
              26 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-08-2026, 10:08 AM
              0 responses
              16 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-07-2026, 11:05 AM
              0 responses
              33 views
              0 reactions
              Last Post SEQadmin2  
              Working...