ImportFromGATK: Imports SNP data from GATK VariablesToTable output

Description Usage Arguments Value See Also Examples

Description

Imports SNP data from the output of the VariantsToTable function in GATK. After importing the data, the function then calculates total reference allele frequency for both bulks together, the delta SNP index (i.e. SNP index of the low bulk subtracted from the SNP index of the high bulk), the G statistic and returns a data frame. The required GATK fields (-F) are CHROM (Chromosome) and POS (Position). The required Genotype fields (-GF) are AD (Allele Depth), DP (Depth). Recommended fields are REF (Reference allele) and ALT (Alternative allele) Recommended Genotype feilds are PL (Phred-scaled likelihoods) and GQ (Genotype Quality).

Usage

1
2
importFromGATK(file, highBulk = character(), lowBulk = character(),
  chromList = NULL)

Arguments

file

The name of the GATK VariablesToTable output .table file which the data are to be read from.

highBulk

The sample name of the High Bulk

lowBulk

The sample name of the Low Bulk

chromList

a string vector of the chromosomes to be used in the analysis. Useful for filtering out unwanted contigs etc.

Value

Returns a data frame containing columns for Read depth (DP), Reference Allele Depth (AD_REF) and Alternative Allele Depth (AD_ALT), Genoytype Quality (GQ) and SNPindex for each bulk (indicated by .HIGH and .LOW column name suffix). Total reference allele frequnce "REF_FRQ" is the sum of AD.REF for both bulks divided by total Depth for that SNP. The deltaSNPindex is equal to SNPindex.HIGH - SNPindex.LOW. The GStat column is the calculated G statistic for that SNP.

See Also

getG for explaination of how G statistic is calculated. What is a VCF and how should I interpret it? for more information on GATK Fields and Genotype Fields

Examples

1
2
3
4
df <-  ImportFromGATK(filename = file.table,
    highBulk = highBulkSampleName,
    lowBulk = lowBulkSampleName,
    chromList = c("Chr1","Chr4","Chr7"))

bmansfeld/QTLseqR documentation built on Jan. 25, 2020, 8:52 p.m.