-
Notifications
You must be signed in to change notification settings - Fork 16
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 #135 from EBI-Metagenomics/fix/virsorter2
Fix/virsorter2
- Loading branch information
Showing
24 changed files
with
5,731 additions
and
51 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
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
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,24 @@ | ||
process virsorter2GetDB { | ||
label 'virsorter2' | ||
if (params.cloudProcess) { | ||
publishDir "${params.databases}/virsorter2/", mode: 'copy', pattern: "virsorter2-data" | ||
} | ||
else { | ||
storeDir "${params.databases}/virsorter2/" | ||
} | ||
|
||
output: | ||
path("virsorter2-data/db", type: 'dir') | ||
|
||
script: | ||
""" | ||
# just in case there is a failed attemp before; | ||
# remove the whole diretory specified by -d | ||
rm -rf virsorter2-data | ||
# download virsorter2 database and extract | ||
wget https://osf.io/v46sc/download | ||
mkdir virsorter2-data | ||
tar -xzf download -C virsorter2-data | ||
""" | ||
} |
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
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,19 @@ | ||
process CONCATENATE_VIRSORTER2_FILES { | ||
tag "${meta.id}" | ||
label "process_medium" | ||
|
||
input: | ||
tuple val(meta), path(input_files, stageAs: "inputs/*") | ||
val output_name | ||
|
||
output: | ||
tuple val(meta), path("${output_name}"), emit: concatenated_result | ||
|
||
script: | ||
""" | ||
export first_file=\$(ls inputs | head -n 1); | ||
grep 'seqname' inputs/\${first_file} > header.tsv || true | ||
cat inputs/* | grep -v 'seqname' > without_header.${output_name} | ||
cat header.tsv without_header.${output_name} > ${output_name} | ||
""" | ||
} |
Oops, something went wrong.