Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fznajar
    Member
    • Jan 2012
    • 35

    #1

    Blast to SAM

    I converted my BlasyN to SAM using:

    blast2sam.pl <blastN file> > <output file>

    I then tried to generate a "bam" file using:

    samtools view -bT <reference.fasta> <sam file> -o <bam output>


    I got the following output:
    [sam_header_read2] 0 sequences loaded.
    [samopen] no @SQ lines in the header.
    [sam_read1] missing header? Abort!

    Any help?

    Thanks in advance
  • seqeve
    Junior Member
    • Oct 2012
    • 4

    #2
    If the header is absent from the SAM file use the command below, where reference.fa is the reference fasta file used to map the reads:
    samtools view -bT reference.fa test.sam > test.bam

    If the header information is available:
    samtools view -bS test.sam > test.bam


    I would suggest trying -bS, even though this is opposite to what this wiki says?

    Comment

    • fznajar
      Member
      • Jan 2012
      • 35

      #3
      Thank you seqeve.
      I am still getting the same error above.
      Best

      Comment

      • kmcarr
        Senior Member
        • May 2008
        • 1181

        #4
        Originally posted by fznajar View Post
        I converted my BlasyN to SAM using:

        blast2sam.pl <blastN file> > <output file>

        I then tried to generate a "bam" file using:

        samtools view -bT <reference.fasta> <sam file> -o <bam output>


        I got the following output:
        [sam_header_read2] 0 sequences loaded.
        [samopen] no @SQ lines in the header.
        [sam_read1] missing header? Abort!

        Any help?

        Thanks in advance
        Try providing a reference index file instead of the reference fasta itself.

        Code:
        samtools faidx <reference.fasta> [Creates reference.fasta.fai]
        
        samtools view -bt <reference.fasta.fai> -o <bam.out> <sam.in>

        Comment

        • fznajar
          Member
          • Jan 2012
          • 35

          #5
          Thanks all. It turned out my fasta reference sequence from illumina has a format problem as each sequences is one single long line. I just had to reformat it and it worked.

          Thanks again for your help

          Comment

          Latest Articles

          Collapse

          • SEQadmin2
            Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
            by SEQadmin2



            CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

            Despite this, “CRISPR helped turn genome editing from a specialized technique into
            ...
            07-31-2026, 11:01 AM
          • SEQadmin2
            Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
            by SEQadmin2


            Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

            The systematic characterization of the human proteome has
            ...
            07-20-2026, 11:48 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by SEQadmin2, Today, 10:35 AM
          0 responses
          4 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 08-06-2026, 07:41 AM
          0 responses
          23 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 08-03-2026, 10:13 AM
          0 responses
          40 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 07-31-2026, 02:55 AM
          0 responses
          46 views
          0 reactions
          Last Post SEQadmin2  
          Working...