<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Lionel,<div><br></div><div>I've discussed the HPV16 graphic from your package with a senior genomics person here. She recognized that it was useful to be able to read Genbank PaVE files directly. I've passed on the script that I was using, which uses your code to get coloured genes. </div><div><br></div><div>Thanks for your help. We will look more at the package as time permits. </div><div><br></div><div>Gordon<br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><br></div></div></div></span></div></span></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br><div><div>On 2015-02-02, at 11:41 AM, Lionel Guy wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">

<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">

<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
Hi Gordon,
<div class=""><br class="">
</div>
<div class="">My complete code is:</div>
<div class=""><br class="">
</div>
<div class="">library(genoPlotR)<br class="">
hpv.df <- read_dna_seg_from_file("/Users/lguy/Desktop/tmp/HPV16.ref.PaVE.gbk", tagsToParse=c("CDS"), fileType = "detect", meta_lines = 2, gene_type = "blocks", header = TRUE, extra_fields = c("db_xref", "transl_table"))<br class="">
hpv.df$col <- rainbow(nrow(hpv.df))<br class="">
hpv.df$gene_type <- "arrows"<br class="">
annot <- annotation(x1=middle(hpv.df), text=hpv.df$name, rot=0)<br class="">
plot_gene_map(list(hpv.df), annotations=annot)<br class="">
<br class="">
</div>
<div class="">And it yields the following plot:</div>
<div class=""><br class="">
</div>
<div class=""><span><PastedGraphic-1.png></span></div>
<div class=""><br class="">
</div>
<div class="">HTH,</div>
<div class=""><br class="">
</div>
<div class="">Lionel<br class="">
<blockquote type="cite" class="">On 2 Feb 2015, at 17:58 , Gordon Robertson <<a href="mailto:grobertson@bcgsc.ca" class="">grobertson@bcgsc.ca</a>> wrote:<br class="">
<br class="">
Thank you. Your code generated a graphic with a single line of dark blue arrows (for genes), with gene symbols above the arrows. I've looked briefly at the vignette and the help page for gene_types, but I do not have time right now to work with this information.<br class="">
<br class="">
Gordon<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
On 2015-02-01, at 11:48 PM, Lionel Guy wrote:<br class="">
<br class="">
<blockquote type="cite" class="">Hi Gordon,<br class="">
<br class="">
I haven't worked extensively with eukaryotic sequences, so in some ways the gbk parser might be behaving strangely with spliced sequences, for example. <br class="">
That being said, there are more blocks, they are just all the same color. Try<br class="">
<br class="">
hpv.df$col <- rainbow(nrow(hdv.df))<br class="">
hpv.df$gene_type <- "arrows"<br class="">
annot <- annotation(x1=middle(hpv.df), text=hpv.df$name, rot=0)<br class="">
plot_gene_map(list(hpv.df), annotations=annot)<br class="">
<br class="">
that should help you see better. <br class="">
<br class="">
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<br class="">
<br class="">
Kind regards,<br class="">
<br class="">
Lionel<br class="">
<br class="">
<br class="">
<blockquote type="cite" class="">On 2 Feb 2015, at 0:04 , Gordon Robertson <<a href="mailto:grobertson@bcgsc.ca" class="">grobertson@bcgsc.ca</a>> wrote:<br class="">
</blockquote>
<blockquote type="cite" class=""><br class="">
</blockquote>
<blockquote type="cite" class="">Thanks Lionel<br class="">
</blockquote>
<blockquote type="cite" class=""><br class="">
</blockquote>
<blockquote type="cite" class="">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?  <br class="">
</blockquote>
<blockquote type="cite" class=""><br class="">
</blockquote>
<blockquote type="cite" class="">Thanks,<br class="">
</blockquote>
<blockquote type="cite" class=""><br class="">
</blockquote>
<blockquote type="cite" class="">Gordon<br class="">
</blockquote>
<blockquote type="cite" class="">--<br class="">
</blockquote>
<blockquote type="cite" class="">Gordon Robertson<br class="">
</blockquote>
<blockquote type="cite" class="">Canada's Michael Smith Genome Sciences Centre<br class="">
</blockquote>
<blockquote type="cite" class="">BC Cancer Agency <br class="">
</blockquote>
<blockquote type="cite" class="">Vancouver BC Canada<br class="">
</blockquote>
<blockquote type="cite" class=""><a href="http://www.bcgsc.ca/" class="">www.bcgsc.ca</a><br class="">
</blockquote>
<blockquote type="cite" class="">T: 604-707-5900 x675416<br class="">
</blockquote>
<blockquote type="cite" class="">Skype: a.gordon.robertson<br class="">
</blockquote>
<blockquote type="cite" class=""><br class="">
</blockquote>
<blockquote type="cite" class=""><br class="">
</blockquote>
<blockquote type="cite" class=""><br class="">
</blockquote>
<blockquote type="cite" class="">On 2015-02-01, at 1:38 PM, Lionel Guy wrote:<br class="">
</blockquote>
<blockquote type="cite" class=""><br class="">
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">Hi Gordon,<br class="">
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">Thanks for your interest in genoPlotR.<br class="">
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">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:<br class="">
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">plot_gene_map(list(hpv.df))<br class="">
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">That should do the trick.<br class="">
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">HTH,<br class="">
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">Lionel<br class="">
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class="">On 1 Feb 2015, at 21:17 , Gordon Robertson <<a href="mailto:agrobertson@telus.net" class="">agrobertson@telus.net</a>> wrote:<br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class="">Hi Lionel,<br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class="">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. <br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class="">I'm also looking at the Gviz package. <br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class="">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. <br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class="">library(genoPlotR)<br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class=""># HPV16 reference genome<br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class="">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"))<br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class="">str(hpv.df)<br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class=""># Classes ‘dna_seg’ and 'data.frame':  25 obs. of  19 variables:<br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class="">#$ name        : chr  "E1" "E2" "E4" "E5_ALPHA" ...<br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class="">#$ start       : num  865 2756 3333 3850 83 ...<br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class="">#...<br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class="">plot_gene_map(hpv.df)<br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class="">Error in plot_gene_map(hpv.df) : <br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class="">Argument dna_segs must be a list of dna_seg objects<br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class="">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. <br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class="">Thank you. <br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class="">Gordon<br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class="">--<br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class="">Gordon Robertson<br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class=""><a href="mailto:agrobertson@telus.net" class="">agrobertson@telus.net</a><br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<blockquote type="cite" class=""><HPV16.ref.PaVE.GenBank.format.txt><br class="">
</blockquote>
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">--<br class="">
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">Lionel Guy<br class="">
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">Department for Medical Biochemistry and Microbiology, Uppsala University, Uppsala, Sweden<br class="">
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">postal address: Box 582, SE-751 23 Uppsala; visiting address: BMC D7:3, Husargatan 3, SE-752 37 Uppsala<br class="">
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class="">phone: +46 73 976 0618<br class="">
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class=""><a href="mailto:lionel.guy@imbim.uu.se" class="">lionel.guy@imbim.uu.se</a><br class="">
</blockquote>
</blockquote>
<blockquote type="cite" class="">
<blockquote type="cite" class=""><br class="">
</blockquote>
</blockquote>
<blockquote type="cite" class=""><br class="">
</blockquote>
<blockquote type="cite" class=""><screenshot_585.tif><PastedGraphic-1.pdf><br class="">
</blockquote>
<br class="">
--<br class="">
Lionel Guy<br class="">
Department for Medical Biochemistry and Microbiology, Uppsala University, Uppsala, Sweden<br class="">
postal address: Box 582, SE-751 23 Uppsala; visiting address: BMC D7:3, Husargatan 3, SE-752 37 Uppsala<br class="">
phone: +46 73 976 0618<br class="">
<a href="mailto:lionel.guy@imbim.uu.se" class="">lionel.guy@imbim.uu.se</a><br class="">
<br class="">
</blockquote>
<br class="">
</blockquote>
<br class="">
<div class="">--<br class="">
Lionel Guy<br class="">
Department for Medical Biochemistry and Microbiology, Uppsala University, Uppsala, Sweden<br class="">
postal address: Box 582, SE-751 23 Uppsala; visiting address: BMC D7:3, Husargatan 3, SE-752 37 Uppsala<br class="">
phone: +46 73 976 0618<br class="">
<a href="mailto:lionel.guy@imbim.uu.se" class="">lionel.guy@imbim.uu.se</a><br class="">
</div>
<br class="">
</div>
</div>

</blockquote></div><br></div></body></html>