Changes between Initial Version and Version 1 of ChipBasedQcPipelineIdea


Ignore:
Timestamp:
Sep 26, 2010 7:14:41 PM (14 years ago)
Author:
Yurii Aulchenko
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ChipBasedQcPipelineIdea

    v1 v1  
     1= The idea of chip-based QC pipeline =
     2
     3Below a detailed outline of steps which should be included in ChipBasedQcPipeline is provided. This document also suggest the CipBasedQcPipelineWorkflow sequence and principal ideas for solutions. This document does not specify exact tools to be used; as most of operations are data manipulations, it will be up to the involved analysts to decide what tool may be more convenient for them and formulate the CipBasedQcPipelineWorkflow. The actual implementation of the workflow should allow automatic reproduction of the results and application of the same workflow to new data. This is not only important from good practice point of view, but also keeping in mind that more data will come to the same pipeline in the future.
     4
     5The document assumes VCF v.4 format (http://1000genomes.org/wiki/doku.php?id=1000_genomes:analysis:vcf4.0) is used; “+” strand is used in VCF. It is assumed that chip data come in ???WHAT??? format (WE NEED TO COME UP WITH STANDARD FORMAT WE CAN GET ALL CHIP DATA IN, OR A NUMBER OF FORMATS).
     6
     7== CHIP-VCF BUILD AND DBSNP MATCHING TABLE ==
     8
     9Before starting, check what is the reference build used by VCF files. Next, what is dbSNP version used to name the SNPs. If any of these (and/or strand is not always ‘+’ in chip data), arrange tab-separated file containing conversion table (name: chip_data_conversion_table_yyyy.mm.dd.txt):
     10
     11Header line:
     12
     13CHRC    POSC    SNPC    STRANDC A1C     A2C     CHRV    POSV    SNPV    A1V     A2V
     14
     15Next lines should all contain 12 tab-delimited values. There should be no missing values.
     16 * CHR[C/V]: chromosome SNP is located at, according to Chip [C] and VCF [V] build versions <integer from 1 to 22 for autosomes, “X” for X-chromosome, and “Y” for Y-chromosome>
     17 * POS[C/V]: chromosomal position, according to Chip [C] and VCF [V] build versions <integer>
     18 * SNP[C/V]: SNP rs-name, according to Chip [C] and VCF [V] dbSNP versions <alphanumeric>
     19 * STRANDC: strand in chip annotation <single character, either “+” or “-“>
     20 * A1C: first allele in chip annotation <single character, either “A”, “C”, “G” or “T”>
     21 * A2C: second allele in chip annotation <single character, either “A”, “C”, “G” or “T”>
     22 * A1V: (translated) first chip allele (A1C) according to “+” strand on VCF build <single character, either “A”, “C”, “G” or “T”>
     23 * A2V: (translated) second chip allele (A2C) according to “+” strand on VCF build <single character, either “A”, “C”, “G” or “T”>
     24
     25Questions:
     26 * Q: what is the build and dbSNP version used by chip and VCF?
     27 * Q: how many SNPs changed the name in VCF build?
     28 * Q: how many SNPs changed the strand in VCF build?
     29 * Q: provide a 2x2 table (name change/not) x (strand change/not)
     30
     31Note that in future, samples typed using a number of different Chip platforms will be coming in. Therefore above step should not assume a particular chip is used!
     32
     33== UPDATED CHIP GENOTYPES ==
     34
     35Using above described translation table, generate updated chip genotypes file (name: chip_genotypes_yyyy.mm.dd.txt)
     36
     37This is a tab-delimited text file containing a table. The header line is
     38
     39ID      SNPV    QUALCHIP        A1VCHIP A2VCHIP GTCHIP
     40
     41Next lines should all contain 5 tab-delimited values. Use “.” (dot) for missing.
     42 * ID: sample ID (genotyped individual’s code) <alphanumeric>
     43 * SNPV: SNP rs-name, according to VCF dbSNP version <alphanumeric>
     44 * QUALCHIP: calling quality for the individual genotype
     45 * A1VCHIP: first allele the personal genotype, translated according to “+” strand on VCF build <single character, either “A”, “C”, “G” or “T”>
     46 * A2VCHIP: second allele the personal genotype, translated according to “+” strand on VCF build <single character, either “A”, “C”, “G” or “T”>
     47* GTCHIP: genotype with alleles in alphabetic order, <two characters, each either “A”, “C”, “G” or “T”>
     48
     49Questions:
     50 * Q: do all SNPs in chip data have rs-number?
     51 * Q: what alleles are observed in chip data? Only A/T/G/C?
     52 * Q: are all SNPs bi-allelic?
     53
     54== EXTRACTION OF CHIP SNPS FROM VCF FILE ==
     55
     56From VCF, extract only lines containing SNPs also observed in the chip (see SNPV column of “chip_data_conversion_table_yyyy.mm.dd.txt”)
     57
     58Parse extracted lines, and arrange “Annotation” and “Genotypic” tables
     59
     60Annotation table (name: VCF_annotation_yyyy.mm.dd.txt). Tab-delimited file with header lines (and consequently extracting following columns from VCF):
     61
     62CHROM   POS     ID      REF     ALT     QUAL    FILTER  INFO
     63
     64At the beginning of the file, add meta-info from VCF file
     65
     66Genotypic table (name: VCF_genotypes_yyyy.mm.dd.txt). Tab-delimited file containing following information. Header line:
     67
     68ID      SNPV    GTVCF   GQ      DP      BATCH   ????
     69
     70Next lines should all contain XXX tab-delimited values. Use “.” (dot) for missing.
     71 * ID: sample ID (genotyped individual’s code) <alphanumeric>
     72 * SNPV: SNP rs-name, according to VCF dbSNP version <alphanumeric>
     73 * GTVCF: genotype with alleles in alphabetic order, <two characters, each either “A”, “C”, “G” or “T”>. This can be done by mapping the numbers provided in VCF GT field to REF and ALT and then ordering.
     74 * GQ, DP: directly from VCF file
     75* BATCH …
     76
     77HERE WE NEED TO DECIDE WHAT POTENTIALLY QUALITY-AFFECTING VARIABLES (SUCH AS BATCH) WE NEED TO TAKE INTO ACCOUNT
     78
     79Merge chip and VCF genotypic tables (“chip_genotypes_yyyy.mm.dd.txt” and “VCF_genotypes_yyyy.mm.dd.txt”) using ID and SNPV as key variables. Keep all chip genotypes, substituting missing (“.”) when no information is available from VCF. Name the table “merged_chip_and_VCF_genotypes_yyy.mm.dd.txt”.
     80
     81Questions:
     82 * Q: What is count and proportion of genotypes that do not match between GTCHIP and GTVCF? How much these counts/proportions changes if dropping rows with QUALCHIP < X (vary X)? How much these counts/proportions changes if dropping rows with GQ (DP) < X (vary X)?
     83 * Q: What is proportion of false-positive and false-negative findings in our study, if we do not take trio structure into account?
     84 * Q: Find out QC metrics thresholds maximizing specificity and sensitivity.
     85
     86Update the table with variable “CHIPVCFMISMATCH” (1 if mismatch, 0 for match, missing (“.”) if any is missing).
     87
     88 * Q: Explore, which variables are significant predictors of mismatch using multiple logistic regression.
     89
     90
     91== CHIP SNPS MISSING FROM VCF ==
     92
     93Write the list of the chip SNPs not in VCF into the file “list_of_chip_snps_missing_in_VCF_yyyy.mm.dd.txt” (single column containing SNPV name). This should be done when matching chip SNPs with VCF SNPs (see section “EXTRACT CHIP SNPs FROM VCF”)
     94
     95 * Q: How many variants do we miss in VCF (how many SNPs in file list_of_chip_snps_missing_in_VCF_yyyy.mm.dd.txt)?
     96
     97For each SNP in list_of_chip_snps_missing_in_VCF_yyyy.mm.dd.txt, based on chip_genotypes_yyyy.mm.dd.txt derive frequency from chip data and arrange the following table (name: annot_chip_snps_missing_in_VCF_yyyy.mm.dd.txt). The header line should contain
     98
     99SNPV     A1V     A2V     FREQA1V
     100
     101Each next line should contain 4 values delimited by tab; SNPV, A1V, and A2V explained above (the same as in “chip_data_conversion_table_yyyy.mm.dd.txt” file). FREQA1V is a floating-point frequency of allele “A1V”.
     102
     103 * Q: Does the distribution of frequency of missed variants match the expected under the assumption that we miss at random because of limited #chromosomes and coverage (for each trio we read two chromosomes at 12x and 2 chromosomes at 24x)