diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/gemma.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/routes/gemma.rs b/src/routes/gemma.rs index 329158a..e94ca72 100644 --- a/src/routes/gemma.rs +++ b/src/routes/gemma.rs @@ -947,9 +947,15 @@ async fn prepare_genotypes( .file_stem() .map(|name| name.to_string_lossy().into_owned()) .unwrap_or_else(|| "panel".to_string()); + // The cache key carries a version, because it is keyed on the panel and the + // mode and NOT on the code that produces them: a fixed bug in the imputation + // script would otherwise be masked by its own old output (measured: a + // corrected individuals file was ignored and the run kept failing on the + // stale one). Bump this when either script changes what it writes. + const IMPUTE_CACHE_VERSION: &str = "v2"; let prefix = std::path::Path::new(&config.ravanan_cache_dir) .join("imputed") - .join(format!("{stem}-{mode}")); + .join(format!("{stem}-{mode}-{IMPUTE_CACHE_VERSION}")); let prepared_geno = format!("{}.bimbam.txt", prefix.to_string_lossy()); let prepared_snps = format!("{}.snps.txt", prefix.to_string_lossy()); |
