Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version reference database with parameter #189

Merged
merged 2 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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