[Bioc-devel] Sequences from non-disk sources

Aleksandr Levchuk alevchuk at gmail.com
Tue Aug 4 04:17:54 CEST 2009


Dear BioC developers,

Some of my sequences come from non-disk sources:
  Network
  Un-compressors
  Other tool arranged as piplines

I was able to stream such sources into R without touching the disk:
=========================
#!/usr/bin/env Rscript

library(Biostrings)
s <- read.AAStringSet("/dev/stdin", "fasta")

#
# operate on s
#
=========================

Assuming the above file is called my.R, I can run:
  chmod +x my.R
  cat my.fasta.gz |  gzip -dc | ./my.R

Very powerful and flexible.


But I would like to would eliminate my "hackish" /dev/stdin fifo approach.

I noticed that functions 'write.XStringSet' and 'write.XStringViews'
have an official documented way that allows writing to standard
output.


Would it be difficult to add an argument to the Biostrings read
functions to allow reading sequences from standard input?


Alex

-- 
---------------------------------------------------------------
Aleksandr Levchuk
Bioinformatic Systems and Databases

University of California, Riverside
Institute for Integrative Genome Biology



More information about the Bioc-devel mailing list