prep.score.files: Prepare score files

Description Usage Arguments Value Examples

View source: R/prep.score.files.R

Description

Calculates Z scores from P values and beta input

Usage

1
prep.score.files(input.file, reference.file = "", output.file.prefix)

Arguments

input.file

a file with two mandatory columns (case-insensitive header):

"ID": names of genetic variants (we suggest to provide rsIDs when possible)
"P": P value
Additional columns that can be present in input file: "CHROM": chromosome
"POS": positions for the same build as in gene.file (see gene-based test functions) and reference.file (37.3 with default files)
"EA": effect allele
"BETA": effect size (betas and genetic correlations should be calculated for the same genotype coding)
"EAF": effect allele frequency
"ANNO": functional annotations

For example:

CHROM POS ID EA P BETA EAF
1 196632134 1:196632134 T 0.80675 0.22946 0.00588
1 196632386 1:196632386 A 0.48694 0.65208 0.00588
1 196632470 1:196632470 G 0.25594 -0.19280 0.19412

Avoid rounding of betas and P values as this can affect the precision of regional tests.

The more data (columns) is present in input file, the more gene-based tests are available to run. Minimal input (rsIDs and P values) together with correlation matrices (reference matrices calculated from 1000G data are available at http://mga.bionet.nsc.ru/sumFREGAT/) allow to run minp(), simpleM, and sumchi() tests. Adding info on effect allele ("EA") and effect size ("BETA") enables essentially all sumFREGAT tests. Adding allele frequencies enables standard weighting via beta distribution (see gene-based test functions for details).

reference.file

path to a reference file with additional data. Reference file from 1000G is available at http://mga.bionet.nsc.ru/sumFREGAT/.

output.file.prefix

if not set, the input file name will be used as output prefix.

Value

does not return any value, writes output files with Z scores to be used in any type of gene-based analysis in sumFREGAT (see 'gene-based test functions').

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
input.file <- system.file("testfiles/CFH.full.input.dat", package = "sumFREGAT")
prep.score.files(input.file, output.file.prefix = "CFH.scores.full")

## Not run: 

# requires reference file "ref1KG.MAC5.EUR_AF.RData" (can be downloaded
# at http://mga.bionet.nsc.ru/sumFREGAT/)

input.file <- system.file("testfiles/CFH.dat", package = "sumFREGAT")
prep.score.files(input.file, reference = "ref1KG.MAC5.EUR_AF.RData",
	output.file.prefix = "CFH.scores")

input.file <- system.file("testfiles/CFH.full.input.dat", package = "sumFREGAT")
prep.score.files(input.file, reference = "ref1KG.MAC5.EUR_AF.RData",
	output.file.prefix = "CFH.scores.full.ref")


## End(Not run)

sumFREGAT documentation built on May 2, 2019, 5:52 a.m.