-
Notifications
You must be signed in to change notification settings - Fork 722
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added pbtk/pbindex * Removed prefix
- Loading branch information
Showing
5 changed files
with
224 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: "pbtk_pbindex" | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
- defaults | ||
dependencies: | ||
- "bioconda::pbtk=3.1.1" |
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,41 @@ | ||
process PBTK_PBINDEX { | ||
tag "$meta.id" | ||
label 'process_low' | ||
|
||
conda "${moduleDir}/environment.yml" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/pbtk:3.1.1--h9ee0642_0': | ||
'biocontainers/pbtk:3.1.1--h9ee0642_0' }" | ||
|
||
input: | ||
tuple val(meta), path(bam) | ||
|
||
output: | ||
tuple val(meta), path("*.pbi"), emit: pbi | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
""" | ||
pbindex \\ | ||
-j $task.cpus \\ | ||
$bam | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
pbindex: \$(pbindex --version | sed -n 's/pbindex \\(.*\\)/\\1/p') | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
""" | ||
touch ${bam}.pbi | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
pbindex: \$(pbindex --version | sed -n 's/pbindex \\(.*\\)/\\1/p') | ||
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,48 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json | ||
name: "pbtk_pbindex" | ||
description: Minimalistic tool which creates an index file that enables random access into PacBio BAM files | ||
keywords: | ||
- genomics | ||
- bam | ||
- index | ||
- pacbio | ||
tools: | ||
- "pbtk": | ||
description: "pbtk - PacBio BAM toolkit" | ||
homepage: "https://github.com/PacificBiosciences/pbtk" | ||
documentation: "https://github.com/PacificBiosciences/pbtk" | ||
tool_dev_url: "https://github.com/PacificBiosciences/pbtk" | ||
licence: ["BSD-3-clause-Clear"] | ||
|
||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1', single_end:false ]` | ||
- bam: | ||
type: file | ||
description: Input BAM file | ||
pattern: "*.bam" | ||
|
||
output: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1', single_end:false ]` | ||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
- pbi: | ||
type: file | ||
description: Index file | ||
pattern: "*.bam.pbi" | ||
|
||
authors: | ||
- "@GallVp" | ||
maintainers: | ||
- "@GallVp" |
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,58 @@ | ||
nextflow_process { | ||
|
||
name "Test Process PBTK_PBINDEX" | ||
script "../main.nf" | ||
process "PBTK_PBINDEX" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "pbtk" | ||
tag "pbtk/pbindex" | ||
|
||
test("homo_sapiens - bam") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/alz.bam', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("homo_sapiens - bam - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/alz.bam', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
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,68 @@ | ||
{ | ||
"homo_sapiens - bam": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"alz.bam.pbi:md5,085d6c04da9daa5f984767b158a879f4" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,a162e157c7ce09585c86cb390d00f94e" | ||
], | ||
"pbi": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"alz.bam.pbi:md5,085d6c04da9daa5f984767b158a879f4" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,a162e157c7ce09585c86cb390d00f94e" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "24.04.2" | ||
}, | ||
"timestamp": "2024-07-02T12:16:24.358838" | ||
}, | ||
"homo_sapiens - bam - stub": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"alz.bam.pbi:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,a162e157c7ce09585c86cb390d00f94e" | ||
], | ||
"pbi": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"alz.bam.pbi:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,a162e157c7ce09585c86cb390d00f94e" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "24.04.2" | ||
}, | ||
"timestamp": "2024-07-02T12:16:29.083998" | ||
} | ||
} |