-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from BertGalle/project1
Added merge count files per pool
- Loading branch information
Showing
2 changed files
with
55 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// MERGE COUNT FILES | ||
process EXOMEDEPTH_COUNT_MERGE { | ||
publishDir "$params.outdir/exomedepth/counts", mode: 'copy' | ||
|
||
input: | ||
tuple val(meta), path(files) | ||
|
||
output: | ||
tuple val(meta), path("${prefix}.txt") | ||
|
||
script: | ||
prefix = task.ext.prefix ?: "${meta.id}_${meta.chr}" | ||
""" | ||
for file in $files; do | ||
if [ -f ${prefix}.txt ]; then | ||
paste ${prefix}.txt <(awk '{print \$5}' \$file) > temp_auto.txt | ||
mv temp_auto.txt ${prefix}.txt | ||
else | ||
cp \$file ${prefix}.txt | ||
fi | ||
done | ||
""" | ||
} |
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