Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Help with variant calling pipeline

    Hi,

    I could really use some help with my variant calling pipeline. I have illumina reads from outbreak bacterial strains, mapped to a reference using bwa, sorted and filtered for quality snps using vcftools and my output are .vcf files for each genome.

    My research question in this instance is quite specific, how many snps do my genomes differ by?

    I know what I would like to do - create a pair wise snp matrix for all genomes showing snp differences. My ideal output would be a table like this

    Sample 1 sample 2 sample 3

    Sample 1 0 4 12

    Sample 2 4 0 1

    Sample 3 12 1 0

    I have a feeling it requires a custom Python script or programming in R?

    Any help, advice or comments would be very much appreciated

    Al'Thor
    Thanks
    Al'Thor

  • #2
    Assuming your vcf files contain only the filtered SNPs of a single strain you are interested in, you could try:

    Code:
    # Get number of different (!) SNPs of two vcfs
    cat 1.vcf  2.vcf | grep -v '^#' | awk '{print $1,$2,$4,$5}' | sort | uniq -u | wc -l
    Depending on the number of strains you have, it would of course be helpful/necessary to write a loop.

    Comment


    • #3
      There are a number of tools for filtering VCFs; several are listed in this thread.

      Comment


      • #4
        Thanks dschika, will give this a try
        Thanks
        Al'Thor

        Comment

        Latest Articles

        Collapse

        • seqadmin
          Essential Discoveries and Tools in Epitranscriptomics
          by seqadmin




          The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
          Yesterday, 07:01 AM
        • seqadmin
          Current Approaches to Protein Sequencing
          by seqadmin


          Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
          04-04-2024, 04:25 PM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by seqadmin, 04-11-2024, 12:08 PM
        0 responses
        55 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 04-10-2024, 10:19 PM
        0 responses
        52 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 04-10-2024, 09:21 AM
        0 responses
        45 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 04-04-2024, 09:00 AM
        0 responses
        55 views
        0 likes
        Last Post seqadmin  
        Working...
        X