Dr. Guy, <br>Thank you. Yes, the system.file command is what got me. I was able to do the following <br><br><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; color: #4f4f4f">##Panel: Charophyte Algae Chloroplast Genome </p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; color: #b0140c"><span style="color: #000000">bbone</span><span style="color: #042299"> <- </span><span style="color: #000000">read_mauve_backbone</span><span style="color: #042299"> (</span>"/Users/pgn6/Desktop/R/CharaphyteAlgaeAligned.backbone"<span style="color: #042299">, </span><span style="color: #000000">ref</span><span style="color: #042299">=</span><span style="color: #055118">3</span><span style="color: #042299">, </span><span style="color: #000000">filter_low</span><span style="color: #042299">= </span><span style="color: #055118">500</span><span style="color: #042299">)</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; color: #042299; min-height: 16.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; color: #b0140c"><span style="color: #000000">names</span><span style="color: #042299"> <- </span><span style="color: #000000">c</span><span style="color: #042299">(</span>"Mesostigma"<span style="color: #042299">, </span>"Chlorokybus"<span style="color: #042299">, </span>"Chara"<span style="color: #042299">, </span>"Chaetosphaeridium"<span style="color: #042299">, </span>"Zygnerna"<span style="color: #042299">, </span>"Staurastrum"<span style="color: #042299">)</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; color: #042299; min-height: 16.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier">names<span style="color: #042299">(</span>bbone<span style="color: #042299">$</span>dna_segs<span style="color: #042299">) <- </span>names</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier">
<br></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier"><br></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier">but when i do the next step, below,</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Verdana; color: #042299; min-height: 19.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier"><span style="color: #c3892c">for</span><span style="color: #042299"> (</span>i<span style="color: #042299"> </span><span style="color: #c3892c">in</span><span style="color: #042299"> </span><font class="Apple-style-span" color="#055118">1</font><span style="color: #042299">:</span>length<span style="color: #042299">(</span>bbone<span style="color: #042299">$</span>comparisons<span style="color: #042299">)) {</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier"><span style="color: #042299"> </span>cmp<span style="color: #042299"> <- </span>bbone<span style="color: #042299">$</span>comparisons<span style="color: #042299">[[</span>i<span style="color: #042299">]]</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier"><span style="color: #042299"> </span>bbone<span style="color: #042299">$</span>comparisons<span style="color: #042299">[[</span>i<span style="color: #042299">]]$</span>length<span style="color: #042299"> <- </span>abs<span style="color: #042299">(</span>cmp<span style="color: #042299">$</span>end1<span style="color: #042299"> - </span>cmp<span style="color: #042299">$</span>start1<span style="color: #042299">) + </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier"><span style="color: #042299"> </span>abs<span style="color: #042299">(</span>cmp<span style="color: #042299">$</span>end2<span style="color: #042299"> - </span>cmp<span style="color: #042299">$</span>start2<span style="color: #042299">) }</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier"><span style="color: #042299"><br></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier"><span style="color: #042299">I get the following error. </span></p>
<br><div>Error: unexpected '$' in "bbone$comparisons[[i]$"</div><div>> for (i in 1:length(bbone$comparisons)) {</div><div>Error: unexpected input in "for¬"</div><div>> cmp <- bbone$comparisons[[i]]</div>
<div>Error: unexpected input in "¬"</div><div>> bbone$comparisons[[i]]$length <- abs(cmp$end1 - cmp$start1) + </div><div>Error: unexpected input in "¬"</div><div>> abs(cmp$end2 - cmp$start2) }</div>
<div>Error: unexpected input in "¬"</div><div><br></div><div>I'm copying the text right from what you did. I get the same error when I do your example: </div><div><br></div><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier">
library<span style="color: #042299"> (</span>genoPlotR<span style="color: #042299">)</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier">data<span style="color: #042299">(</span>mauve_bbone<span style="color: #042299">)</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; color: #b0140c"><span style="color: #000000">bbone_file</span><span style="color: #042299"> <- </span><span style="color: #000000">system.file</span><span style="color: #042299">(</span>"extdata/barto.backbone"<span style="color: #042299">, </span><span style="color: #000000">package</span><span style="color: #042299"> = </span>"genoPlotR"<span style="color: #042299">)</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier">bbone<span style="color: #042299"> <- </span>read_mauve_backbone<span style="color: #042299">(</span>bbone_file<span style="color: #042299">, </span>ref<span style="color: #042299"> = </span><span style="color: #055118">2</span><span style="color: #042299">, </span>filter_low<span style="color: #042299"> = </span><span style="color: #055118">10000</span><span style="color: #042299">)</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; color: #b0140c"><span style="color: #000000">names</span><span style="color: #042299"> <- </span><span style="color: #000000">c</span><span style="color: #042299">(</span>"B_bacilliformis"<span style="color: #042299">, </span>"B_grahamii"<span style="color: #042299">, </span>"B_henselae"<span style="color: #042299">, </span>"B_quintana"<span style="color: #042299">)</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier">names<span style="color: #042299">(</span>bbone<span style="color: #042299">$</span>dna_segs<span style="color: #042299">) <- </span>names</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; color: #042299; min-height: 16.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier"><span style="color: #c3892c">for</span><span style="color: #042299"> (</span>i<span style="color: #042299"> </span><span style="color: #c3892c">in</span><span style="color: #042299"> </span>l<span style="color: #042299">:</span>length<span style="color: #042299">(</span>bbone<span style="color: #042299">$</span>comparisons<span style="color: #042299">)) {</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier"><span style="color: #042299"> </span>cmp<span style="color: #042299"> <- </span>bbone<span style="color: #042299">$</span>comparisons<span style="color: #042299">[[</span>i<span style="color: #042299">]]</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier"><span style="color: #042299"> </span>bbone<span style="color: #042299">$</span>comparisons<span style="color: #042299">[[</span>i<span style="color: #042299">]]$</span>length<span style="color: #042299"> <- </span>abs<span style="color: #042299">(</span>cmp<span style="color: #042299">$</span>end1<span style="color: #042299"> - </span>cmp<span style="color: #042299">$</span>start1<span style="color: #042299">) </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier"><span style="color: #042299"> </span>abs<span style="color: #042299">(</span>cmp<span style="color: #042299">$</span>end2<span style="color: #042299"> - </span>cmp<span style="color: #042299">$</span>start2<span style="color: #042299">)</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; color: #042299">}</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; color: #042299"><br></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; color: #042299">
</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; color: #042299">for (i in l:length(bbone$comparisons)) {</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; color: #042299">Error: unexpected input in "for¬"</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; color: #042299">> cmp <- bbone$comparisons[[i]]</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; color: #042299">Error: unexpected input in "¬"</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; color: #042299">> bbone$comparisons[[i]]$length <- abs(cmp$end1 - cmp$start1) </p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; color: #042299">
Error: unexpected input in "¬"</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; color: #042299">> abs(cmp$end2 - cmp$start2)</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; color: #042299">
Error: unexpected input in "¬"</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; color: #042299">> }</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; color: #042299">Error: unexpected '}' in "}"</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; color: #042299"><br></p><p></p></div><div><br></div><div>I REALLY appreciated your help with this. I will certainly send your my files as I finish them. There is quite a few things I can do with this package. </div>
<div><br></div><div>Best, </div><div><br></div><div>Peter </div><br>On Thu, May 5, 2011 at 3:19 AM, Lionel Guy <<a href="mailto:lionel.guy@ebc.uu.se">lionel.guy@ebc.uu.se</a>> wrote:<br>><br>> Dear Peter,<br>><br>
> Thank you for your interest in genoPlotR.<br>> The following command that is given in the help file is to retrieve the path to the file that is stored in the installation folder of genoPlotR:<br>><br>> > bbone_file <- system.file("extdata/barto.backbone", package = "genoPlotR")<br>
><br>> If you look at bbone_file, it will probably contain something like:<br>><br>> > bbone_file<br>> [1] "/Users/lguy/Library/R/2.12/library/genoPlotR/extdata/barto.backbone"<br>><br>><br>
> To use your own file, bbone_file should be a character giving the location of your file, that you can use as the first argument to read_mauve_backbone:<br>><br>> > bbone_file <- "/Users/pgn6/Desktop/R/CharaphyteAlgaeAligned.backbone"<br>
> > bbone <- read_mauve_backbone(bbone_file, ref=3, filter_low=10000)<br>><br>> Alternatively, you can directly use the path in that latter command:<br>><br>> > bbone <- read_mauve_backbone("/Users/pgn6/Desktop/R/CharaphyteAlgaeAligned.backbone", ref=3, filter_low=10000)<br>
><br>> Hope that solves it. Let me know if you have further problems.<br>> BTW, a new major release of genoPlotR has just been released. I recommend that you update to version 0.7. Good luck with using genoPlotR! I'm always interested in what the users do with it, so if you get interesting results or original uses for it, keep me posted!<br>
><br>> Best,<br>><br>> Lionel<br>><br>> > Dr. Guy,<br>> ><br>> > I have been learning your genoPlotR program and just love it. One of the most useful tools I've seen in a long time.<br>
> ><br>> > I'm having a hard time with one of the uses, though, and am wondering if you can just give me a word of advice.<br>> ><br>> > In example 3 of your guidance document you do the following<br>
> ><br>> > > bbone_file <- system.file("extdata/barto.backbone", package = "genoPlotR")<br>> > > bbone <- read_mauve_backbone(bbone_file, ref = 2, filter_low = 10000)<br>> ><br>
> ><br>> > Now, I was able to do this. But when I tried to do it for my own Mauve file I keep on getting an error. I created the following mauve file (attached)<br>> > then I type the following based on what you did above (I just drag the fill between the "")<br>
> > bbone_file <- system.file("/Users/pgn6/Desktop/R/CharaphyteAlgaeAligned.backbone", package = "genoPlotR")<br>> > bbone <- read_mauve_backbone(bbone_file, ref=3, filter_low=10000)<br>
> ><br>> ><br>> > and I get the following Error<br>> ><br>> > Error in read.table(file, stringsAsFactors = FALSE, header = header) :<br>> > no lines available in input<br>> > In addition: Warning message:<br>
> > In file(file, "rt") :<br>> > file("") only supports open = "w+" and open = "w+b": using the former<br>> ><br>> ><br>> > any idea what this means?<br>
> ><br>> > Thank you so much for your help with this. I hope to work with this program in my research at the NYBG.<br>> ><br>> > Best ,<br>> ><br>> > Peter Neofotis<br>> > <CharaphyteAlgaeAligned.backbone><br>
><br>><br><br>