[BioC] gpr.gz
Sean Davis
sdavis2 at mail.nih.gov
Thu Oct 13 20:59:35 CEST 2005
On 10/13/05 2:50 PM, "Rafael A. Irizarry" <ririzarr at jhsph.edu> wrote:
> but then how to create an RGlist or marrayRaw? do i have to
> rewrite or hack the gpr parsers?
>
> On Thu, 13 Oct 2005, Sean Davis wrote:
>
>> On 10/13/05 2:39 PM, "Rafael A. Irizarry" <ririzarr at jhsph.edu> wrote:
>>
>>> hi! any recs on how to deal with gzipped gpr files? if possible id like to
>>> read them into bioc without unzipping them first.
>>
>> Rafael,
>>
>> Look at ?gzfile. Will that do what you want?
>>
>> Txtfile <- readLines(gzfile('txtfile.gz'))
>>
>> Sean
>>
>
Rafael,
I think that would be the case, yes. I haven't tried it, but I think you
might be able to get away with modifying only three lines in the readGAL
function (noted below). I may have missed some and I haven't tested, but I
think these should work.
galfile <- dir(path = path, pattern = "\\.gal$")
galfile <- dir(path = path, pattern = "\\.gal.gz$")
chunk <- readLines(galfile, n = 100)
chunk <- readLines(gzfile(galfile), n = 100)
gal <- read.table(galfile, header = header, sep = sep, quote = quote,
skip = skip, as.is = as.is, comment.char = "", ...)
gal <- read.table(gzfile(galfile), header = header, sep = sep,
quote = quote,
skip = skip, as.is = as.is, comment.char = "", ...)
Sean
More information about the Bioconductor
mailing list