Editing
Daniel:Notebook/Haplotyping/MergeVCF
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=Creating Reference VCFs= [[Daniel:Notebook/Haplotyping|Back to Notebook]] *The reference data used can be found in this directory on genome miner: /home/kunzhang/genomeSeq/Data/PGP1_CGI_WGS *The final vcfs (most current) can be found here: '''/oasis/tscc/scratch/djacobse/haplotypeSeqData/vcfs/merged_wgs_vcfs''' **The vcfs have names '''merged.chr*.hg19.liftover.reorder.vcf''' ==Data Format== It is originally in the output format of Complete Genomics as a result of their Whole Genome Sequencing (WGS) of PGP1. There are three cell lines, #PGP1FP8; Passage 8 PGP1 fibroblasts #PGP1L; PGP1 #PGP1CDIiPS; induced Pluripotent Stem Cell line The alignment was done using NCBI build 36 (making it several versions older than hg19, which I use). It also uses dbsnp build 130, which is also behind the times. Both of these were addressed before using it with my current data. ===File Format=== The data used was taken from the files var-***.tsv, which are all around 1-2GB. These files have columns that look like this: [[Image:Cgiwgs.example1.png|800px]] For the most part, this information is not too helpful. However, every now and then you find rows with data like this: [[Image:Cgiwgs.SNPexample.png|800px]] This shows two areas with SNPs. The first SNP, at position 1089, calls a SNP in both the P1 and P2 chromosome (3rd column 1 and 2, respectively). However, the SNP at 1101 calls ref for allele 1 and snp for allele 2. Note that alleles 1 and 2 are interchangable without phasing data. Therefore, the first snp called is homozygous, and not helpful for phasing, whereas the 2nd snp is heterozygous and is useful for haplotype generating. ==Processing Reference Data== The reference data was processed in several steps. First, it was run through MATLAB to extract out only the heterozygous SNPs (see above for what those look like) and write them in VCF format. Step 2 lifts the VCFs over from NCBI build 36/dbsnp build 100 to current builds (hg19). ===MATLAB=== The MATLAB step reads in the var-*.tsv files and extracts the '''heterozygous''' SNP data, outputting as a VCF. It then takes the new VCFs (one for each chromosome/cell line) and merges them across cell lines, using only heterozygous SNPs called by at least 2 cell lines. #Read in reference data and merge using 2/3 voting method (If site was called heterozygous in 2/3 cell lines) ##[[File:Vcfmergingfiles.mcode.completegenomics.zipβ|M code]] ===LiftOver=== The next step is to lift over the data from NCBI 36/dbsnp build 100 to the build used by the other data sets (hg19). #Convert positions using liftOver; this converts the output vcf files to bed files, then performs the script liftOver script (available from [https://genome-store.ucsc.edu/ UCSC Genome Browser]) ##[[Media:Liftover.sh|Shell script]] #Liftover RSIDs; this is for updating dnsnp references ##[[Media:Rsid.liftover.sh|Shell script]] ##[http://genome.sph.umich.edu/wiki/LiftOver#Use_RsMergeArch_and_SNPHistory Link to LiftRSNumber.py] #Reorder; I discovered later that this left a small number of SNPs out of order in the vcf file; this step is the last step I have in the current pipeline #[[Media:Reordervcf.sh|Shell Script]] The final files are labeled merged.chr*.hg19.liftover.reorder.vcf, and are in the directory: /oasis/tscc/scratch/djacobse/haplotypeSeqData/vcfs/merged_wgs_vcfs
Summary:
Please note that all contributions to ZhangLabWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
ZhangLabWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main Page
Current events
Recent changes
Random page
Investigators
Matt Cai
Song Chen
Eric Chu
Dinh Diep
Elizabeth Duong
Shicheng Guo
Alan Fung
Daniel Jacobsen
Blue Lake
Huy Lam
Alice Li
Andrew Richards
Brandon Sos
Chris Wei
Yan Wu
Kun Zhang
Tools
What links here
Related changes
Special pages
Page information