Learn R Programming

gap (version 1.5-1)

gap-internal: Internal functions for gap

Description

These are internal functions.

g2a.c is the C version of g2c.

gc.control is used by gc.em().

gcode is as a2g.

grec2g is undocumented.

HapDesign and HapFreqSE both accept a haplo.em object to derieve a design/dosage matrix and standard error of haplotype frequency estimates. The former is appropriate for haplotype trend regression (HTR), e.g., within the generalized linear model (GLM) framework to be equivllant to a formal approach as implemented in the package haplo.stats and hap.score. However, they are expected to be compatible with objects from gc.em() gc.em and hap.em. The two functions are included as courtesy of Prof Andrea Foulkes from the useR!2008 tutorial.

hap.score.glm, hap.score.podds are used by hap.score().

invlogit, inverse logit transformation.

is.miss is undocumented.

k obtains 1st and 2nd order culumants for correlation coefficient.

m2plem is an experimental function for PLEM format.

makeRLEplot for RLE plot.

sun3d is for 3D Manhattan plot according to Sun, et al. (2018).

micombine is used to combine imputation results.

plem2m is also experimental for PLEM format.

ReadGRMPLINK is a function to read PLINK PI_HAT as a genomic relationship matrix.

ReadGRMPCA is a function to read .eigenval and .eigenvec files from gcta --pca.

revhap recovers the allele indices for a given haplotype ID in a multiallelic system.

revhap.i is similar to revhap.

solve.skol is a function used by tscc.

toETDT a function used to experiment with ETDT.

ungcode recovers alleles from genotype(s).

VR is a utility function for calculating variance of a ratio.

weighted.median is a function for obtaining weighted median with interpolation.

WriteGRMSAS is a utility function to write a GRM object to SAS PROCs MIXED/GLIMMIX ldata.

x2 is a simple chi-squared test of two proportions.

z is a normal z-test of two proportions used by tscc.

Usage

sun3d(xyz="INF1.merge.cis.vs.trans",
      cols=c("id","chr1","pos1","chr2","pos2","gene","target","log10p","x","y","col"),
      xy.scale=c(1.3e8,1.3e8),marker.size=4,log10p.max=400,
      prefix=c("Sentinel","CHR","POS","CHR","POS","Gene","Target","-log10(p)"),
      postfix="\u003c/br>",
      json.file="d3.json",pretty=TRUE)
ReadGRMPLINK(prefix, diag=1)
ReadGRMPCA(prefix)
revhap(loci,hapid)
VR(v1,vv1,v2,vv2,c12)
WriteGRMSAS(grmlist, outfile="gwas")

Arguments

a1

Allele 1

a2

Allele 2

g

A genotype identifier

p1

Frequency of the risk allele

K

Prevalence of disease in the population

loci

A vector of number of alleles at all loci

hapid

Haplotype identifier

Details

These functions are not so frequently called by users