Using GenomeGraphs effectively for generating publication quality pictures
1
0
Entering edit mode
Daren Tan ▴ 190
@daren-tan-3105
Last seen 10.2 years ago
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]]
affy biomaRt ideogram GenomeGraphs affy biomaRt ideogram GenomeGraphs • 1.7k views
ADD COMMENT
0
Entering edit mode
@steffenstatberkeleyedu-2907
Last seen 10.2 years ago
Hi Daren, > 1) How to include the cytoband information e.g. 4q to the ideogram ? How > to label the gene in the cytoband with "IL8" ? Currently you can not include cytoband information on the ideogram. How would you want this to look like? > 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. You can set your own colors for these by the DisplayPars function when creating genes and transcripts, e.g.: gene <- new("Gene", id = "TP53", type="hgnc_symbol", biomart = mart, dp=DisplayPars(color="green")) By default the colors are orange for genes and cornflowerblue for transcripts. > 3) How to make the legend a single line ? Currently, the words are below > the boxes This is hard-coded at this point. > 4) I have affy U133A, exon 1.0ST and agilent 44K probes to map to the > gene. How can I do that ? I think all these platforms are in Ensembl so you could use biomaRt to link them to the Ensembl Gene id. Here's an example: library(biomaRt) mart = useMart("ensembl", dataset="hsapiens_gene_ensembl") map = getBM(c("ensembl_gene_id", "affy_hg_u133a"), filters = "affy_hg_u133a", values=c("209718_at","221633_at"), mart=mart) >map ensembl_gene_id affy_hg_u133a 1 ENSG00000025770 209718_at 2 ENSG00000025770 221633_at > 5) How to space the numbers away from the genomeAxis so that it looks less > clustered ? This is hard-coded at this time as well. Hope this helps. Steffen > > 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]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD COMMENT
0
Entering edit mode
Thanks steffen, I will try your suggestions. > Date: Tue, 25 Nov 2008 20:51:21 -0800> Subject: Re: [BioC] Using GenomeGraphs effectively for generating publication quality pictures> From: steffen@stat.Berkeley.EDU> To: daren76@hotmail.com> CC: bioconductor@stat.math.ethz.ch> > Hi Daren,> > > 1) How to include the cytoband information e.g. 4q to the ideogram ? How> > to label the gene in the cytoband with "IL8" ?> > Currently you can not include cytoband information on the ideogram. How> would you want this to look like?> > > 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.> > You can set your own colors for these by the DisplayPars function when> creating genes and transcripts, e.g.:> > gene <- new("Gene", id = "TP53", type="hgnc_symbol", biomart = mart,> dp=DisplayPars(color="green"))> > > By default the colors are orange for genes and cornflowerblue for> transcripts.> > > 3) How to make the legend a single line ? Currently, the words are below> > the boxes> > This is hard-coded at this point.> > > 4) I have affy U133A, exon 1.0ST and agilent 44K probes to map to the> > gene. How can I do that ?> > I think all these platforms are in Ensembl so you could use biomaRt to> link them to the Ensembl Gene id. Here's an example:> > library(biomaRt)> mart = useMart("ensembl", dataset="hsapiens_gene_ensembl")> map = getBM(c("ensembl_gene_id", "affy_hg_u133a"), filters => "affy_hg_u133a", values=c("209718_at","221633_at"), mart=mart)> > >map> ensembl_gene_id affy_hg_u133a> 1 ENSG00000025770 209718_at> 2 ENSG00000025770 221633_at> > > > 5) How to space the numbers away from the genomeAxis so that it looks less> > clustered ?> > This is hard-coded at this time as well.> > Hope this helps.> Steffen> > >> > 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]]> >> > _______________________________________________> > Bioconductor mailing list> > Bioconductor@stat.math.ethz.ch> > https://stat.ethz.ch/mailman/listinfo/bioconductor> > Search the archives:> > http://news.gmane.org/gmane.science.biology.informatics.conductor> >> _________________________________________________________________ [[alternative HTML version deleted]]
ADD REPLY

Login before adding your answer.

Traffic: 606 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6