[R] how to find end of a FASTA file

mail me mailme842 at googlemail.com
Thu Sep 13 13:19:27 CEST 2012


Hi:

I am trying to find end of a FASTA file:

library(ShortRead)
fastadata <- readFasta("fastafolder", "fa$")
file <- tempfile()
writeFasta(fastadata, file)
var1 <- readLines(file)
while(countlength(tmp <- readLines(file, n = -1)) > 0)  {
#do something
}

I want the while loop to run till the end of file is reached, but the
while statement dosent work. Thanks for help.

Regards
Jac



More information about the R-help mailing list