Skip to content

In functional-enrichment.Rmd and gene-patterns.Rmd, add config for turning on/off lazy caching #391

@menoldmt

Description

@menoldmt

Problem:

When Rds objects become too large, a lazy loading error will prevent functional enrichment and gene patterns from rendering.

Proposed Solution:


Add documentation to both files indicating that lazy caching will be disabled if the .Rds object is too big. Include the approximate size of the Rds object that prevented lazy loading from working here and here. This was tested and found to be: 
 
functional-enrichment.Rmd fails when combined.Rds (from rnaseq.Rmd):

232.87 mb<combined.Rds<241.90 mb.



functional-enrichment.Rmd tests on ‘combined.Rds’:                           

contrasts used in test data:
results 1-11 = 241.9mb check 1: fail
results 1-10 = 232.87mb check 1: pass
results 1-9 = 223.84mb check 1: pass
results 1-8 = 214.82mb check 1: pass 2: Pass
 



gene-patterns.Rmd tests on ‘combined_functional_enrichment.Rds’
 
results 1-9 = 2071mb check 1: fail
results 1-8 = needs further testing to confirm .Rds size limitation
 

In functional-enrichment.Rmd, add chunk before here that will test if the ‘combined.Rds’ object is over 230mb. If the .Rds object exceeds the threshold, set cache.lazy to FALSE in the 'enrich' chunk option like so:

 {r set_lazy_cache}
 rds_obj_limit_mb <- x
 if (file.info('combined.Rds')$size/(1000^2) > x) {
   cache.lazy=FALSE
 }
 else {
   cache.lazy=FALSE
 }

Add the same chunk before ‘finalclusters’ in gene-patterns here using the gene-patterns specific threshold that is still being determined as shown above.

 


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions