Skip to content

Commit

Permalink
Version reference database with parameter (#189)
Browse files Browse the repository at this point in the history
* version reference db separately

* Update RELEASE-CHECKLIST.md

Information about the ancestry version

---------

Co-authored-by: Sam Lambert <[email protected]>
  • Loading branch information
nebfield and smlmbrt authored Oct 3, 2023
1 parent 5e7340a commit 9cc3ef8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
4 changes: 4 additions & 0 deletions RELEASE-CHECKLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
- [ ] Has the changelog been updated?
- [ ] Update the nextflow schema

# Reference panels
- [ ] Did anything change to the modules for creating the reference panel? Bump ref_format_version in nextflow.config
- [ ] Publish new reference panels to FTP, update any documentation.

# Tests

- [ ] Make sure unit tests pass on singularity, docker, and conda (CI)
Expand Down
2 changes: 1 addition & 1 deletion modules/local/ancestry/bootstrap/make_database.nf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ process MAKE_DATABASE {
"""
md5sum -c $checksums
echo $workflow.manifest.version > meta.txt
echo ${params.ref_format_version} > meta.txt
# can't use meta variables in stageAs
# don't want to use renameTo because it's destructive for the input
Expand Down
2 changes: 1 addition & 1 deletion modules/local/ancestry/extract_database.nf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ process EXTRACT_DATABASE {
DB_VERSION=\$(cat meta.txt)
if [ "\$DB_VERSION" != "2.0.0-alpha.3" ]; then
if [ "\$DB_VERSION" != "${params.ref_format_version}" ]; then
echo "Old reference database version detected, please redownload the latest version and try again"
echo "See https://pgsc-calc.readthedocs.io/en/latest/how-to/ancestry.html"
exit 1
Expand Down
7 changes: 3 additions & 4 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ params {
efo_direct = false

// reference params
run_ancestry = null // path to reference database
run_ancestry = null // path to reference database TODO: replace with NO_FILE
ancestry_checksums = "$projectDir/assets/ancestry/checksums.txt"
// if you want to liftover --scorefiles, set the chain files
hg19_chain = null // "https://hgdownload.cse.ucsc.edu/goldenpath/hg19/liftOver/hg19ToHg38.over.chain.gz"
Expand All @@ -37,7 +37,7 @@ params {
ld_grch38 = "$projectDir/assets/ancestry/high-LD-regions-hg38-GRCh38.txt"

// ancestry params
ancestry_params_file = null
ref_format_version = "v0.1"
ref_samplesheet = "$projectDir/assets/ancestry/reference.csv"
projection_method = "oadp"
ancestry_method = "RandomForest"
Expand All @@ -47,7 +47,6 @@ params {
n_normalization = 4

// compatibility params
compat_params_file = null
liftover = false
target_build = null
min_lift = 0.95
Expand Down Expand Up @@ -80,7 +79,7 @@ params {
help = false
validate_params = true
show_hidden_params = false
schema_ignore_params = 'only_bootstrap,only_input,only_compatible,only_match,only_projection,only_score,skip_ancestry,igenomes_ignore'
schema_ignore_params = 'only_bootstrap,only_input,only_compatible,only_match,only_projection,only_score,skip_ancestry'

// Max resource options
// Defaults only, expecting to be overwritten
Expand Down

0 comments on commit 9cc3ef8

Please sign in to comment.