Description Usage Arguments Details Examples
ploGenesInChromosomes
Given a list of genes with their transcript coordenates, the function will plot the genes
on their specific locations on each corresponding chromosme. It can also collocate the genes with CpG islands information and
and DNAseI hypersesitive sites.
1 2 | plotGenesInChroms(transcriptCoords, plotsFilename, minbase, maxbase,
islandData, dnaseData)
|
transcriptCoords |
object of class containing a list of genes annotated with the getGenesLocations |
plotsFilename |
object with the name of the file that will be used to save the .pdf with the graphs. |
minbase |
number for the smallest basepair position of the chromosome. First position on the chromosome from the 5' side. |
maxbase |
number for the largest basepair position of the chromosome. Last position on the chomosome from the 5' side. |
islandData |
object of class GRanges containing CpG islands position data. |
dnaseData |
object of class GRanges containing DNAseI hypersensitive sites position data. |
The data for the cpG islands was obtained from http://hgdownload.cse.ucsc.edu/goldenpath/hg19/database/cpgIslandExt.txt.gz and the data for the DNAseI hypersensitive sites from http://hgdownload.cse.ucsc.edu/goldenpath/hg19/encodeDCC/wgEncodeRegDnaseClustered/ For both datasets, positions were annotated with GenomicRanges::GRanges().
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## Not run:
transcriptCoords <- getGenesLocations(rownames(selectedGenes),
csvFileName="results/coordsselectedGenes.csv")
starts <- min(lapply(transcriptCoords, function(tc){as.numeric(min(tc$TXSTART))}))
ends <- max(lapply(transcriptCoords, function(tc){as.numeric(max(tc$TXEND))}))
minbase <- starts - (0.25*(ends-starts)) #allow 25% extra space on the plot
maxbase <- ends + (0.25*(ends-starts))
islandHMM = read.csv(paste("dades", "model-based-cpg-islands-hg19.txt",sep="/"),
stringsAsFactors=FALSE, header=TRUE)
islandData <- GRanges(seqnames=Rle(islandHMM$chr),
ranges=IRanges(start=islandHMM$start, end=islandHMM$end),
strand=Rle(strand(rep("*",nrow(islandHMM)))))
dnase <- read.csv(paste("dades","wgEncodeRegDnaseClusteredV3.bed",sep="/"),
stringsAsFactors=FALSE,header=FALSE)
dnaseData <- GRanges(seqnames=dnase[,1],
ranges=IRanges(start=dnase[,2], end=dnase[,3]),
strand=Rle(rep("*",nrow(dnase))),
data=dnase[,5])
plotGenesInChromosomes(transcCoords, fileName, minbase, maxbase, islanData, dnaseData)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.