[BioC] finding end of file in FASTA file

Jack [guest] guest at bioconductor.org
Thu Sep 13 10:42:54 CEST 2012

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.


 -- output of sessionInfo(): 

> sessionInfo() 
R version 2.15.1 (2012-06-22)
Platform: i386-pc-mingw32/i386 (32-bit)

[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ShortRead_1.14.4     latticeExtra_0.6-24  RColorBrewer_1.0-5   Rsamtools_1.8.6      lattice_0.20-10      Biostrings_2.24.1    GenomicRanges_1.8.13
[8] IRanges_1.14.4       BiocGenerics_0.2.0  

loaded via a namespace (and not attached):
[1] Biobase_2.16.0 bitops_1.0-4.1 grid_2.15.1    hwriter_1.3    stats4_2.15.1  tools_2.15.1   zlibbioc_1.2.0

Sent via the guest posting facility at bioconductor.org.

More information about the Bioconductor mailing list