-
Notifications
You must be signed in to change notification settings - Fork 750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add module for pasty #2003
Merged
Merged
add module for pasty #2003
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5038221
add module for pasty
rpetit3 a42938d
run prettier
rpetit3 b2933f1
line up those commas
rpetit3 14aee46
Merge branch 'master' into rp3-add-pasty
rpetit3 d35e918
Update main.nf
rpetit3 99d65cb
Merge branch 'master' into rp3-add-pasty
rpetit3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,36 @@ | ||
process PASTY { | ||
tag "$meta.id" | ||
label 'process_low' | ||
|
||
conda (params.enable_conda ? "bioconda::pasty=1.0.0" : null) | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/pasty:1.0.0--hdfd78af_0': | ||
'quay.io/biocontainers/pasty:1.0.0--hdfd78af_0' }" | ||
|
||
input: | ||
tuple val(meta), path(fasta) | ||
|
||
output: | ||
tuple val(meta), path("${prefix}.tsv") , emit: tsv | ||
tuple val(meta), path("${prefix}.blastn.tsv") , emit: blast | ||
tuple val(meta), path("${prefix}.details.tsv"), emit: details | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
prefix = task.ext.prefix ?: "${meta.id}" | ||
""" | ||
pasty \\ | ||
$args \\ | ||
--prefix $prefix \\ | ||
--assembly $fasta | ||
|
||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
pasty: \$(echo \$(pasty --version 2>&1) | sed 's/^.*pasty, 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,52 @@ | ||
name: "pasty" | ||
description: Serogroup Pseudomonas aeruginosa assemblies | ||
keywords: | ||
- bacteria | ||
- serogroup | ||
- fasta | ||
- assembly | ||
tools: | ||
- "pasty": | ||
description: "A tool for in silico serogrouping of Pseudomonas aeruginosa isolates" | ||
homepage: "https://github.com/rpetit3/pasty" | ||
documentation: "https://github.com/rpetit3/pasty" | ||
tool_dev_url: "https://github.com/rpetit3/pasty" | ||
doi: "" | ||
licence: "['Apache-2.0']" | ||
|
||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test', single_end:false ] | ||
- fasta: | ||
type: file | ||
description: An assembly in FASTA format | ||
pattern: "*.{fasta,fasta.gz,fna,fna.gz,fa,fa.gz}" | ||
|
||
output: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test', single_end:false ] | ||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
- tsv: | ||
type: file | ||
description: A tab-delimited file with the predicted serogroup | ||
pattern: "*.tsv" | ||
- blast: | ||
type: file | ||
description: A tab-delimited file of all blast hits | ||
pattern: "*.blastn.tsv" | ||
- details: | ||
type: file | ||
description: A tab-delimited file with details for each serogroup | ||
pattern: "*.details.tsv" | ||
|
||
authors: | ||
- "@rpetit3" |
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,13 @@ | ||
#!/usr/bin/env nextflow | ||
|
||
nextflow.enable.dsl = 2 | ||
|
||
include { PASTY } from '../../../modules/pasty/main.nf' | ||
|
||
workflow test_pasty { | ||
|
||
input = [ [ id:'test', single_end:false ], // meta map | ||
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] | ||
|
||
PASTY ( input ) | ||
} |
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,5 @@ | ||
process { | ||
|
||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } | ||
|
||
} |
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,11 @@ | ||
- name: pasty test_pasty | ||
command: nextflow run ./tests/modules/pasty -entry test_pasty -c ./tests/config/nextflow.config -c ./tests/modules/pasty/nextflow.config | ||
tags: | ||
- pasty | ||
files: | ||
- path: output/pasty/test.blastn.tsv | ||
md5sum: 45de2825f0bb3cc8fe9f2b7c419f66f2 | ||
- path: output/pasty/test.details.tsv | ||
md5sum: d6822beea048a27af839087dfc14a536 | ||
- path: output/pasty/test.tsv | ||
md5sum: edbae35d3edc17283ea73f7f3eb22087 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't use any additional threads? In that case, would it be suitable to switch to
process_single
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch!