8000 local module: genPeptides · Issue #94 · nf-core/epitopeprediction · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

local module: genPeptides #94

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

Closed
marissaDubbelaar opened this issue Oct 27, 2021 · 2 comments
Closed

local module: genPeptides #94

marissaDubbelaar opened this issue Oct 27, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@marissaDubbelaar
Copy link
Contributor

This module uses the gen_peptides.py script which is dependent on Bio.SeqIO.FastaIO (SimpleFastaParser)
and Fred2

@christopher-mohr christopher-mohr added dsl2 enhancement New feature or request labels Oct 27, 2021
@marissaDubbelaar marissaDubbelaar self-assigned this Oct 27, 2021
@marissaDubbelaar
Copy link
Contributor Author
marissaDubbelaar commented Oct 27, 2021
// Import generic module functions
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'

params.options = [:]
options        = initOptions(params.options)

def VERSION = "2.0.7"

process GEN_PEPTIDES {

    publishDir "${params.outdir}",
        mode: params.publish_dir_mode,
        saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:'', meta:[:], publish_by_meta:[]) }

    conda (params.enable_conda ? "conda-forge::fred2:2.0.7" : null)
    if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
        container "https://depot.galaxyproject.org/singularity/fred2:2.0.7--py_0"
    } else {
        container "quay.io/biocontainers/fred2:2.0.7--py_0"
    }

    input:
        tuple val(meta)

    output:
        tuple val(meta), path("*.tsv"), emit: splitted 
    
    // when: !params.peptides // TODO: Remove this by creating a nstatement in the main workflow
    
    script:
        def prefix = options.suffix ? "${meta.sample}_${options.suffix}" : "${meta.sample}_peptides"
        
        """
        gen_peptides.py --input ${proteins} --output '${prefix}.tsv' --max_length ${params.max_peptide_length} --min_length ${params.min_peptide_length}
        cat <<-END_VERSIONS > versions.yml
            ${getProcessName(task.process)}:
                fred2: \$(echo \$VERSION )
            END_VERSIONS
        """
}

@ggabernet
Copy link
Member

Added in #124

6751

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants
0