hammerlab / cohorts

Utilities for analyzing mutations and neoepitopes in patient cohorts
Apache License 2.0
20 stars 4 forks source link

add cache_root_dir attribute & behavior #216

Closed jburos closed 7 years ago

jburos commented 7 years ago

Adding cache_root_dir per #214

jburos commented 7 years ago

I use the format-string in our tcga_data.py within the lung-cohort, so that the cache-dir is named according to the tumor type (which I think we call "disease": luad vs lusc).

For example, in that file we have:

def load_tcga(disease, legacy_bams=True, cache_dir="cache-new-tcga-{disease}", ... ):
  ... 
  cache_dir = get_cache_dir(cache_dir=cache_dir, cache_root_dir=cache_root_dir, disease=disease)

In that case, I computed the cache-dir outside of the cohort & passed it in; this is an attempt to support similar functionality within the cohort object.

Let me know what you think & if I should add more detail on this to issue #214.

tavinathanson commented 7 years ago

👍 LGTM

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.04%) to 56.948% when pulling c86fa0862002ad4651ee498a3e8d1e7ca680b2af on add-root-dir into bfec7402bc25447140677abaf7ef39958f5e640d on master.