-
Notifications
You must be signed in to change notification settings - Fork 735
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'nf-core:master' into merfin_hist_v2
- Loading branch information
Showing
6 changed files
with
194 additions
and
0 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,9 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json | ||
name: "xengsort_index" | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
- defaults | ||
dependencies: | ||
- "bioconda::xengsort=2.0.5" |
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,54 @@ | ||
process XENGSORT_INDEX { | ||
tag "$host_fasta" | ||
label 'process_medium' | ||
|
||
conda "${moduleDir}/environment.yml" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/xengsort:2.0.5--pyhdfd78af_0': | ||
'biocontainers/xengsort:2.0.5--pyhdfd78af_0' }" | ||
|
||
input: | ||
path(host_fasta, stageAs: "host/*") | ||
path(graft_fasta, stageAs: "graft/*") | ||
val index | ||
val nobjects | ||
val mask | ||
|
||
output: | ||
path "${index}.hash" , emit: hash | ||
path "${index}.info" , emit: info | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
""" | ||
xengsort \\ | ||
index \\ | ||
$args \\ | ||
--index $index \\ | ||
--host $host_fasta \\ | ||
--graft $graft_fasta \\ | ||
--nobjects $nobjects \\ | ||
--mask '$mask' \\ | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
xengsort: \$(xengsort --version) | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def args = task.ext.args ?: '' | ||
""" | ||
touch ${index}.info | ||
touch ${index}.hash | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
xengsort: \$(xengsort --version) | ||
END_VERSIONS | ||
""" | ||
} |
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,61 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json | ||
name: "xengsort_index" | ||
description: Fast lightweight accurate xenograft sorting | ||
keywords: | ||
- index | ||
- QC | ||
- reference | ||
- fasta | ||
- xenograft | ||
- sort | ||
- k-mer | ||
tools: | ||
- "xengsort": | ||
description: "A fast xenograft read sorter based on space-efficient k-mer hashing" | ||
homepage: "https://gitlab.com/genomeinformatics/xengsort" | ||
documentation: "https://gitlab.com/genomeinformatics/xengsort" | ||
tool_dev_url: "https://gitlab.com/genomeinformatics/xengsort" | ||
doi: "10.4230/LIPIcs.WABI.2020.4" | ||
licence: ["MIT"] | ||
|
||
input: | ||
- host_fasta: | ||
type: file | ||
description: | | ||
Reference genome fasta file from host, compressed or uncompressed. | ||
- graft_fasta: | ||
type: file | ||
description: | | ||
Reference genome fasta file from graft, compressed or uncompressed. | ||
- index: | ||
type: string | ||
description: | | ||
File name prefix to store index files. | ||
- nobjects: | ||
type: string | ||
description: | | ||
Number of k-mers that will be stored in the hash table. Underscore should be used, i.e for 1000000, it should be typed 1_000_000. | ||
- mask: | ||
type: string | ||
description: | | ||
Gapped k-mer mask (quoted string like '#__##_##__#'). | ||
output: | ||
- hash: | ||
type: file | ||
description: File with index hash file. | ||
pattern: "*hash" | ||
- info: | ||
type: file | ||
description: File with index info file. | ||
pattern: "*info" | ||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
|
||
authors: | ||
- "@diegomscoelho" | ||
maintainers: | ||
- "@diegomscoelho" |
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,37 @@ | ||
nextflow_process { | ||
|
||
name "Test Process XENGSORT_INDEX" | ||
script "../main.nf" | ||
process "XENGSORT_INDEX" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "xengsort" | ||
tag "xengsort/index" | ||
|
||
test("homo_sapiens - sarscov2 - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) | ||
input[1] = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) | ||
input[2] = 'index' | ||
input[3] = '10_000_000' | ||
input[4] = '###__#_##__#_#_###__#__###_#_#__##_#__###' | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,2 @@ | ||
xengsort/index: | ||
- "modules/nf-core/xengsort/index/**" |