Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • mharve9
    Junior Member
    • Apr 2014
    • 2

    Pipeline for obtaining phased haplotype sequences w/out references

    Hello,

    I'm working on a pipeline for obtaining phased haplotype sequences from diploid organisms. The input data are Illumina reads from reduced representation libraries, and the goal is to use the phased sequences to estimate gene trees for coalescent analyses. I am working with non-model species, so I don't have a reference genome nor any reference panels for phasing SNPs. I've worked up a pipeline (see below), but given the proliferation of tools out there, I was hoping to get feedback on whether alternative (better) tools exist than those that I've selected. Pipeline:

    1) Demultiplex and clean reads (Casava, Illumiprocessor)
    2) de novo assembly (ABySS)
    3) Map contigs to reference sequences of interest (in some cases we have a set of reference loci we are interested in recovering; python scripts already written for this step)
    3) Map reads to consensus (BWA)
    4) Call SNPs and phase using read information (GATK)
    5) Output phased haplotype sequences (custom python scripts?)

    In addition to advice on alternative tools, I would appreciate any input on step (5) above. Are there any tools that can do this? From what I can tell, samtools can output sequences from VCF files of phased SNPs, but these will just contain ambiguity codes rather than 2 phased haplotype sequences. I don't think GATK has this functionality yet. Will I just have to write a script to take the phasing SNP information from the phased VCF from GATK and add it back into the consensus sequences?

    Thanks,

    Mike
  • Sett
    Junior Member
    • Jun 2015
    • 2

    #2
    I'm trying too to obtain two different consensus sequences starting from a phased VCF for a diploid organism. Were you able to find an efficient solution?
    Thanks

    Comment

    • mharve9
      Junior Member
      • Apr 2014
      • 2

      #3
      Sett,

      I ended up writing a python script to do this. It's available at:

      miscellaneous code for manipulating genetic data. Contribute to mgharvey/misc_python development by creating an account on GitHub.


      Essentially, it takes a phased vcf file output by GATK (but see details below) and inserts the SNPs into reference sequences in fasta format for the relevant loci (e.g. those used as the index for mapping reads initially). For each diploid individual, two sequences are output for the two alleles. The script starts inserting SNPs at the beginning of the reference for each locus/contig, and correctly phases subsequent SNPs that were successfully phased by GATK. If some SNPs from that locus were not successfully phased, it inserts appropriate IUPAC ambiguity codes (unless you use the --resolve flag to force arbitrary phasing).

      The input I use (and expected by the script) is actually a phased SNP table, which can be output using the GATK VariantsToTable tool. To obtain this, after phasing I make a separate vcf file for each sample in my vcf using the SelectVariants tool (using the -sn flag to output a single individual). I then run the VariantsToTable tool with the following flags (which determine which data columns get output to the table): -F CHROM -F POS -F QUAL -GF GT -GF DP -GF HP -GF AD. The full command would be:

      java -Xmx2g -jar GenomeAnalysisTK.jar \
      -T VariantsToTable \
      -R Xenops_minutus_All_to_probes.fasta \
      -V Xenops_minutus_XM2-phased.vcf \
      -F CHROM -F POS -F QUAL -GF GT -GF DP -GF HP -GF AD \
      -o Xenops_minutus_XM2-phased-table.txt

      I then run this in the python script, the command for which is:

      python add_phased_snps_to_seqs.py REF_FASTA PHASED_TABLE OUT_FILE

      With the arguments in caps being replaced with your reference fasta file, phased table of SNPs, and desired output file location/name, respectively.

      This script is still in draft stage. Let me know if you use it and have issues.

      Mike

      Comment

      • Sett
        Junior Member
        • Jun 2015
        • 2

        #4
        Thank you Mike! I'll try your script.

        Comment

        Latest Articles

        Collapse

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by SEQadmin2, 06-09-2026, 11:58 AM
        0 responses
        14 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 06-05-2026, 10:09 AM
        0 responses
        26 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 06-04-2026, 08:59 AM
        0 responses
        36 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 06-02-2026, 12:03 PM
        0 responses
        60 views
        0 reactions
        Last Post SEQadmin2  
        Working...