compare peak locations to gene regions generated by genomicRegions Return a list of genes which corospond to the overlaped gene regions
1 | peakGeneRegions(bedData, genes, geneList)
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | heightFile<-"~/Dropbox/UTX-Alex/jan/combined_heights.bed"
geneList<-read.delim(paste(fileLocation,"hg19.RefSeqGenes.csv",sep=""))
data<-loadHeightFile(heightFile)$data
reg<-mapply(function(pc,loc)buildRegions(data,pc,loc)[,1],
list(1,1,3,c(3,5),c(3,7),c(3,7),7),
list("top","bottom","top",c("top","top"),c("top","bottom"),c("top","bottom"),"top"))
chrom<-as.character(geneList$chrom)
tss<-as.numeric(geneList$txStart)
start<-Sys.time()
a<-genomicRegions(chrom,tss,5000,1000,50000)
Sys.time()-start
#
jurkGenes<-peakGeneRegions(bedData[reg[,2],],a,geneList)
filenames<-lapply(cbind("erythroid","t-all","ecfc","other","hspc","meka","diff"),paste, "-genes.txt",sep="")
for (i in seq(7)){
genes<-peakGeneRegions(bedData[reg[,i],],a,geneList)
write.table(genes,filenames[[i]],quote=FALSE,col.names=FALSE,row.names=FALSE)}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.