[Seqinr-forum] loading AA-Sequences from Excel
Immanuel
mane.desk at googlemail.com
Tue Jul 6 23:39:48 CEST 2010
Hello Lenor,
thank's for the answer, but I couldn't find an easy way to convert
the csv into fasta format, so I tried my luck with R.
But till now, I couldn't figure out how to to convert one row of strings
in a data frame
with s2c(), since this function only accepts single strings.
Any hints? My code is below.
best regards
Immanuel
---------------------------
Seq = read.table(file = "smallTest.csv",sep = ",", dec = "." , header =
TRUE , colClasses = c('character', 'numeric', 'numeric','character') )
# excel to cvs: use comma as separator, point as decimal, and no quotes!!
names(Seq)
str(Seq)
Seq[2]
library(seqinr)
write.fasta(Seq$sequence,s2c(Seq$ID) , file = "test.fasta", open = "w",
nbchar = 60)
----------------------
the last line produces following error:
1> write.fasta(Seq$sequence,s2c(Seq$ID) , file = "test.fasta", open =
"w", nbchar = 60)
Warning message:
In s2c(Seq$ID) : Wrong argument type in s2c(), NA returned
More information about the Seqinr-forum
mailing list