Skip to content

Commit

Permalink
Some more modules tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseEspinosa committed May 23, 2024
1 parent adbb1e2 commit 1284f55
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/local/convert_fasta.nf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ process CONVERT_FASTA {
task.ext.when == null || task.ext.when

script:
prefix = task.ext.prefix ?: meta.id
def prefix = task.ext.prefix ?: meta.id
"""
clustal2fasta.py $input_file ${prefix}.fa
Expand Down
10 changes: 10 additions & 0 deletions modules/local/create_tcoffeetemplate.nf
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,21 @@ process CREATE_TCOFFEETEMPLATE {
id=`echo \$structure | awk {'gsub(".pdb", "", \$0); print'}`;
echo -e ">"\$id "_P_" "\${id}" >> ${prefix}_template.txt;
done
cat <<-END_VERSIONS > versions.yml
"${task.process}":
bash: \$(echo \$(bash --version | grep -Eo 'version [[:alnum:].]+' | sed 's/version //'))
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_template.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
bash: \$(echo \$(bash --version | grep -Eo 'version [[:alnum:].]+' | sed 's/version //'))
END_VERSIONS
"""
}
10 changes: 10 additions & 0 deletions modules/local/dump_params.nf
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,20 @@ process DUMP_PARAMS {
skip_iqtree: ${skip_iqtree}
skip_fastme: ${skip_fastme}
END_PARAMS
cat <<-END_VERSIONS > versions.yml
"${task.process}":
cat: \$(echo \$(cat --version 2>&1) | sed 's/^.*coreutils) //; s/ .*\$//')
END_VERSIONS
"""

stub:
"""
touch params.yml
cat <<-END_VERSIONS > versions.yml
"${task.process}":
cat: \$(echo \$(cat --version 2>&1) | sed 's/^.*coreutils) //; s/ .*\$//')
END_VERSIONS
"""
}
14 changes: 14 additions & 0 deletions modules/local/write_seqinfo.nf
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,18 @@ process WRITE_SEQINFO {
Python Requests: \$(pip show requests | grep Version | cut -d ' ' -f 2)
END_VERSIONS
"""

stub:
prefix = task.ext.prefix ?: meta.id
"""
touch ${prefix}_id.txt
touch ${prefix}_exact.txt
touch ${prefix}_taxid.txt
cat <<- END_VERSIONS > versions.yml
"${task.process}":
Python: \$(python --version | cut -d ' ' -f 2)
Python Requests: \$(pip show requests | grep Version | cut -d ' ' -f 2)
END_VERSIONS
"""
}

0 comments on commit 1284f55

Please sign in to comment.