-
Notifications
You must be signed in to change notification settings - Fork 752
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Adding module for miniprot_index. Closes #1. * Adding module for miniprot_index. Closes #1. * Adding module for miniprot_index. Closes #1. * Adding module for miniprot_index. Closes #1. * Adding module for miniprot_index. Closes #1. * Adding module for miniprot_index. Closes #1. * update the wrong file name * put back the test data path * change index file name Co-authored-by: Guoying Qi <[email protected]>
- Loading branch information
Showing
7 changed files
with
106 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
process MINIPROT_INDEX { | ||
tag "$meta.id" | ||
label 'process_medium' | ||
def version = '0.5-c2' | ||
if (params.enable_conda) { | ||
exit 1, "Conda environments cannot be used when using the miniprot process. Please use docker or singularity containers." | ||
} | ||
container "quay.io/sanger-tol/miniprot:${version}" | ||
|
||
input: | ||
tuple val(meta), path(fasta) | ||
|
||
output: | ||
tuple val(meta), path("*.mpi"), emit: index | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
|
||
""" | ||
miniprot \\ | ||
-t $task.cpus \\ | ||
-d ${fasta.baseName}.mpi \\ | ||
$args \\ | ||
$fasta | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
miniprot: $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,39 @@ | ||
name: miniprot_index | ||
description: Provides fasta index required by miniprot alignment. | ||
keywords: | ||
- index | ||
- fasta | ||
- reference | ||
tools: | ||
- miniprot: | ||
description: | | ||
A versatile pairwise aligner for genomic and protein sequences. | ||
homepage: https://github.com/lh3/miniprot | ||
documentation: https://github.com/lh3/miniprot | ||
licence: ["MIT"] | ||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test', single_end:false ] | ||
- fasta: | ||
type: file | ||
description: | | ||
Reference database in FASTA format. | ||
output: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test', single_end:false ] | ||
- index: | ||
type: file | ||
description: miniprot fasta index. | ||
pattern: "*.mpi" | ||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
authors: | ||
- "@yumisims" |
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,10 @@ | ||
#!/usr/bin/env nextflow | ||
|
||
nextflow.enable.dsl = 2 | ||
|
||
include { MINIPROT_INDEX } from '../../../../modules/miniprot/index/main.nf' | ||
|
||
workflow test_miniprot_index { | ||
fasta =file(params.tol_test_data['small_genome']['Oscheius_sp']['assembly']['assembly_fasta'],checkIfExists: true) | ||
MINIPROT_INDEX ( [ [id:'test'], fasta ] ) | ||
} |
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,10 @@ | ||
- name: miniprot index | ||
command: nextflow run ./tests/modules/miniprot/index -entry test_miniprot_index -c ./tests/config/nextflow.config -c ./tests/modules/miniprot/index/nextflow.config | ||
tags: | ||
- miniprot | ||
- miniprot/index | ||
files: | ||
- path: output/miniprot/nxOscSpef2.mpi | ||
md5sum: ec3d98dc989e73873afe5b529c84c022 | ||
- path: output/miniprot/versions.yml | ||
md5sum: b191a09118135126e3da7080ad64983d |