Hi,

I am trying to work with the ape package, and there is one thing I am
struggling with.  When calling the *read.GenBank()* function, I can get it
to work with an object created like this:

*>x <- c("AY395554","AY611035", ...)*
*>read.GenBank(x)*

However, I am trying to use the function to fetch several hundred sequences
at once.  So I have been testing with small files, but cannot get the right
format.  I tried to enter accession numbers with or without headers as a
.csv and just as a text file, and I have tried *as.vector*, but I always get
this error:

>*x <- read.csv("numbers.csv",head=T)*
*>attach(x)*
*>x.vect <- as.vector(t(x)**)*
*>x.seqs <- read.GenBank(x.vect)*

Error in FI[i]:LA[i] : NA/NaN argument

I have been trying this with an identical set of accession numbers, and it
always works with the c() vector but not with the table, so the content is
not the problem.  I assume I am just missing a simple data structure detail,
but I am at a loss.  I have even tried a c() vector of more than a hundred
accession numbers, and it worked quite well, so the length is not a
problem.

Thanks,
James


-- 
James Meadow
Land Resources and Environmental Sciences
Montana State University
(406) 370-7157
jfmea...@gmail.com

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to