Merge branch 'nf-core:master' into master

This commit is contained in:
James A. Fellows Yates 2022-03-11 08:18:44 +01:00 committed by GitHub
commit 27fbded5f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 469 additions and 24 deletions

View file

@ -27,6 +27,6 @@ Closes #XXX <!-- If this PR fixes an issue, please link it here! -->
- [ ] Add a resource `label` - [ ] Add a resource `label`
- [ ] Use BioConda and BioContainers if possible to fulfil software requirements. - [ ] Use BioConda and BioContainers if possible to fulfil software requirements.
- Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky: - Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
- [ ] `PROFILE=docker pytest --tag <MODULE> --symlink --keep-workflow-wd` - [ ] `PROFILE=docker pytest --tag <MODULE> --symlink --keep-workflow-wd --git-aware`
- [ ] `PROFILE=singularity pytest --tag <MODULE> --symlink --keep-workflow-wd` - [ ] `PROFILE=singularity pytest --tag <MODULE> --symlink --keep-workflow-wd --git-aware`
- [ ] `PROFILE=conda pytest --tag <MODULE> --symlink --keep-workflow-wd` - [ ] `PROFILE=conda pytest --tag <MODULE> --symlink --keep-workflow-wd --git-aware`

View file

@ -86,7 +86,7 @@ jobs:
# Test the module # Test the module
- name: Run pytest-workflow - name: Run pytest-workflow
# only use one thread for pytest-workflow to avoid race condition on conda cache. # only use one thread for pytest-workflow to avoid race condition on conda cache.
run: TMPDIR=~ PROFILE=${{ matrix.profile }} pytest --tag ${{ matrix.tags }} --symlink --kwdof run: TMPDIR=~ PROFILE=${{ matrix.profile }} pytest --tag ${{ matrix.tags }} --symlink --kwdof --git-aware
- name: Output log on failure - name: Output log on failure
if: failure() if: failure()

View file

@ -2,10 +2,10 @@ process CHROMAP_CHROMAP {
tag "$meta.id" tag "$meta.id"
label 'process_medium' label 'process_medium'
conda (params.enable_conda ? "bioconda::chromap=0.1.5 bioconda::samtools=1.14" : null) conda (params.enable_conda ? "bioconda::chromap=0.2.0 bioconda::samtools=1.14" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:724a1037d59f6a19c9d4e7bdba77b52b37de0dc3-0' : 'https://depot.galaxyproject.org/singularity/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:ed3529ef5253d7ccbc688b6a4c5c447152685757-0' :
'quay.io/biocontainers/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:724a1037d59f6a19c9d4e7bdba77b52b37de0dc3-0' }" 'quay.io/biocontainers/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:ed3529ef5253d7ccbc688b6a4c5c447152685757-0' }"
input: input:
tuple val(meta), path(reads) tuple val(meta), path(reads)

View file

@ -2,11 +2,10 @@ process CHROMAP_INDEX {
tag '$fasta' tag '$fasta'
label 'process_medium' label 'process_medium'
conda (params.enable_conda ? "bioconda::chromap=0.1.5" : null) conda (params.enable_conda ? "bioconda::chromap=0.2.0" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/chromap:0.1.5--h9a82719_0' : 'https://depot.galaxyproject.org/singularity/chromap:0.2.0--hd03093a_1' :
'quay.io/biocontainers/chromap:0.1.5--h9a82719_0' }" 'quay.io/biocontainers/chromap:0.2.0--hd03093a_1' }"
input: input:
path fasta path fasta

View file

@ -23,6 +23,7 @@ process MALT_RUN {
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def avail_mem = 6 def avail_mem = 6
if (!task.memory) { if (!task.memory) {
log.info '[MALT_RUN] Available memory not known - defaulting to 6GB. Specify process memory requirements to change this.' log.info '[MALT_RUN] Available memory not known - defaulting to 6GB. Specify process memory requirements to change this.'
@ -39,7 +40,7 @@ process MALT_RUN {
$args \\ $args \\
--inFile ${fastqs.join(' ')} \\ --inFile ${fastqs.join(' ')} \\
-m $mode \\ -m $mode \\
--index $index/ |&tee malt-run.log --index $index/ |&tee ${prefix}-malt-run.log
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
"${task.process}": "${task.process}":

View file

@ -52,7 +52,7 @@ output:
- log: - log:
type: file type: file
description: Log of verbose MALT stdout description: Log of verbose MALT stdout
pattern: "malt-run.log" pattern: "*-malt-run.log"
authors: authors:
- "@jfy133" - "@jfy133"

View file

@ -29,8 +29,9 @@ process MAXBIN2 {
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"
def associate_files = reads ? "-reads $reads" : "-abund $abund" def associate_files = reads ? "-reads $reads" : "-abund $abund"
""" """
mkdir input/ && mv $contigs input/
run_MaxBin.pl \\ run_MaxBin.pl \\
-contig $contigs \\ -contig input/$contigs \\
$associate_files \\ $associate_files \\
-thread $task.cpus \\ -thread $task.cpus \\
$args \\ $args \\

View file

@ -0,0 +1,49 @@
process PICARD_SORTVCF {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::picard=2.26.10" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' :
'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }"
input:
tuple val(meta), path(vcf)
path reference
path sequence_dict
output:
tuple val(meta), path("*_sorted.vcf.gz"), emit: vcf
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def seq_dict = sequence_dict ? "-SEQUENCE_DICTIONARY $sequence_dict" : ""
def reference = reference ? "-REFERENCE_SEQUENCE $reference" : ""
def avail_mem = 3
if (!task.memory) {
log.info '[Picard SortVcf] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
} else {
avail_mem = task.memory.giga
}
"""
picard \\
SortVcf \\
-Xmx${avail_mem}g \\
--INPUT $vcf \\
$args \\
$seq_dict \\
$reference \\
--OUTPUT ${prefix}_sorted.vcf.gz
cat <<-END_VERSIONS > versions.yml
"${task.process}":
picard: \$(picard SortVcf --version 2>&1 | grep -o 'Version:.*' | cut -f2- -d:)
END_VERSIONS
"""
}

View file

@ -0,0 +1,40 @@
name: picard_sortvcf
description: Sorts vcf files
keywords:
- sort
- vcf
tools:
- picard:
description: Java tools for working with NGS data in the BAM/CRAM/SAM and VCF format
homepage: https://broadinstitute.github.io/picard/
documentation: https://broadinstitute.github.io/picard/command-line-overview.html#SortVcf
licence: ['MIT']
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- vcf:
type: file
description: VCF file
pattern: "*.{vcf,vcf.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"
- vcf:
type: file
description: Sorted VCF file
pattern: "*.{vcf}"
authors:
- "@ramprasadn"

View file

@ -0,0 +1,39 @@
process PLINK2_SCORE {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::plink2=2.00a2.3" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/plink2:2.00a2.3--h712d239_1' :
'quay.io/biocontainers/plink2:2.00a2.3--h712d239_1' }"
input:
tuple val(meta), path(pgen), path(psam), path(pvar)
path(scorefile)
output:
tuple val(meta), path("*.sscore"), emit: score
path("versions.yml") , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def mem_mb = task.memory.toMega() // plink is greedy
"""
plink2 \\
--threads $task.cpus \\
--memory $mem_mb \\
--pfile ${pgen.baseName} vzs \\
--score ${scorefile} \\
$args \\
--out ${prefix}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
plink2: \$(plink2 --version 2>&1 | sed 's/^PLINK v//; s/ 64.*\$//' )
END_VERSIONS
"""
}

View file

@ -0,0 +1,56 @@
name: plink2_score
description: Apply a scoring system to each sample in a plink 2 fileset
keywords:
- plink2
- score
tools:
- plink2:
description: |
Whole genome association analysis toolset, designed to perform a range
of basic, large-scale analyses in a computationally efficient manner
homepage: http://www.cog-genomics.org/plink/2.0/
documentation: http://www.cog-genomics.org/plink/2.0/general_usage
tool_dev_url: None
doi: "10.1186/s13742-015-0047-8"
licence: ['GPL v3']
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- pgen:
type: file
description: PLINK 2 binary genotype table
pattern: "*.{pgen}"
- psam:
type: file
description: PLINK 2 sample information file
pattern: "*.{psam}"
- pvar:
type: file
description: PLINK 2 variant information file
pattern: "*.{pvar}"
- scorefile:
type: file
description: A text file containing variant identifiers and weights
pattern: "*.{scores,txt,scorefile}"
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"
- score:
type: file
description: A text file containing sample scores, in plink 2 .sscore format
pattern: "*.{sscore}"
authors:
- "@nebfield"

View file

@ -0,0 +1,41 @@
process SEQKIT_REPLACE {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::seqkit=2.1.0" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/seqkit:2.1.0--h9ee0642_0':
'quay.io/biocontainers/seqkit:2.1.0--h9ee0642_0' }"
input:
tuple val(meta), path(fastx)
output:
tuple val(meta), path("*.fast*"), emit: fastx
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def extension = "fastq"
if ("$fastx" ==~ /.+\.fasta|.+\.fasta.gz|.+\.fa|.+\.fa.gz|.+\.fas|.+\.fas.gz|.+\.fna|.+\.fna.gz/) {
extension = "fasta"
}
def endswith = task.ext.suffix ?: "${extension}.gz"
"""
seqkit \\
replace \\
${args} \\
--threads ${task.cpus} \\
-i ${fastx} \\
-o ${prefix}.${endswith}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
seqkit: \$( seqkit | sed '3!d; s/Version: //' )
END_VERSIONS
"""
}

View file

@ -0,0 +1,41 @@
name: seqkit_replace
description: Use seqkit to find/replace strings within sequences and sequence headers
keywords:
- seqkit
- replace
tools:
- seqkit:
description: Cross-platform and ultrafast toolkit for FASTA/Q file manipulation, written by Wei Shen.
homepage: https://bioinf.shenwei.me/seqkit/usage/
documentation: https://bioinf.shenwei.me/seqkit/usage/
tool_dev_url: https://github.com/shenwei356/seqkit/
doi: "10.1371/journal.pone.016396"
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- fastx:
type: file
description: fasta/q file
pattern: "*.{fasta,fastq,fa,fq,fas,fna,faa}*"
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"
- fastx:
type: file
description: fasta/q file with replaced values
pattern: "*.{fasta,fastq,fa,fq,fas,fna,faa}*"
authors:
- "@mjcipriano"

View file

@ -33,8 +33,8 @@ process SEQTK_SEQ {
gzip -c > ${prefix}.seqtk-seq.${extension}.gz gzip -c > ${prefix}.seqtk-seq.${extension}.gz
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
"${task.process}": "${task.process}":
seqtk: \$(echo \$(seqtk 2>&1) | sed 's/^.*Version: //; s/ .*\$//') seqtk: \$(echo \$(seqtk 2>&1) | sed 's/^.*Version: //; s/ .*\$//')
END_VERSIONS END_VERSIONS
""" """
} }

View file

@ -13,6 +13,7 @@ process YARA_MAPPER {
output: output:
tuple val(meta), path("*.mapped.bam"), emit: bam tuple val(meta), path("*.mapped.bam"), emit: bam
tuple val(meta), path("*.mapped.bam.bai"), emit: bai
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when: when:
@ -28,7 +29,9 @@ process YARA_MAPPER {
-t $task.cpus \\ -t $task.cpus \\
-f bam \\ -f bam \\
${index}/yara \\ ${index}/yara \\
$reads | samtools view -@ $task.cpus -hb -F4 > ${prefix}.mapped.bam $reads | samtools view -@ $task.cpus -hb -F4 | samtools sort -@ $task.cpus > ${prefix}.mapped.bam
samtools index -@ $task.cpus ${prefix}.mapped.bam
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
"${task.process}": "${task.process}":
@ -46,8 +49,11 @@ process YARA_MAPPER {
${reads[0]} \\ ${reads[0]} \\
${reads[1]} > output.bam ${reads[1]} > output.bam
samtools view -@ $task.cpus -hF 4 -f 0x40 -b output.bam > ${prefix}_1.mapped.bam samtools view -@ $task.cpus -hF 4 -f 0x40 -b output.bam | samtools sort -@ $task.cpus > ${prefix}_1.mapped.bam
samtools view -@ $task.cpus -hF 4 -f 0x80 -b output.bam > ${prefix}_2.mapped.bam samtools view -@ $task.cpus -hF 4 -f 0x80 -b output.bam | samtools sort -@ $task.cpus > ${prefix}_2.mapped.bam
samtools index -@ $task.cpus ${prefix}_1.mapped.bam
samtools index -@ $task.cpus ${prefix}_2.mapped.bam
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
"${task.process}": "${task.process}":

View file

@ -45,6 +45,10 @@ output:
type: file type: file
description: Sorted BAM file description: Sorted BAM file
pattern: "*.{bam}" pattern: "*.{bam}"
- bai:
type: file
description: Sorted BAM file index
pattern: "*.{bai}"
authors: authors:
- "@apeltzer" - "@apeltzer"

View file

@ -1249,6 +1249,10 @@ picard/sortsam:
- modules/picard/sortsam/** - modules/picard/sortsam/**
- tests/modules/picard/sortsam/** - tests/modules/picard/sortsam/**
picard/sortvcf:
- modules/picard/sortvcf/**
- tests/modules/picard/sortvcf/**
pirate: pirate:
- modules/pirate/** - modules/pirate/**
- tests/modules/pirate/** - tests/modules/pirate/**
@ -1269,6 +1273,10 @@ plink2/extract:
- modules/plink2/extract/** - modules/plink2/extract/**
- tests/modules/plink2/extract/** - tests/modules/plink2/extract/**
plink2/score:
- modules/plink2/score/**
- tests/modules/plink2/score/**
plink2/vcf: plink2/vcf:
- modules/plink2/vcf/** - modules/plink2/vcf/**
- tests/modules/plink2/vcf/** - tests/modules/plink2/vcf/**
@ -1473,6 +1481,10 @@ seqkit/pair:
- modules/seqkit/pair/** - modules/seqkit/pair/**
- tests/modules/seqkit/pair/** - tests/modules/seqkit/pair/**
seqkit/replace:
- modules/seqkit/replace/**
- tests/modules/seqkit/replace/**
seqkit/split2: seqkit/split2:
- modules/seqkit/split2/** - modules/seqkit/split2/**
- tests/modules/seqkit/split2/** - tests/modules/seqkit/split2/**

View file

@ -119,7 +119,7 @@ params {
genome_bed_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/genome.bed.gz.tbi" genome_bed_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/genome.bed.gz.tbi"
transcriptome_fasta = "${test_data_dir}/genomics/homo_sapiens/genome/transcriptome.fasta" transcriptome_fasta = "${test_data_dir}/genomics/homo_sapiens/genome/transcriptome.fasta"
genome2_fasta = "${test_data_dir}/genomics/homo_sapiens/genome/genome2.fasta" genome2_fasta = "${test_data_dir}/genomics/homo_sapiens/genome/genome2.fasta"
genome_chain_gz = "${test_data_dir}/genomics/homo_sapiens/genome/genome.chain.gz" genome_chain_gz = "${test_data_dir}/genomics/homo_sapiens/genome/genome.chain.gz"
genome_21_fasta = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/genome.fasta" genome_21_fasta = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/genome.fasta"
genome_21_fasta_fai = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai" genome_21_fasta_fai = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai"
genome_21_dict = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/genome.dict" genome_21_dict = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/genome.dict"
@ -138,6 +138,7 @@ params {
mills_and_1000g_indels_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/mills_and_1000G.indels.vcf.gz.tbi" mills_and_1000g_indels_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/mills_and_1000G.indels.vcf.gz.tbi"
syntheticvcf_short_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/syntheticvcf_short.vcf.gz" syntheticvcf_short_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/syntheticvcf_short.vcf.gz"
syntheticvcf_short_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/syntheticvcf_short.vcf.gz.tbi" syntheticvcf_short_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/syntheticvcf_short.vcf.gz.tbi"
syntheticvcf_short_score = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/syntheticvcf_short.score"
gnomad_r2_1_1_sv_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/gnomAD.r2.1.1-sv.vcf.gz" gnomad_r2_1_1_sv_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/gnomAD.r2.1.1-sv.vcf.gz"
hapmap_3_3_hg38_21_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/germlineresources/hapmap_3.3.hg38.vcf.gz" hapmap_3_3_hg38_21_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/germlineresources/hapmap_3.3.hg38.vcf.gz"

View file

@ -7,6 +7,8 @@
- path: output/chromap/genome.index - path: output/chromap/genome.index
- path: output/chromap/test.bed.gz - path: output/chromap/test.bed.gz
md5sum: 25e40bde24c7b447292cd68573728694 md5sum: 25e40bde24c7b447292cd68573728694
- path: output/chromap/versions.yml
md5sum: 2d3d2959ac20d98036807964896829e7
- name: chromap chromap test_chromap_chromap_paired_end - name: chromap chromap test_chromap_chromap_paired_end
command: nextflow run ./tests/modules/chromap/chromap -entry test_chromap_chromap_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/chromap/chromap/nextflow.config command: nextflow run ./tests/modules/chromap/chromap -entry test_chromap_chromap_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/chromap/chromap/nextflow.config
@ -17,6 +19,8 @@
- path: output/chromap/genome.index - path: output/chromap/genome.index
- path: output/chromap/test.bed.gz - path: output/chromap/test.bed.gz
md5sum: 7cdc8448882b75811e0c784f5f20aef2 md5sum: 7cdc8448882b75811e0c784f5f20aef2
- path: output/chromap/versions.yml
md5sum: 51cff66779161d8a602cce5989017395
- name: chromap chromap test_chromap_chromap_paired_bam - name: chromap chromap test_chromap_chromap_paired_bam
command: nextflow run ./tests/modules/chromap/chromap -entry test_chromap_chromap_paired_bam -c ./tests/config/nextflow.config -c ./tests/modules/chromap/chromap/nextflow.config command: nextflow run ./tests/modules/chromap/chromap -entry test_chromap_chromap_paired_bam -c ./tests/config/nextflow.config -c ./tests/modules/chromap/chromap/nextflow.config
@ -26,4 +30,6 @@
files: files:
- path: output/chromap/genome.index - path: output/chromap/genome.index
- path: output/chromap/test.bam - path: output/chromap/test.bam
md5sum: 73e2c76007e3c61df625668e01b3f42f md5sum: f255c7441d5a1f307fc642d2aa19647e
- path: output/chromap/versions.yml
md5sum: f91910c44169549c3923931de5c3afcb

View file

@ -5,3 +5,5 @@
- chromap - chromap
files: files:
- path: output/chromap/genome.index - path: output/chromap/genome.index
- path: output/chromap/versions.yml
md5sum: b75dec647f9dc5f4887f36d1db7a9ccd

View file

@ -5,4 +5,4 @@
- malt/run - malt/run
files: files:
- path: output/malt/test_1.rma6 - path: output/malt/test_1.rma6
- path: output/malt/malt-run.log - path: output/malt/test-malt-run.log

View file

@ -0,0 +1,18 @@
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { PICARD_SORTVCF } from '../../../../modules/picard/sortvcf/main.nf'
workflow test_picard_sortvcf {
input = [ [ id:'test' ], // meta map
file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true)
]
fasta = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ]
dict = [ file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) ]
PICARD_SORTVCF ( input, fasta, dict )
}

View file

@ -0,0 +1,5 @@
process {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
}

View file

@ -0,0 +1,7 @@
- name: picard sortvcf
command: nextflow run ./tests/modules/picard/sortvcf -entry test_picard_sortvcf -c ./tests/config/nextflow.config -c ./tests/modules/picard/sortvcf/nextflow.config
tags:
- picard
- picard/sortvcf
files:
- path: output/picard/test_sorted.vcf.gz

View file

@ -0,0 +1,24 @@
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { PLINK2_VCF } from '../../../../modules/plink2/vcf/main.nf'
include { PLINK2_SCORE } from '../../../../modules/plink2/score/main.nf'
workflow test_plink2_score {
input = [
[ id:'test', single_end:false ], // meta map
file(params.test_data['homo_sapiens']['genome']['syntheticvcf_short_vcf_gz'], checkIfExists: true)
]
PLINK2_VCF ( input )
scorefile = file(params.test_data['homo_sapiens']['genome']['syntheticvcf_short_score'], checkIfExists: true)
PLINK2_VCF.out.pgen
.concat(PLINK2_VCF.out.psam, PLINK2_VCF.out.pvar)
.groupTuple()
.map { it.flatten() }
.set { ch_target_genome }
PLINK2_SCORE ( ch_target_genome, scorefile )
}

View file

@ -0,0 +1,15 @@
process {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
// relabel input variants to a common scheme chr:pos:alt:ref
withName: PLINK2_VCF {
ext.args = '--set-missing-var-ids @:#:\\$1:\\$2'
}
// scoring really needs an adjustment for small test dataset (n > 50
// normally)
withName: PLINK2_SCORE {
ext.args = 'no-mean-imputation'
}
}

View file

@ -0,0 +1,16 @@
- name: plink2 score test_plink2_score
command: nextflow run tests/modules/plink2/score -entry test_plink2_score -c tests/config/nextflow.config
tags:
- plink2
- plink2/score
files:
- path: output/plink2/test.pgen
md5sum: fac12ca9041d6950f6b7d60ac2120721
- path: output/plink2/test.psam
md5sum: e6c714488754cb8448c3dfda08c4c0ea
- path: output/plink2/test.pvar.zst
md5sum: 98d59e9779a8b62d5032cd98b642a63b
- path: output/plink2/test.sscore
md5sum: 97bde840f69febd65f2c00e9243126e9
- path: output/plink2/versions.yml
md5sum: 71499ab14e1583c88ced3a7a4f05bfa7

View file

@ -0,0 +1,24 @@
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { SEQKIT_REPLACE } from '../../../../modules/seqkit/replace/main.nf'
include { SEQKIT_REPLACE as SEQKIT_REPLACEUNCOMP } from '../../../../modules/seqkit/replace/main.nf'
workflow test_seqkit_replace {
input = [ [ id:'test' ], // meta map
[ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ]
]
SEQKIT_REPLACE ( input )
}
workflow test_seqkit_replace_uncomp {
input = [ [ id:'test' ], // meta map
[ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ]
]
SEQKIT_REPLACEUNCOMP ( input )
}

View file

@ -0,0 +1,14 @@
process {
withName: 'SEQKIT_REPLACE' {
ext.args = "-s -p 'A' -r 'N'"
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
}
withName: 'SEQKIT_REPLACEUNCOMP' {
ext.args = "-s -p 'T' -r 'N'"
ext.suffix = ".fasta"
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
}
}

View file

@ -0,0 +1,21 @@
- name: seqkit replace test_seqkit_replace
command: nextflow run tests/modules/seqkit/replace -entry test_seqkit_replace -c tests/config/nextflow.config
tags:
- seqkit
- seqkit/replace
files:
- path: output/seqkit/test.fasta.gz
md5sum: 053847219695c0a923d02352442d7abf
- path: output/seqkit/versions.yml
md5sum: dc9d18b7836c9db00a3032fd191bd831
- name: seqkit replace test_seqkit_replace_uncomp
command: nextflow run tests/modules/seqkit/replace -entry test_seqkit_replace_uncomp -c tests/config/nextflow.config
tags:
- seqkit
- seqkit/replace
files:
- path: output/seqkit/test..fasta
md5sum: 05d3294a62c72f5489f067c1da3c2f6c
- path: output/seqkit/versions.yml
md5sum: 3b88128487ec949f0bdeecebc375c407

View file

@ -7,7 +7,7 @@
- path: output/seqtk/test.seqtk-seq.fasta.gz - path: output/seqtk/test.seqtk-seq.fasta.gz
md5sum: 50d73992c8c7e56dc095ef47ec52a754 md5sum: 50d73992c8c7e56dc095ef47ec52a754
- path: output/seqtk/versions.yml - path: output/seqtk/versions.yml
md5sum: 2b89cd4a6e28f35fcfbbd2188384f944 md5sum: 6555e1061080c44f828de0b40b299e41
- name: seqtk seq test_seqtk_seq_fq - name: seqtk seq test_seqtk_seq_fq
command: nextflow run tests/modules/seqtk/seq -entry test_seqtk_seq_fq -c tests/config/nextflow.config command: nextflow run tests/modules/seqtk/seq -entry test_seqtk_seq_fq -c tests/config/nextflow.config
@ -18,4 +18,4 @@
- path: output/seqtk/test.seqtk-seq.fasta.gz - path: output/seqtk/test.seqtk-seq.fasta.gz
md5sum: 2f009f1647971a97b4edec726a99dc1a md5sum: 2f009f1647971a97b4edec726a99dc1a
- path: output/seqtk/versions.yml - path: output/seqtk/versions.yml
md5sum: 3467a76d3540bee8f58de050512bddaa md5sum: feb70feb3165d5c19fa50c16e46e6772

View file

@ -5,6 +5,7 @@
- yara - yara
files: files:
- path: output/yara/test.mapped.bam - path: output/yara/test.mapped.bam
- path: output/yara/test.mapped.bam.bai
- path: output/yara/yara/yara.txt.size - path: output/yara/yara/yara.txt.size
md5sum: 063987b3c3f747be7d2b8043c9d91000 md5sum: 063987b3c3f747be7d2b8043c9d91000
- path: output/yara/yara/yara.lf.drs - path: output/yara/yara/yara.lf.drs
@ -39,7 +40,9 @@
- yara - yara
files: files:
- path: output/yara/test_2.mapped.bam - path: output/yara/test_2.mapped.bam
- path: output/yara/test_2.mapped.bam.bai
- path: output/yara/test_1.mapped.bam - path: output/yara/test_1.mapped.bam
- path: output/yara/test_1.mapped.bam.bai
- path: output/yara/yara/yara.txt.size - path: output/yara/yara/yara.txt.size
md5sum: 063987b3c3f747be7d2b8043c9d91000 md5sum: 063987b3c3f747be7d2b8043c9d91000
- path: output/yara/yara/yara.lf.drs - path: output/yara/yara/yara.lf.drs