[BioC] FW: How to plot microRNA chromosome location

Dykema, Karl Karl.Dykema at vai.org
Thu Nov 6 19:18:14 CET 2008


Hello Bioc users,

        While our package idiogram is has been created to primarily display gene expression data (with an associated chromLocation object) you can alternatively create one on the fly. In the code below I create a mock data frame similar to Camper's and from that I generate a bare bones chromLocation object. From there you can plot the data a couple of different ways. Feel free to ask further questions or offer suggestions. Thanks!


-------------------------------------------
Karl Dykema
Computational Biologist
Van Andel Research Institute
333 Bostwick Ave NE
Grand Rapids, MI 49503




  ## load idiogram package
library(idiogram)


  ## create mock data object
data <- data.frame(miRNA=c("hsa-miR-130b","hsa-miR-33a","hsa-miR-15b1","hsa-miR-15b2","hsa-miR-15b3","hsa-miR-15b4"),
                   chrom=c("1","1","4","5","6","13"),
                   start=c(20337592,40626894,161605069,28337592,30337592,337592))


  ## create chromLocation object
genome <- new("chromLocation")
start <- data[,"start"]
names(start) <- data[,"miRNA"]
genome at chromLocs <- new("list",tapply(start,factor(data[,"chrom"]),I))
genome at organism <- "Homo Sapiens"


  ## create vector of mock data
toPlot <- rep(1,length(data$miRNA))
names(toPlot) <- data$miRNA


  ## plot with cytobands represented by tick marks
idiogram(toPlot,genome,"1",type="p",xlim=c(0,2))

  ## plot with cytobands represented by an image of an idiogram
idiogram(toPlot,genome,"1",type="p",xlim=c(0,2),margin="i")

This email message, including any attachments, is for th...{{dropped:6}}



More information about the Bioconductor mailing list