Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    When importing sam to bam, I use 'view' rather than 'import' :

    @SQ header lines present in SAM file:
    samtools view –bS alignment.sam > alignment.bam

    @SQ header lines absent from SAM file:
    samtools view –bt reference.fasta.fai alignment.sam > alignment.bam

    Not sure if that will help at all but might be worth a try
    Good luck

    Comment


    • #17
      Thanks for the suggestion Tally, I just reran everything and used the command view instead of import, but still no luck

      Comment


      • #18
        I think there are two problems here:

        1) Display of NNNNs instead of sequence
        This seems to be related in part to the actual terminal window. I thought it was weird that the NNNs don't appear until exactly after I start scrolling across the terminal. If I resize the terminal before running the 'tview' command, the position where the NNNs begin also changes. It may not be important, as according to mpileup output the NNNs are only occurring in between aligned regions.

        2) Incomplete alignment
        My fault!!! Helps when you use the correct reference sequence...
        Last edited by HeidiJTP; 01-24-2012, 10:44 AM.

        Comment


        • #19
          Originally posted by HeidiJTP View Post
          I think there are two problems here:

          1) Display of NNNNs instead of sequence
          This seems to be related in part to the actual terminal window. I thought it was weird that the NNNs don't appear until exactly after I start scrolling across the terminal. If I resize the terminal before running the 'tview' command, the position where the NNNs begin also changes. It may not be important, as according to mpileup output the NNNs are only occurring in between aligned regions.
          I am also facing this problem. Does anybody know what is the work around ?

          Comment


          • #20
            Originally posted by sudeep View Post
            I am also facing this problem. Does anybody know what is the work around?
            To summarize, I think there's 3 main problems that trip up users:
            1. Forgot to specify the reference on the command line (eg. "samtools tview foo.bam" => "samtool tview foo.bam foo.fa")
            2. Fasta file has different names for sequences. This is painful to fix, but you'll have to either rewrite all the sequence names (e.g. ">chr1" lines in foo.fa) to match the bam file sequence names, or rewrite the sequence references in the SAM/BAM file. The former's probably easier, but definitely the "right" way to go is to use the same fasta files when building the alignment to begin with
            3. Corrupt fasta files? I can't confirm this, but I suspect samtools might choke on reading FASTA files with dos/windows CR/LF linebreak codes (shows up as ^M in unix terminals a lot). This would explain HeidiJTP and naluru's 80 character problem (as 80 characters per line is common). You can normalize your dos/windows ASCII files to unix with the dos2unix command (e.g. dos2unix foo.fa).


            Also, it may not be what you're looking for if you care about the reference outside of mapped areas, but as an alternative, Samscope infers and displays the reference from BAM data alone (MD + CIGAR tags) without relying on FASTA reference files.

            Comment


            • #21
              I have solved this issue with renaming the fai (fasta index file). I had FileName.fa.fai and rename it FileName.fai. I think the program expects it like that.

              Comment

              Latest Articles

              Collapse

              • seqadmin
                Strategies for Sequencing Challenging Samples
                by seqadmin


                Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                03-22-2024, 06:39 AM
              • seqadmin
                Techniques and Challenges in Conservation Genomics
                by seqadmin



                The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

                Avian Conservation
                Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
                03-08-2024, 10:41 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by seqadmin, Yesterday, 06:37 PM
              0 responses
              10 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, Yesterday, 06:07 PM
              0 responses
              9 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 03-22-2024, 10:03 AM
              0 responses
              49 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 03-21-2024, 07:32 AM
              0 responses
              67 views
              0 likes
              Last Post seqadmin  
              Working...
              X