mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 02:58:17 +00:00
Add new module macrel/contigs (#1109)
* Add new module macrel/contigs * removed trailing whitespace * removed whitespace * linting cleanup * Apply suggestions from code review Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Updated the test.yml It didnt upload the updated version earlier for some reason :( * Update test.yml * Update test.yml * Update test.yml as generated by pytest * Update test.yml * updated the version issue * Update tests/modules/macrel/contigs/test.yml * Update modules/macrel/contigs/main.nf * Update modules/macrel/contigs/main.nf * Update pytest_modules.yml * Update pytest_modules.yml * Update modules/macrel/contigs/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Zipped all fasta outputs * Update main.nf * Update test.yml * Update test.yml * Update main.nf * Update main.nf (gzip -n) * Update test.yml * Update main.nf * Update main.nf * Update test.yml * Update tests/modules/macrel/contigs/test.yml * Update modules/macrel/contigs/main.nf * Apply suggestions from code review Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> Co-authored-by: darcy220606 <ananhamido@hotmail.com> Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>
This commit is contained in:
parent
a68c563e54
commit
1f3f2b18bb
6 changed files with 141 additions and 0 deletions
40
modules/macrel/contigs/main.nf
Normal file
40
modules/macrel/contigs/main.nf
Normal file
|
@ -0,0 +1,40 @@
|
|||
process MACREL_CONTIGS {
|
||||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::macrel=1.1.0" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/macrel:1.1.0--py36hc5360cc_0':
|
||||
'quay.io/biocontainers/macrel:1.1.0--py36hc5360cc_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(fasta)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*/*.smorfs.faa.gz") , emit: smorfs
|
||||
tuple val(meta), path("*/*.all_orfs.faa.gz") , emit: all_orfs
|
||||
tuple val(meta), path("*/*.prediction.gz") , emit: amp_prediction
|
||||
tuple val(meta), path("*/*.md") , emit: readme_file
|
||||
tuple val(meta), path("*/*_log.txt") , emit: log_file
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
"""
|
||||
macrel contigs \\
|
||||
$args \\
|
||||
--fasta $fasta \\
|
||||
--output ${prefix}/ \\
|
||||
--tag ${prefix} \\
|
||||
--log-file ${prefix}/${prefix}_log.txt \\
|
||||
--threads $task.cpus
|
||||
|
||||
gzip --no-name ${prefix}/*.faa
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
macrel: \$(echo \$(macrel --version | sed 's/macrel //g'))
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
61
modules/macrel/contigs/meta.yml
Normal file
61
modules/macrel/contigs/meta.yml
Normal file
|
@ -0,0 +1,61 @@
|
|||
name: macrel_contigs
|
||||
description: A tool that mines antimicrobial peptides (AMPs) from (meta)genomes by predicting peptides from genomes (provided as contigs) and outputs all the predicted anti-microbial peptides found.
|
||||
keywords:
|
||||
- AMP
|
||||
- antimicrobial peptides
|
||||
- genome mining
|
||||
- metagenomes
|
||||
- peptide prediction
|
||||
tools:
|
||||
- macrel:
|
||||
description: A pipeline for AMP (antimicrobial peptide) prediction
|
||||
homepage: https://macrel.readthedocs.io/en/latest/
|
||||
documentation: https://macrel.readthedocs.io/en/latest/
|
||||
tool_dev_url: https://github.com/BigDataBiology/macrel
|
||||
doi: "10.7717/peerj.10555"
|
||||
licence: ['MIT']
|
||||
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- fasta:
|
||||
type: file
|
||||
description: A fasta file with nucleotide sequences.
|
||||
pattern: "*.{fasta,fa,fna,fasta.gz,fa.gz,fna.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"
|
||||
- amp_prediction:
|
||||
type: file
|
||||
description: A zipped file, with all predicted amps in a table format.
|
||||
pattern: "*.prediction.gz"
|
||||
- smorfs:
|
||||
type: file
|
||||
description: A zipped fasta file containing aminoacid sequences showing the general gene prediction information in the contigs.
|
||||
pattern: "*.smorfs.faa.gz"
|
||||
- all_orfs:
|
||||
type: file
|
||||
description: A zipped fasta file containing amino acid sequences showing the general gene prediction information in the contigs.
|
||||
pattern: "*.all_orfs.faa.gz"
|
||||
- readme_file:
|
||||
type: file
|
||||
description: A readme file containing tool specific information (e.g. citations, details about the output, etc.).
|
||||
pattern: "*.md"
|
||||
- log_file:
|
||||
type: file
|
||||
description: A log file containing the information pertaining to the run.
|
||||
pattern: "*_log.txt"
|
||||
|
||||
authors:
|
||||
- "@darcy220606"
|
|
@ -842,6 +842,10 @@ lofreq/indelqual:
|
|||
- modules/lofreq/indelqual/**
|
||||
- tests/modules/lofreq/indelqual/**
|
||||
|
||||
macrel/contigs:
|
||||
- modules/macrel/contigs/**
|
||||
- tests/modules/macrel/contigs/**
|
||||
|
||||
macs2/callpeak:
|
||||
- modules/macs2/callpeak/**
|
||||
- tests/modules/macs2/callpeak/**
|
||||
|
|
15
tests/modules/macrel/contigs/main.nf
Normal file
15
tests/modules/macrel/contigs/main.nf
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { MACREL_CONTIGS } from '../../../../modules/macrel/contigs/main.nf'
|
||||
|
||||
workflow test_macrel_contigs {
|
||||
|
||||
input = [
|
||||
[ id:'test', single_end:false ], // meta map
|
||||
file(params.test_data['bacteroides_fragilis']['illumina']['test1_contigs_fa_gz'], checkIfExists: true)
|
||||
]
|
||||
|
||||
MACREL_CONTIGS ( input )
|
||||
}
|
5
tests/modules/macrel/contigs/nextflow.config
Normal file
5
tests/modules/macrel/contigs/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
|||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
}
|
16
tests/modules/macrel/contigs/test.yml
Normal file
16
tests/modules/macrel/contigs/test.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
- name: macrel contigs test_macrel_contigs
|
||||
command: nextflow run ./tests/modules/macrel/contigs -entry test_macrel_contigs -c ./tests/config/nextflow.config -c ./tests/modules/macrel/contigs/nextflow.config
|
||||
tags:
|
||||
- macrel/contigs
|
||||
- macrel
|
||||
files:
|
||||
- path: output/macrel/test/README.md
|
||||
md5sum: fa3706dfc95d0538a52c4d0d824be5fb
|
||||
- path: output/macrel/test/test.all_orfs.faa.gz
|
||||
- path: output/macrel/test/test.prediction.gz
|
||||
- path: output/macrel/test/test.smorfs.faa.gz
|
||||
md5sum: 79704c6120c2f794518301af6f9b963d
|
||||
- path: output/macrel/test/test_log.txt
|
||||
md5sum: 6fdba143dce759597eb9f80e5d968729
|
||||
- path: output/macrel/versions.yml
|
||||
md5sum: be8bf0d0647751c635c3736655f29f85
|
Loading…
Reference in a new issue