[genoPlotR-help] genoPlotR

Peter Neofotis pneofotis at gmail.com
Thu May 5 17:30:12 CEST 2011


Dr. Guy,
Thank you. Yes, the system.file command is what got me. I was able to do the
following

##Panel: Charophyte Algae Chloroplast Genome

bbone <- read_mauve_backbone (
"/Users/pgn6/Desktop/R/CharaphyteAlgaeAligned.backbone", ref=3, filter_low=
500)


names <- c("Mesostigma", "Chlorokybus", "Chara", "Chaetosphaeridium",
"Zygnerna", "Staurastrum")


names(bbone$dna_segs) <- names



but when i do the next step, below,


for (i in 1:length(bbone$comparisons)) {

     cmp <- bbone$comparisons[[i]]

     bbone$comparisons[[i]]$length <- abs(cmp$end1 - cmp$start1) +

         abs(cmp$end2 - cmp$start2) }


I get the following error.

Error: unexpected '$' in "bbone$comparisons[[i]$"
> for (i in 1:length(bbone$comparisons)) {
Error: unexpected input in "for¬"
>      cmp <- bbone$comparisons[[i]]
Error: unexpected input in "¬"
>      bbone$comparisons[[i]]$length <- abs(cmp$end1 - cmp$start1) +
Error: unexpected input in "¬"
>          abs(cmp$end2 - cmp$start2) }
Error: unexpected input in "¬"

I'm copying the text right from what you did. I get the same error when I do
your example:

library (genoPlotR)

data(mauve_bbone)

bbone_file <- system.file("extdata/barto.backbone", package = "genoPlotR")

bbone <- read_mauve_backbone(bbone_file, ref = 2, filter_low = 10000)

names <- c("B_bacilliformis", "B_grahamii", "B_henselae", "B_quintana")

names(bbone$dna_segs) <- names


for (i in l:length(bbone$comparisons)) {

    cmp <- bbone$comparisons[[i]]

    bbone$comparisons[[i]]$length <- abs(cmp$end1 - cmp$start1)

         abs(cmp$end2 - cmp$start2)

}


for (i in l:length(bbone$comparisons)) {

Error: unexpected input in "for¬"

>     cmp <- bbone$comparisons[[i]]

Error: unexpected input in "¬"

>     bbone$comparisons[[i]]$length <- abs(cmp$end1 - cmp$start1)

Error: unexpected input in "¬"

>          abs(cmp$end2 - cmp$start2)

Error: unexpected input in "¬"

> }

Error: unexpected '}' in "}"



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.

Best,

Peter

On Thu, May 5, 2011 at 3:19 AM, Lionel Guy <lionel.guy at ebc.uu.se> wrote:
>
> Dear Peter,
>
> Thank you for your interest in genoPlotR.
> 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:
>
> > bbone_file <- system.file("extdata/barto.backbone", package =
"genoPlotR")
>
> If you look at bbone_file, it will probably contain something like:
>
> > bbone_file
> [1] "/Users/lguy/Library/R/2.12/library/genoPlotR/extdata/barto.backbone"
>
>
> 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:
>
> > bbone_file <- "/Users/pgn6/Desktop/R/CharaphyteAlgaeAligned.backbone"
> > bbone <- read_mauve_backbone(bbone_file, ref=3, filter_low=10000)
>
> Alternatively, you can directly use the path in that latter command:
>
> > bbone <-
read_mauve_backbone("/Users/pgn6/Desktop/R/CharaphyteAlgaeAligned.backbone",
ref=3, filter_low=10000)
>
> Hope that solves it. Let me know if you have further problems.
> 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!
>
> Best,
>
> Lionel
>
> > Dr. Guy,
> >
> > I have been learning your genoPlotR program and just love it. One of the
most useful tools I've seen in a long time.
> >
> > 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.
> >
> > In example 3 of your guidance document you do the following
> >
> > > bbone_file <- system.file("extdata/barto.backbone", package =
"genoPlotR")
> > > bbone <- read_mauve_backbone(bbone_file, ref = 2, filter_low = 10000)
> >
> >
> > 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)
> > then I type the following based on what you did above (I just drag the
fill between the "")
> > bbone_file <-
system.file("/Users/pgn6/Desktop/R/CharaphyteAlgaeAligned.backbone", package
= "genoPlotR")
> > bbone <- read_mauve_backbone(bbone_file, ref=3, filter_low=10000)
> >
> >
> > and I get the following Error
> >
> > Error in read.table(file, stringsAsFactors = FALSE, header = header) :
> >   no lines available in input
> > In addition: Warning message:
> > In file(file, "rt") :
> >   file("") only supports open = "w+" and open = "w+b": using the former
> >
> >
> > any idea what this means?
> >
> > Thank you so much for your help with this. I hope to work with this
program in my research at the NYBG.
> >
> > Best ,
> >
> > Peter Neofotis
> > <CharaphyteAlgaeAligned.backbone>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/genoplotr-help/attachments/20110505/3fe8baf8/attachment.htm>


More information about the genoPlotR-help mailing list