Skip to content

Commit

Permalink
Fix cache names (#260)
Browse files Browse the repository at this point in the history
* Update plink2_makebed.nf

Remove chromosome so that it doesn't cause cache collision (should only run once per sampleset anyways)

* Fix prefix and output names

* Remove chromosome ID from orient
  • Loading branch information
smlmbrt authored Mar 4, 2024
1 parent ea73f8c commit d6b0755
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion modules/local/ancestry/oadp/fraposa_pca.nf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ process FRAPOSA_PCA {
path "versions.yml", emit: versions

script:
output = "${params.target_build}_${meta.id}_${meta.chrom}"
output = "${params.target_build}_${meta.id}"
"""
fraposa ${ref_geno.baseName} \
--method $params.projection_method \
Expand Down
6 changes: 3 additions & 3 deletions modules/local/ancestry/oadp/plink2_makebed.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ process PLINK2_MAKEBED {
label "${ params.copy_genomes ? 'copy_genomes' : '' }"
label "plink2" // controls conda, docker, + singularity options

tag "$meta.id chromosome"
tag "$meta.id"

storeDir workDir / "ancestry" / "bed"

Expand Down Expand Up @@ -33,8 +33,8 @@ process PLINK2_MAKEBED {
// output options
def extract = pruned.name != 'NO_FILE' ? "--extract $pruned" : ''
def extracted = pruned.name != 'NO_FILE' ? "_extracted" : ''
def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}_" : "${meta.id}_"
output = "${params.target_build}_${prefix}${meta.chrom}${extracted}"
def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
output = "${params.target_build}_${prefix}${extracted}"
split_output = "${meta.id}_splitfam"
"""
# use explicit flag because pfile prefix might be different
Expand Down
4 changes: 2 additions & 2 deletions modules/local/ancestry/oadp/plink2_orient.nf
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ process PLINK2_ORIENT {
def mem_mb = task.memory.toMega() // plink is greedy

// output options
def prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}_" : "${meta.id}_"
output = "${params.target_build}_${prefix}${meta.chrom}_oriented"
def prefix = task.ext.suffix ? "_${meta.id}${task.ext.suffix}" : "_${meta.id}"
output = "${params.target_build}${prefix}_oriented"
"""
plink2 \
--threads $task.cpus \
Expand Down

0 comments on commit d6b0755

Please sign in to comment.