Last active
August 14, 2016 10:10
-
-
Save al2na/58f7856503dae62d5597cd6163c2068b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p300.url="http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeAwgTfbsUniform/wgEncodeAwgTfbsHaibH1hescP300V0416102UniPk.narrowPeak.gz" | |
Nanog.url="http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeAwgTfbsUniform/wgEncodeAwgTfbsHaibH1hescNanogsc33759V0416102UniPk.narrowPeak.gz" | |
SP1.url="http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeAwgTfbsUniform/wgEncodeAwgTfbsHaibH1hescSp1Pcr1xUniPk.narrowPeak.gz" | |
chrHMM.url="http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHmm/wgEncodeBroadHmmH1hescHMM.bed.gz" | |
#http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeAwgSegmentation/wgEncodeAwgSegmentationChromhmmH1hesc.bed.gz" | |
# get chromHMM annotation and make a list out of it | |
library(genomation) | |
chrHMM=readBed(chrHMM.url) | |
chrHMM.list=GenomicRanges::split(chrHMM, chrHMM$name,drop=TRUE) | |
# get peaks | |
p300=readBed(p300.url) | |
SP1=readBed(SP1.url) | |
NANOG=readBed(Nanog.url) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heatTargetAnnotation(peak2ann.l) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mat=heatTargetAnnotation(peak2ann.l,plot=FALSE) | |
library(gplots) | |
heatmap.2(mat,col="topo.colors",cellnote=round(mat), | |
notecol="black",trace="none",cexCol=0.5,cexRow=0.8) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install the package from github | |
library(devtools) | |
install_github("BIMSBbioinfo/genomation",build_vignettes=FALSE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
peak2ann=annotateWithFeatures(p300,chrHMM.list) | |
peak2ann |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
peak.list=GenomicRanges::GRangesList(p300=p300,SP1=SP1,NANOG=NANOG) | |
peak2ann.l=annotateWithFeatures(peak.list,chrHMM.list) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment