[genoPlotR-help] genoPlotR question: visualizing an HPV reference genome

Lionel Guy lionel.guy at icm.uu.se
Mon Feb 2 08:48:00 CET 2015


Hi Gordon,

I haven't worked extensively with eukaryotic sequences, so in some ways the gbk parser might be behaving strangely with spliced sequences, for example. 
That being said, there are more blocks, they are just all the same color. Try

hpv.df$col <- rainbow(nrow(hdv.df))
hpv.df$gene_type <- "arrows"
annot <- annotation(x1=middle(hpv.df), text=hpv.df$name, rot=0)
plot_gene_map(list(hpv.df), annotations=annot)

that should help you see better. 

To plot different genes on different lines, you'll either have to separate them on different dna_segs, or write your own plotting functions. See the vignette for genoPlotR or the help page for function gene_types

Kind regards,

Lionel


> On 2 Feb 2015, at 0:04 , Gordon Robertson <grobertson at bcgsc.ca> wrote:
> 
> Thanks Lionel
> 
> That worked. It gave me a two-block graphic (attached). What I'd like is something like the CDS (gene) view (attached). How would I get that?  
> 
> Thanks,
> 
> Gordon
> --
> Gordon Robertson
> Canada's Michael Smith Genome Sciences Centre
> BC Cancer Agency 
> Vancouver BC Canada
> www.bcgsc.ca
> T: 604-707-5900 x675416
> Skype: a.gordon.robertson
> 
> 
> 
> On 2015-02-01, at 1:38 PM, Lionel Guy wrote:
> 
>> Hi Gordon,
>> 
>> Thanks for your interest in genoPlotR.
>> 
>> The dna_segs argument of plot_gene_map should be a list of dna_seg objects. To plot one single dna_seg, use a list composed of a single dna_seg object:
>> 
>> plot_gene_map(list(hpv.df))
>> 
>> That should do the trick.
>> HTH,
>> 
>> Lionel
>> 
>> 
>>> On 1 Feb 2015, at 21:17 , Gordon Robertson <agrobertson at telus.net> wrote:
>>> 
>>> Hi Lionel,
>>> 
>>> I'm exploring (assessing) the genoPlotR package as a simple and extensible way of drawing information on viral integration into human genes in cancer. There are a number of components to this. I'm trying to take a first step. 
>>> 
>>> I'm also looking at the Gviz package. 
>>> 
>>> As a first step I've downloaded an HPV16 reference genome Genbank-format file from PaVE (attached). The file loads easily into genoPlotR. Now I'd like to plot the genes in the genome. 
>>> 
>>> library(genoPlotR)
>>> 
>>> # HPV16 reference genome
>>> hpv.df <- read_dna_seg_from_file("/Users/grobertson/resources/genomic_data/viral/PaVE/HPV16.ref.PaVE.GenBank.format.txt", tagsToParse=c("CDS","misc_feature","gene"), fileType = "detect", meta_lines = 2, gene_type = "blocks", header = TRUE, extra_fields = c("db_xref", "transl_table"))
>>> 
>>> str(hpv.df)
>>> # Classes ‘dna_seg’ and 'data.frame':  25 obs. of  19 variables:
>>> #$ name        : chr  "E1" "E2" "E4" "E5_ALPHA" ...
>>> #$ start       : num  865 2756 3333 3850 83 ...
>>> #...
>>> 
>>> plot_gene_map(hpv.df)
>>> Error in plot_gene_map(hpv.df) : 
>>>  Argument dna_segs must be a list of dna_seg objects
>>> 
>>> Would you be willing to help me resolve this? I apologize for emailing so early in assessing your package, but I have very limited time for resolving this visualization issue. I'm using R 3.1.2 on OS X, and working in the latest RStudio. 
>>> 
>>> Thank you. 
>>> 
>>> Gordon
>>> --
>>> Gordon Robertson
>>> agrobertson at telus.net
>>> 
>>> 
>>> 
>>> <HPV16.ref.PaVE.GenBank.format.txt>
>> 
>> --
>> Lionel Guy
>> Department for Medical Biochemistry and Microbiology, Uppsala University, Uppsala, Sweden
>> postal address: Box 582, SE-751 23 Uppsala; visiting address: BMC D7:3, Husargatan 3, SE-752 37 Uppsala
>> phone: +46 73 976 0618
>> lionel.guy at imbim.uu.se
>> 
> 
> <screenshot_585.tif><PastedGraphic-1.pdf>

--
Lionel Guy
Department for Medical Biochemistry and Microbiology, Uppsala University, Uppsala, Sweden
postal address: Box 582, SE-751 23 Uppsala; visiting address: BMC D7:3, Husargatan 3, SE-752 37 Uppsala
phone: +46 73 976 0618
lionel.guy at imbim.uu.se



More information about the genoPlotR-help mailing list