1
$\begingroup$

I want to load a GFF (annotation) file into an R data frame in order to extract some information from it, e.g. the location of transposons in the genome.

I used the following code:

library(rtracklayer)
gff <- rtracklayer::import('c_elegans.PRJNA13758.WS263.annotations.gff3.gz')
Error: cannot allocate vector of size 210.2 Mb

It seems that the GFF3 file is too big for loading into R. Do you know if this is limited by R or by my computer's memory?

I ran this on a GNU/Linux computer.

$\endgroup$

1 Answer 1

3
$\begingroup$

It depends of course on your available RAM on your computer.

Under Windows you can increase the available RAM in R with memory limit:

> memory.limit()
[1] 8070
> memory.limit(size=10000)
[1] 10000
> memory.limit()
[1] 10000

But that is not necessary on linux/unix.

$\endgroup$
2
  • 2
    $\begingroup$ This only works (and is only required) on Windows. OP is using Linux. Not sure why he accepted this answer. $\endgroup$ May 20, 2018 at 12:39
  • 1
    $\begingroup$ Indeed, memory.limit() [1] Inf Warning message: 'memory.limit()' is Windows-specific. I understood this as 'no memory limit' on Linux, so only limited by available RAM? $\endgroup$ May 21, 2018 at 0:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.