Add meta information to samtools/faidx (#1114)

* add meta to samtools/faidx
This commit is contained in:
Maxime Borry 2021-12-06 11:37:04 +01:00 committed by GitHub
parent f3ffa69b8d
commit e0aa89141f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 7 deletions

View file

@ -8,11 +8,11 @@ process SAMTOOLS_FAIDX {
'quay.io/biocontainers/samtools:1.14--hb421002_0' }"
input:
path fasta
tuple val(meta), path(fasta)
output:
path "*.fai" , emit: fai
path "versions.yml", emit: versions
tuple val(meta), path ("*.fai") , emit: fai
path "versions.yml" , emit: versions
script:
def args = task.ext.args ?: ''

View file

@ -14,11 +14,21 @@ tools:
doi: 10.1093/bioinformatics/btp352
licence: ['MIT']
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- fasta:
type: file
description: FASTA file
pattern: "*.{fa,fasta}"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- fai:
type: file
description: FASTA index file

View file

@ -5,7 +5,9 @@ nextflow.enable.dsl = 2
include { SAMTOOLS_FAIDX } from '../../../../modules/samtools/faidx/main.nf'
workflow test_samtools_faidx {
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
SAMTOOLS_FAIDX ( fasta )
input = [ [ id:'test', single_end:false ], // meta map
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ]
SAMTOOLS_FAIDX ( input )
}

View file

@ -1,8 +1,10 @@
- name: samtools faidx test workflow
command: nextflow run ./tests/modules/samtools/faidx -entry test_samtools_faidx -c ./tests/config/nextflow.config -c ./tests/modules/samtools/faidx/nextflow.config
- name: samtools faidx test_samtools_faidx
command: nextflow run tests/modules/samtools/faidx -entry test_samtools_faidx -c tests/config/nextflow.config
tags:
- samtools
- samtools/faidx
files:
- path: output/samtools/genome.fasta.fai
md5sum: 9da2a56e2853dc8c0b86a9e7229c9fe5
- path: output/samtools/versions.yml
md5sum: d56671a7c8f8058944d3d536c3058f7f