-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add provenance * add mafft * update null value * remove reference to unused script * update * Update README.md * update provenance formatting for subcommands * update readme * update formatting * remove whitespace
- Loading branch information
1 parent
7c754c3
commit 6a49cf4
Showing
6 changed files
with
264 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
process hash_files { | ||
|
||
tag { sampleName + " / " + file_type } | ||
|
||
input: | ||
tuple val(sampleName), path(files_to_hash), val(file_type) | ||
|
||
output: | ||
tuple val(sampleName), path("${sampleName}_${file_type}.sha256.csv"), emit: csv | ||
tuple val(sampleName), path("${sampleName}_${file_type}_provenance.yml"), emit: provenance | ||
|
||
script: | ||
""" | ||
shasum -a 256 ${files_to_hash} | tr -s ' ' ',' > ${sampleName}_${file_type}.sha256.csv | ||
while IFS=',' read -r hash filename; do | ||
printf -- "- input_filename: \$filename\\n" >> ${sampleName}_${file_type}_provenance.yml; | ||
printf -- " file_type: ${file_type}\\n" >> ${sampleName}_${file_type}_provenance.yml; | ||
printf -- " sha256: \$hash\\n" >> ${sampleName}_${file_type}_provenance.yml; | ||
done < ${sampleName}_${file_type}.sha256.csv | ||
""" | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
process collect_provenance { | ||
|
||
tag { sampleName } | ||
|
||
executor 'local' | ||
|
||
publishDir "${params.outdir}/${task.process.replaceAll(":","_")}", pattern: "${sampleName}_*_provenance.yml", mode: 'copy' | ||
|
||
input: | ||
tuple val(sampleName), path(provenance_files) | ||
|
||
output: | ||
tuple val(sampleName), file("${sampleName}_*_provenance.yml") | ||
|
||
script: | ||
""" | ||
cat ${provenance_files} > ${sampleName}_\$(date +%Y%m%d%H%M%S)_provenance.yml | ||
""" | ||
} | ||
|
||
|
||
process pipeline_provenance { | ||
|
||
tag { pipeline_name + " / " + pipeline_version } | ||
|
||
executor 'local' | ||
|
||
input: | ||
tuple val(pipeline_name), val(pipeline_version), val(analysis_start) | ||
|
||
output: | ||
file("pipeline_provenance.yml") | ||
|
||
script: | ||
""" | ||
printf -- "- pipeline_name: ${pipeline_name}\\n" >> pipeline_provenance.yml | ||
printf -- " pipeline_version: ${pipeline_version}\\n" >> pipeline_provenance.yml | ||
printf -- " timestamp_analysis_start: ${analysis_start}\\n" >> pipeline_provenance.yml | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.