Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lwhitmore
    Member
    • Aug 2013
    • 70

    #1

    Samtools Errors

    Hey I know there are alot of posts about samtool errors but I have yet to find a solution.

    When I run
    $ samtools view Reads.bam >reads.sam -bS
    [samopen] no @SQ lines in the header.
    [sam_read1] missing header? Abort!

    Additionally when I tried the following two options I got errors as well-bash-$samtools view -T Reference.fa Reads.bam >reads.sam -bS
    [sam_header_read2] 1 sequences loaded.
    [sam_read1] reference 'SO:unsorted' is recognized as '*'.
    Parse error at line 1: invalid CIGAR character
    Aborted

    $ samtools view -bt Reference.fa.fai Reads.bam > reads.sam
    [sam_header_read2] 1 sequences loaded.
    [sam_read1] reference 'SO:unsorted' is recognized as '*'.
    Parse error at line 1: invalid CIGAR character
    Aborted

    Additionally I tried this but the sam file cam out blank
    $ samtools view -h SRR519779test_Aligned_LW.dat.bam | awk -F'\t' 'BEGIN { dict[65] dict[147]} $2 in dict' >reads.sam

    Thanks for any help
    Leanne
  • GenoMax
    Senior Member
    • Feb 2008
    • 7142

    #2
    It may be useful to add what program was used to generate your BAM files. Or were these downloaded from somewhere.

    Comment

    • lwhitmore
      Member
      • Aug 2013
      • 70

      #3
      Mosaik an IUPAC alignment program

      Comment

      • dpryan
        Devon Ryan
        • Jul 2011
        • 3478

        #4
        Does it directly produce BAM files or is there a SAM intermediate (I've never used Mosaik)? Also, which version of samtools are you using (if you just type "samtools" then it'll be near the top of the output)? For some reason samtools is seeing those as SAM files rather than BAM files, which should only happen if you supply "-S" on the command line.

        Comment

        • dpryan
          Devon Ryan
          • Jul 2011
          • 3478

          #5
          BTW, this:
          Code:
          samtools view Reads.bam >reads.sam -bS
          doesn't make any sense as a command. I assume you actually meant:

          Code:
          samtools view -bS Reads.sam >reads.bam
          which could produce the error messages you observed if "Reads.sam" is missing a header. If that's the case, just post the first dozen or so lines of Reads.sam

          Comment

          • swbarnes2
            Senior Member
            • May 2008
            • 910

            #6
            Or, try

            Code:
            samtools view -bSh Reads.sam >reads.bam
            Assuming you do have a header in your .sam file.

            Comment

            Latest Articles

            Collapse

            • SEQadmin2
              Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
              by SEQadmin2



              Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

              Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
              ...
              10-14-2026, 09:55 AM
            • SEQadmin2
              New Genomics Technologies Take Aim at Long-Standing Limits
              by SEQadmin2


              Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

              We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
              ...
              09-28-2026, 10:25 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, Yesterday, 10:52 AM
            0 responses
            10 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-14-2026, 05:39 AM
            0 responses
            19 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-13-2026, 09:56 AM
            0 responses
            17 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-09-2026, 11:14 AM
            0 responses
            27 views
            0 reactions
            Last Post SEQadmin2  
            Working...