getGenoCorMatrix: Compute the genotype correlation matrix.

Description Usage Arguments Details Value Examples

View source: R/correlationMatrix.R

Description

From a set of variants identified by the pair (chromosome, position), extract the SNPs from a reference panel in the specified population.

Usage

1
getGenoCorMatrix(lchr, lpos, lrefall, pop)

Arguments

lchr

is a vector with the chromosome number of the variants to extract

lpos

is a vector with the physical position of the variants to extract

lrefall

is a vector with the reference allele of the variant in the data.

pop

is the 1000 Genomes code of the population in which data must be extracted

Details

Currently, this is hard-coded to access 1000 Genomes phase3 data hosted by Brian Browning (author of BEAGLE):

http://bochet.gcc.biostat.washington.edu/beagle/1000_Genomes_phase3_v5a/

This implementation discards multi-allelic markers that have a "," in the ALT column.

Position must be given in GRCh37 genome build.

The pop can be any of: ACB, ASW, BEB, CDX, CEU, CHB, CHS, CLM, ESN, FIN, GBR, GIH, GWD, IBS, ITU, JPT, KHV, LWK, MSL, MXL, PEL, PJL, PUR, STU, TSI, YRI. It can also be any super-population: AFR, AMR, EAS, EUR, SAS.

Then, code additively the genotype and modify the additively coded allele if reference alleles differ between data and reference panel and finally compute the correlation matrix.

Physical position must in

Value

The genotype correlation matrix of the specified variants

Examples

1
2
3
4
chrom = c(8,4)
phys_pos = c(11843758,951947)
refall = c("A","T")
cor_matrix = getGenoCorMatrix(lchr = chrom,lpos = phys_pos , lrefall = refall, pop = "EUR")

vincela/VarExp documentation built on May 29, 2019, 12:42 p.m.