Learn R Programming

gap (version 1.6)

qtlClassifier: A QTL cis/trans classifier

Description

A QTL cis/trans classifier

Usage

qtlClassifier(geneSNP, SNPPos, genePos, radius)

Value

It returns a geneSNP-prefixed data.frame with the following columns:

  • geneChrom gene chromosome.

  • geneStart gene start.

  • geneEnd gene end.

  • SNPChrom pQTL chromosome.

  • SNPPos pQTL position.

  • Type cis/trans labels.

Arguments

geneSNP

data.frame with columns on gene, SNP and biomarker (e.g., expression, protein).

SNPPos

data.frame containing SNP, chromosome and position.

genePos

data.frame containing gene, chromosome, start and end positions.

radius

flanking distance.

Details

The function obtains QTL (simply called SNP here) cis/trans classification based on gene positions.

See Also

cis.vs.trans.classification

Examples

Run this code
if (FALSE) {
  merged <- read.delim("INF1.merge",as.is=TRUE)
  hits <- merge(merged[c("CHR","POS","MarkerName","prot","log10p")],
                inf1[c("prot","uniprot")],by="prot")
  names(hits) <- c("prot","Chr","bp","SNP","log10p","uniprot")

  options(width=200)
  geneSNP <- merge(hits[c("prot","SNP","log10p")],
                   inf1[c("prot","gene")],by="prot")[c("gene","SNP","prot","log10p")]
  SNPPos <- hits[c("SNP","Chr","bp")]
  genePos <- inf1[c("gene","chr","start","end")]
  cvt <- qtlClassifier(geneSNP,SNPPos,genePos,1e6)
  cvt
  cistrans <- cis.vs.trans.classification(hits,inf1,"uniprot")
  cis.vs.trans <- with(cistrans,data)
  cistrans.check <- merge(cvt[c("gene","SNP","Type")],cis.vs.trans[c("p.gene","SNP","cis.trans")],
                          by.x=c("gene","SNP"),by.y=c("p.gene","SNP"))
  with(cistrans.check,table(Type,cis.trans))
}

Run the code above in your browser using DataLab