Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • BWA and SAMtools

    Hello Everyone,

    I used BWA to align SOLiD mate pair reads (60,60) with parameters -n 8(total mismatch) -l 25 (seed) and -k 2 (mismatch in seed). I am getting a good mapping rate of around 65%. I will be using BFAST and Lifescope in future.

    BWA outputs all the reads disregard of whether they were mapped, unmapped, mapped in pairs and other bitwise flags. To solve this problem I converted my SAM file to BAM file. As I am not interested in inversions or some unusual variants right now, I filtered out the SAM file so that it can be used for high confidence SNP and Indel calling. So I used:

    samtools view -b -f 67 -f 31 -f 179 -f 115 old.bam > new.bam

    67 and 31 (paired, mapped and properly paired) 179 and 115 (paired, mapped, properly mapped and both mapped reverse complimentary same strand)

    Once I got the new.bam BAM, I sorted it and removed the duplicates usign samtools and then used mpileup to call for the SNPs and indels.

    Below are my Yes or No questions:

    1) This is my first time doing a NGS analysis. Am I doing things correctly? Is the order of steps I am performing correct?

    2) As I only want to use high confidant reads I have filtered out all the unmapped, not properly paired reads. Do you think the flagwise bits I have used are correct.

    Though I tried to remove the duplicates using samtools for my mate pair bam data but I can still see lot of mate-pair reads mapped to the same position as other mate-pair reads. Some people have suggested using Picard.

    I think the problem could be because I used "trim 3'end" option in BWA. The reads that were duplicates before may not remain duplicates afterwards because the length of some reads got changed after trimming. Can anyone tell me how to resolve this issue.

    PS: In future I am planning to try GATK but for now i think samtools variant calling can give me some idea about quality of mapping and my solid data.

    Thanks.

    Thanks

  • #2
    It's not clear to me that bwa will treat two reads going in the same direction as properly paired. But I've never tried it, I could be wrong.

    If all you want are the properly paired reads, do -f 2.

    I'm not sure why you have to get rid of the unmapped reads anyway. Mpileup isn't going to use them, but someday, you may want to be able to look at them, so why not leave them in the file?

    Comment


    • #3
      Thanks for the reply. This is my first analysis so i am going extra careful.

      Comment


      • #4
        Originally posted by swbarnes2 View Post
        It's not clear to me that bwa will treat two reads going in the same direction as properly paired. But I've never tried it, I could be wrong.

        If all you want are the properly paired reads, do -f 2.

        I'm not sure why you have to get rid of the unmapped reads anyway. Mpileup isn't going to use them, but someday, you may want to be able to look at them, so why not leave them in the file?
        I like to remove unmapped reads from my BAM files as well. This is just to save disk space. When my lab does a sequencing run we get 500 GB of FASTQ data across 48 samples which balloons up to a lot more HD space once everything is aligned. If we ever care about unaligned reads I can re-run the alignments and parse them out.
        /* Shawn Driscoll, Gene Expression Laboratory, Pfaff
        Salk Institute for Biological Studies, La Jolla, CA, USA */

        Comment


        • #5
          Originally posted by sdriscoll View Post
          I like to remove unmapped reads from my BAM files as well. This is just to save disk space. When my lab does a sequencing run we get 500 GB of FASTQ data across 48 samples which balloons up to a lot more HD space once everything is aligned. If we ever care about unaligned reads I can re-run the alignments and parse them out.
          Hi,

          If you use BWA can you comment on my questions. I mean "Am i using the correct flags" because when I used these flags my BAM file reduced from 18 gb to 4 gb. I dont care about the unmapped or single pair mapped reads.

          Comment


          • #6
            Can you explain why you don't want different reads to align in the same place in the genome? Normally people might exclude reads that align to multiple genome locations (repetitive sequences) but it's a normal and desirable part of RNA-Seq for multiple reads to align to the same locations within the genome. That's how we are able to measure gene expression and part of how we can consider SNPs to be significant.
            /* Shawn Driscoll, Gene Expression Laboratory, Pfaff
            Salk Institute for Biological Studies, La Jolla, CA, USA */

            Comment

            Latest Articles

            Collapse

            • seqadmin
              Recent Advances in Sequencing Technologies
              by seqadmin







              Innovations in next-generation sequencing technologies and techniques are driving more precise and comprehensive exploration of complex biological systems. Current advancements include improved accessibility for long-read sequencing and significant progress in single-cell and 3D genomics. This article explores some of the most impactful developments in the field over the past year.

              Long-Read Sequencing
              Long-read sequencing has...
              12-02-2024, 01:49 PM
            • seqadmin
              Genetic Variation in Immunogenetics and Antibody Diversity
              by seqadmin



              The field of immunogenetics explores how genetic variations influence immune responses and susceptibility to disease. In a recent SEQanswers webinar, Oscar Rodriguez, Ph.D., Postdoctoral Researcher at the University of Louisville, and Ruben Martínez Barricarte, Ph.D., Assistant Professor of Medicine at Vanderbilt University, shared recent advancements in immunogenetics. This article discusses their research on genetic variation in antibody loci, antibody production processes,...
              11-06-2024, 07:24 PM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by seqadmin, 12-02-2024, 09:29 AM
            0 responses
            139 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 12-02-2024, 09:06 AM
            0 responses
            50 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 12-02-2024, 08:03 AM
            0 responses
            38 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 11-22-2024, 07:36 AM
            0 responses
            70 views
            0 likes
            Last Post seqadmin  
            Working...
            X