Re: [R] how to find end of a FASTA file

2012-09-13 Thread Martin Morgan
On 09/13/2012 04:19 AM, mail me wrote: 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

[R] how to find end of a FASTA file

2012-09-13 Thread mail me
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