Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • meher
    Member
    • Jun 2011
    • 54

    Multi sample SNP calling

    Hi all,

    I have two bam files, bam1 and bam2 with two different read groups. I would like GATK to treat as a single sample and do the SNP calling. And it can be done by giving same read group names to both the bam files and call SNP's by pooling them to a single bam file.

    But my interest is, Lets say a SNP i covered by 30 reads, i am interested in finding out number of reads that have come from bam1 and number of reads from bam2.

    How can we distinguish between the reads from two bam files after merging them into a single bam file with same read group name?

    Is there a way or any tool to achieve this? Any suggestions!!!
  • sdriscoll
    I like code
    • Sep 2009
    • 436

    #2
    Once you know the snp location you could copy it to a separate file and use bedtools' intersection command between that location and each of your bam files. If the snp output is in vcf format then you just need to make a new file with only the row of your snp in it. The bed tools command might go like this:

    Code:
    bedtools intersect -wa -bed -abam bam1.bam -b snp.vcf > bam1hits.bed
    If you leave out the -bed option it will produce a bam file in case you'd rather keep that format for any downstream analysis.
    /* Shawn Driscoll, Gene Expression Laboratory, Pfaff
    Salk Institute for Biological Studies, La Jolla, CA, USA */

    Comment

    • vivek_
      PhD Student
      • Jul 2012
      • 164

      #3
      The bam header has separate fields for read group ID @RG and sample name @SN. You could extract the header from the bam files using samtools view, write a one-liner to modify sample name while keeping the readgroup names different and use samtools reheader to re-add the header to the corresponding bam files.

      Comment

      • meher
        Member
        • Jun 2011
        • 54

        #4
        Thank you both for the suggestions. I have figured out a way using GATK multi-sample snp calling which is very straight forward. Variant calling is performed using GATK for both the bam files in a single step which gives a single vcf output file. The output file has all the variants detected with the total depth of each variant and along with it there are specific fields for each bam file which gives the number of reads coming from each of these bam files.

        Comment

        Latest Articles

        Collapse

        • mylaser
          Reply to Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
          by mylaser
          Kheloyar – Everything You Need to Know About Kheloyaar Login and Kheoyar Id
          If you are looking for an online gaming platform that offers a user-friendly experience, Kheloyar has become a name that many users search for. Whether you're interested in creating a new account, accessing your dashboard through Kheloyaar Login, or learning how to obtain a Kheoyar Id, understanding the platform's features and account process is essential.
          This guide explains everything you need to know about...
          07-11-2026, 01:13 AM
        • 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

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by SEQadmin2, 07-09-2026, 10:04 AM
        0 responses
        22 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 07-08-2026, 10:08 AM
        0 responses
        14 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 07-07-2026, 11:05 AM
        0 responses
        33 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 07-02-2026, 11:08 AM
        0 responses
        31 views
        0 reactions
        Last Post SEQadmin2  
        Working...