-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔀 Merge pull request #34 from cnr-ibba/issue-33
new module: ESTSFS
- Loading branch information
Showing
8 changed files
with
179 additions
and
7 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
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 @@ | ||
process ESTSFS { | ||
tag "$meta.id" | ||
label 'process_single' | ||
label 'process_long' | ||
|
||
// WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. | ||
container "docker.io/bunop/est-sfs:2.0.5" | ||
|
||
input: | ||
tuple val(meta), path(e_config), path(data), path(seed) | ||
|
||
output: | ||
tuple val(meta), path("${prefix}_sfs.txt") , emit: sfs_out | ||
tuple val(meta), path("${prefix}_pvalues.txt") , emit: pvalues_out | ||
tuple val(meta), path("${prefix}.seed") , emit: seed | ||
path "versions.yml", emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
def VERSION = '2.05' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. | ||
prefix = task.ext.prefix ?: "${meta.id}" | ||
""" | ||
cp ${seed} ${prefix}.seed | ||
est-sfs ${e_config} ${data} ${prefix}.seed ${prefix}_sfs.txt ${prefix}_pvalues.txt | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
est-sfs: $VERSION | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
""" | ||
touch ${prefix}_sfs.txt | ||
touch ${prefix}_pvalues.txt | ||
touch ${prefix}.seed | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
est-sfs: $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,53 @@ | ||
--- | ||
name: "estsfs" | ||
description: estimation of the unfolded site frequency spectrum | ||
keywords: | ||
- site frequency spectrum | ||
- ancestral alleles | ||
- derived alleles | ||
tools: | ||
- "estsfs": | ||
description: "est-sfs ( Keightley and Jackson, 2018) is a stand-alone implementation of a method to infer the unfolded site frequency spectrum (the uSFS) and ancestral state probabilities by maximum likelihood (ML)." | ||
homepage: "https://sourceforge.net/projects/est-usfs/" | ||
documentation: "https://sourceforge.net/projects/est-usfs/" | ||
tool_dev_url: "https://sourceforge.net/projects/est-usfs/files/est-sfs-release-2.04.tar.gz" | ||
doi: "10.1534/genetics.118.301120" | ||
licence: "['Free for Academic Use']" | ||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'test']` | ||
- e_config: | ||
type: file | ||
description: config file for est-sfs | ||
pattern: "*.txt" | ||
- data: | ||
type: file | ||
description: input data file for est-sfs | ||
pattern: "*.txt" | ||
- seed: | ||
type: file | ||
description: text file containing random number seed | ||
pattern: "*.txt" | ||
output: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'test']` | ||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
- sfs_out: | ||
type: file | ||
description: output file consists of the comma-separated estimated uSFS vector | ||
pattern: "*.txt" | ||
- pvalues_out: | ||
type: file | ||
description: this file contains the estimated ancestral state probabilities for each site | ||
pattern: "*.txt" | ||
authors: | ||
- "@BioInf2305" |
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
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,15 @@ | ||
#!/usr/bin/env nextflow | ||
|
||
nextflow.enable.dsl = 2 | ||
|
||
include { ESTSFS } from '../../../../modules/cnr-ibba/estsfs/main.nf' | ||
|
||
workflow test_estsfs { | ||
|
||
input = [ | ||
[ id:'test' ], // meta map | ||
file(params.test_data['generic']['estsfs']['config_file'], checkIfExists: true), file(params.test_data['generic']['estsfs']['data_file'], checkIfExists: true), file(params.test_data['generic']['estsfs']['seed_file'], checkIfExists: true) | ||
] | ||
|
||
ESTSFS ( 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: estsfs test_estsfs | ||
command: nextflow run ./tests/modules/cnr-ibba/estsfs -entry test_estsfs -c ./tests/config/nextflow.config | ||
tags: | ||
- estsfs | ||
files: | ||
- path: output/estsfs/test_pvalues.txt | ||
md5sum: 63f370e9f2d08591b52c0ea05c8b45a0 | ||
- path: output/estsfs/test_sfs.txt | ||
md5sum: 5da246e273d22b177f0683b44fe6d80a | ||
- path: output/estsfs/test.seed | ||
- path: output/estsfs/versions.yml |