[BioC] Using GenomeGraphs effectively for generating publication quality pictures

Daren Tan daren76 at hotmail.com
Mon Nov 24 03:36:10 CET 2008


Hi, 
 
I am using GenomeGraphs to generate gene structures. My codes are below:
 
A few questions that I have
1) How to include the cytoband information e.g. 4q to the ideogram ? How to label the gene in the cytoband with "IL8" ?
2) What colour is actually used by gene and transcript ? I have created a legend with "orange" and "lightblue", but the colour doesn't look the same.
3) How to make the legend a single line ? Currently, the words are below the boxes
4) I have affy U133A, exon 1.0ST and agilent 44K probes to map to the gene. How can I do that ?
5) How to space the numbers away from the genomeAxis so that it looks less clustered ?

 
library("biomaRt")
library("GenomeGraphs")
 
mart <- useMart("ensembl", dataset="hsapiens_gene_ensembl")
drawGS <- function(gene_symbol) {
  gs <- getBM(attributes=c("hgnc_symbol", "ensembl_gene_id", "chromosome_name", "start_position", "end_position", "band"), filter=c("hgnc_symbol"), values=gene_symbol, mart=mart)
  
  title <- new("Title", title = paste(gs[1], ":", gs[2]), dp = DisplayPars(color = "darkred"))
  ideog <- new("Ideogram", chromosome = as.character(gs[3]))
  genomeAxis <- new("GenomeAxis", add53 = TRUE, add35 = TRUE)
  gene <- new("Gene", id = as.character(gs[2]), biomart = mart)
  transcript <- new("Transcript", id = as.character(gs[2]), biomart = mart)
  
  legend <- new("Legend", legend = c("gene", "transcript"), dp = DisplayPars(color = c("orange", "lightblue")))
  
  pdf(paste(gene_symbol, ".pdf", sep=""))
  gdPlot(list(title, ideog, genomeAxis, gene, transcript, legend), minBase = as.integer(gs[4]), maxBase = as.integer(gs[5]))
  dev.off() 
}

drawGS("IL8")
_________________________________________________________________
[[elided Hotmail spam]]



More information about the Bioconductor mailing list