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