Skip to content

Commit

Permalink
Merge branch 'master' into seqkit-sliding-update
Browse files Browse the repository at this point in the history
  • Loading branch information
DLBPointon authored Sep 28, 2023
2 parents c282a46 + 1728df6 commit 6f69892
Show file tree
Hide file tree
Showing 14 changed files with 117 additions and 64 deletions.
25 changes: 19 additions & 6 deletions modules/nf-core/blast/blastn/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ process BLAST_BLASTN {
tag "$meta.id"
label 'process_medium'

conda "bioconda::blast=2.13.0"
conda "bioconda::blast=2.14.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/blast:2.13.0--hf3cf87c_0' :
'biocontainers/blast:2.13.0--hf3cf87c_0' }"
'https://depot.galaxyproject.org/singularity/blast:2.14.1--pl5321h6f7f691_0':
'biocontainers/blast:2.14.1--pl5321h6f7f691_0' }"

input:
tuple val(meta), path(fasta)
path db

output:
tuple val(meta), path('*.blastn.txt'), emit: txt
path "versions.yml" , emit: versions
tuple val(meta), path('*.txt'), emit: txt
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when
Expand All @@ -28,7 +28,20 @@ process BLAST_BLASTN {
-db \$DB \\
-query $fasta \\
$args \\
-out ${prefix}.blastn.txt
-out ${prefix}.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
blast: \$(blastn -version 2>&1 | sed 's/^.*blastn: //; s/ .*\$//')
END_VERSIONS
"""

stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
blast: \$(blastn -version 2>&1 | sed 's/^.*blastn: //; s/ .*\$//')
Expand Down
3 changes: 2 additions & 1 deletion modules/nf-core/blast/blastn/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ output:
- txt:
type: file
description: File containing blastn hits
pattern: "*.{blastn.txt}"
pattern: "*.txt"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@joseespinosa"
- "@drpatelh"
- "@vagkaratzas"
2 changes: 1 addition & 1 deletion modules/nf-core/blast/blastp/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ process BLAST_BLASTP {

output:
tuple val(meta), path("*.csv"), emit: csv
path "versions.yml" , emit: versions
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when
Expand Down
32 changes: 27 additions & 5 deletions modules/nf-core/blast/makeblastdb/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ process BLAST_MAKEBLASTDB {
tag "$fasta"
label 'process_medium'

conda "bioconda::blast=2.13.0"
conda "bioconda::blast=2.14.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/blast:2.13.0--hf3cf87c_0' :
'biocontainers/blast:2.13.0--hf3cf87c_0' }"
'https://depot.galaxyproject.org/singularity/blast:2.14.1--pl5321h6f7f691_0':
'biocontainers/blast:2.14.1--pl5321h6f7f691_0' }"

input:
path fasta

output:
path 'blast_db' , emit: db
path "versions.yml" , emit: versions
path 'blast_db' , emit: db
path "versions.yml", emit: versions

when:
task.ext.when == null || task.ext.when
Expand All @@ -25,6 +25,28 @@ process BLAST_MAKEBLASTDB {
$args
mkdir blast_db
mv ${fasta}* blast_db
cat <<-END_VERSIONS > versions.yml
"${task.process}":
blast: \$(blastn -version 2>&1 | sed 's/^.*blastn: //; s/ .*\$//')
END_VERSIONS
"""

stub:
def args = task.ext.args ?: ''
"""
touch ${fasta}.fasta
touch ${fasta}.fasta.ndb
touch ${fasta}.fasta.nhr
touch ${fasta}.fasta.nin
touch ${fasta}.fasta.njs
touch ${fasta}.fasta.not
touch ${fasta}.fasta.nsq
touch ${fasta}.fasta.ntf
touch ${fasta}.fasta.nto
mkdir blast_db
mv ${fasta}* blast_db
cat <<-END_VERSIONS > versions.yml
"${task.process}":
blast: \$(blastn -version 2>&1 | sed 's/^.*blastn: //; s/ .*\$//')
Expand Down
1 change: 1 addition & 0 deletions modules/nf-core/blast/makeblastdb/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ output:
authors:
- "@joseespinosa"
- "@drpatelh"
- "@vagkaratzas"
25 changes: 19 additions & 6 deletions modules/nf-core/blast/tblastn/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ process BLAST_TBLASTN {
tag "$meta.id"
label 'process_medium'

conda "bioconda::blast=2.13.0"
conda "bioconda::blast=2.14.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/blast:2.13.0--hf3cf87c_0' :
'biocontainers/blast:2.13.0--hf3cf87c_0' }"
'https://depot.galaxyproject.org/singularity/blast:2.14.1--pl5321h6f7f691_0':
'biocontainers/blast:2.14.1--pl5321h6f7f691_0' }"

input:
tuple val(meta), path(fasta)
path db

output:
tuple val(meta), path('*.tblastn.txt') , emit: txt
path "versions.yml" , emit: versions
tuple val(meta), path('*.txt'), emit: txt
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when
Expand All @@ -28,7 +28,20 @@ process BLAST_TBLASTN {
-db \$DB \\
-query $fasta \\
$args \\
-out ${prefix}.tblastn.txt
-out ${prefix}.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
blast: \$(tblastn -version 2>&1 | sed 's/^.*tblastn: //; s/ .*\$//')
END_VERSIONS
"""

stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
blast: \$(tblastn -version 2>&1 | sed 's/^.*tblastn: //; s/ .*\$//')
Expand Down
3 changes: 2 additions & 1 deletion modules/nf-core/blast/tblastn/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ output:
- txt:
type: file
description: File containing blastn hits
pattern: "*.{tblastn.txt}"
pattern: "*.txt"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@yumisims"
- "@gq2"
- "@vagkaratzas"
1 change: 1 addition & 0 deletions tests/modules/nf-core/blast/blastn/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ include { BLAST_MAKEBLASTDB } from '../../../../../modules/nf-core/blast/makebla
include { BLAST_BLASTN } from '../../../../../modules/nf-core/blast/blastn/main.nf'

workflow test_blast_blastn {

input = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ]

BLAST_MAKEBLASTDB ( input )
Expand Down
22 changes: 12 additions & 10 deletions tests/modules/nf-core/blast/blastn/test.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
- name: blast_blastn
- name: blast blastn
command: nextflow run ./tests/modules/nf-core/blast/blastn -entry test_blast_blastn -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/blast/blastn/nextflow.config
tags:
- blast
- blast/blastn
files:
- path: ./output/blast/test.blastn.txt
- path: ./output/blast/blast_db/genome.fasta.nsq
- path: output/blast/test.txt
contains:
- "Query= MT192765.1 Severe acute respiratory syndrome coronavirus 2 isolate"
- path: output/blast/blast_db/genome.fasta.nsq
md5sum: 982cbc7d9e38743b9b1037588862b9da
- path: ./output/blast/blast_db/genome.fasta.nin
- path: ./output/blast/blast_db/genome.fasta
- path: output/blast/blast_db/genome.fasta.nin
- path: output/blast/blast_db/genome.fasta
md5sum: 6e9fe4042a72f2345f644f239272b7e6
- path: ./output/blast/blast_db/genome.fasta.nhr
- path: output/blast/blast_db/genome.fasta.nhr
md5sum: f4b4ddb034fd3dd7b25c89e9d50c004e
- path: ./output/blast/blast_db/genome.fasta.ndb
- path: output/blast/blast_db/genome.fasta.ndb
md5sum: 0d553c830656469211de113c5022f06d
- path: ./output/blast/blast_db/genome.fasta.not
- path: output/blast/blast_db/genome.fasta.not
md5sum: 1e53e9d08f1d23af0299cfa87478a7bb
- path: ./output/blast/blast_db/genome.fasta.nto
- path: output/blast/blast_db/genome.fasta.nto
md5sum: 33cdeccccebe80329f1fdbee7f5874cb
- path: ./output/blast/blast_db/genome.fasta.ntf
- path: output/blast/blast_db/genome.fasta.ntf
md5sum: de1250813f0c7affc6d12dac9d0fb6bb
24 changes: 12 additions & 12 deletions tests/modules/nf-core/blast/blastp/test.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
- name: "blast blastp"
- name: blast blastp
command: nextflow run ./tests/modules/nf-core/blast/blastp -entry test_blast_blastp -c ./tests/config/nextflow.config
tags:
- "blast"
- "blast/blastp"
- blast
- blast/blastp
files:
- path: output/blast/test.csv
md5sum: 37a8b6ef8942b5d465be26126bce8965
- path: ./output/blast/blast_db/genome.fasta
- path: output/blast/blast_db/genome.fasta
md5sum: 6e9fe4042a72f2345f644f239272b7e6
- path: ./output/blast/blast_db/genome.fasta.pdb
- path: output/blast/blast_db/genome.fasta.pdb
md5sum: 0d553c830656469211de113c5022f06d
- path: ./output/blast/blast_db/genome.fasta.phr
- path: output/blast/blast_db/genome.fasta.phr
md5sum: f4b4ddb034fd3dd7b25c89e9d50c004e
- path: ./output/blast/blast_db/genome.fasta.pin
- path: ./output/blast/blast_db/genome.fasta.pjs
- path: ./output/blast/blast_db/genome.fasta.pot
- path: output/blast/blast_db/genome.fasta.pin
- path: output/blast/blast_db/genome.fasta.pjs
- path: output/blast/blast_db/genome.fasta.pot
md5sum: 1e53e9d08f1d23af0299cfa87478a7bb
- path: ./output/blast/blast_db/genome.fasta.psq
- path: output/blast/blast_db/genome.fasta.psq
md5sum: cf2ba5f8fc9088651c82de851b4c45a4
- path: ./output/blast/blast_db/genome.fasta.ptf
- path: output/blast/blast_db/genome.fasta.ptf
md5sum: de1250813f0c7affc6d12dac9d0fb6bb
- path: ./output/blast/blast_db/genome.fasta.pto
- path: output/blast/blast_db/genome.fasta.pto
md5sum: 33cdeccccebe80329f1fdbee7f5874cb
1 change: 1 addition & 0 deletions tests/modules/nf-core/blast/makeblastdb/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ nextflow.enable.dsl = 2
include { BLAST_MAKEBLASTDB } from '../../../../../modules/nf-core/blast/makeblastdb/main.nf'

workflow test_blast_makeblastdb {

input = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ]

BLAST_MAKEBLASTDB ( input )
Expand Down
18 changes: 9 additions & 9 deletions tests/modules/nf-core/blast/makeblastdb/test.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
- name: blast_makeblastdb
- name: blast makeblastdb
command: nextflow run ./tests/modules/nf-core/blast/makeblastdb -entry test_blast_makeblastdb -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/blast/makeblastdb/nextflow.config
tags:
- blast
- blast/makeblastdb
files:
- path: ./output/blast/blast_db/genome.fasta.nsq
- path: output/blast/blast_db/genome.fasta.nsq
md5sum: 982cbc7d9e38743b9b1037588862b9da
- path: ./output/blast/blast_db/genome.fasta.nin
- path: ./output/blast/blast_db/genome.fasta
- path: output/blast/blast_db/genome.fasta.nin
- path: output/blast/blast_db/genome.fasta
md5sum: 6e9fe4042a72f2345f644f239272b7e6
- path: ./output/blast/blast_db/genome.fasta.nhr
- path: output/blast/blast_db/genome.fasta.nhr
md5sum: f4b4ddb034fd3dd7b25c89e9d50c004e
- path: ./output/blast/blast_db/genome.fasta.ndb
- path: output/blast/blast_db/genome.fasta.ndb
md5sum: 0d553c830656469211de113c5022f06d
- path: ./output/blast/blast_db/genome.fasta.not
- path: output/blast/blast_db/genome.fasta.not
md5sum: 1e53e9d08f1d23af0299cfa87478a7bb
- path: ./output/blast/blast_db/genome.fasta.nto
- path: output/blast/blast_db/genome.fasta.nto
md5sum: 33cdeccccebe80329f1fdbee7f5874cb
- path: ./output/blast/blast_db/genome.fasta.ntf
- path: output/blast/blast_db/genome.fasta.ntf
md5sum: de1250813f0c7affc6d12dac9d0fb6bb
2 changes: 1 addition & 1 deletion tests/modules/nf-core/blast/tblastn/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

nextflow.enable.dsl = 2

include { BLAST_TBLASTN } from '../../../../../modules/nf-core/blast/tblastn/main.nf'
include { BLAST_MAKEBLASTDB } from '../../../../../modules/nf-core/blast/makeblastdb/main.nf'
include { BLAST_TBLASTN } from '../../../../../modules/nf-core/blast/tblastn/main.nf'

workflow test_blast_tblastn {

Expand Down
22 changes: 10 additions & 12 deletions tests/modules/nf-core/blast/tblastn/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,20 @@
- blast
- blast/tblastn
files:
- path: ./output/blast/test.tblastn.txt
md5sum: c26ccfa5ceae82fc6affdc77f5505b62
- path: ./output/blast/versions.yml
md5sum: 63d79c4c09cfd691d6be814e7fa3efd3
- path: ./output/blast/blast_db/genome.fasta.nsq
- path: output/blast/test.txt
md5sum: a78484fae1573991fabf727a7911c571
- path: output/blast/blast_db/genome.fasta.nsq
md5sum: 982cbc7d9e38743b9b1037588862b9da
- path: ./output/blast/blast_db/genome.fasta.nin
- path: ./output/blast/blast_db/genome.fasta
- path: output/blast/blast_db/genome.fasta.nin
- path: output/blast/blast_db/genome.fasta
md5sum: 6e9fe4042a72f2345f644f239272b7e6
- path: ./output/blast/blast_db/genome.fasta.nhr
- path: output/blast/blast_db/genome.fasta.nhr
md5sum: f4b4ddb034fd3dd7b25c89e9d50c004e
- path: ./output/blast/blast_db/genome.fasta.ndb
- path: output/blast/blast_db/genome.fasta.ndb
md5sum: 0d553c830656469211de113c5022f06d
- path: ./output/blast/blast_db/genome.fasta.not
- path: output/blast/blast_db/genome.fasta.not
md5sum: 1e53e9d08f1d23af0299cfa87478a7bb
- path: ./output/blast/blast_db/genome.fasta.nto
- path: output/blast/blast_db/genome.fasta.nto
md5sum: 33cdeccccebe80329f1fdbee7f5874cb
- path: ./output/blast/blast_db/genome.fasta.ntf
- path: output/blast/blast_db/genome.fasta.ntf
md5sum: de1250813f0c7affc6d12dac9d0fb6bb

0 comments on commit 6f69892

Please sign in to comment.