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,10 +8,10 @@ process SAMTOOLS_FAIDX {
'quay.io/biocontainers/samtools:1.14--hb421002_0' }" 'quay.io/biocontainers/samtools:1.14--hb421002_0' }"
input: input:
path fasta tuple val(meta), path(fasta)
output: output:
path "*.fai" , emit: fai tuple val(meta), path ("*.fai") , emit: fai
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
script: script:

View file

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

View file

@ -5,7 +5,9 @@ nextflow.enable.dsl = 2
include { SAMTOOLS_FAIDX } from '../../../../modules/samtools/faidx/main.nf' include { SAMTOOLS_FAIDX } from '../../../../modules/samtools/faidx/main.nf'
workflow test_samtools_faidx { 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 - name: samtools faidx test_samtools_faidx
command: nextflow run ./tests/modules/samtools/faidx -entry test_samtools_faidx -c ./tests/config/nextflow.config -c ./tests/modules/samtools/faidx/nextflow.config command: nextflow run tests/modules/samtools/faidx -entry test_samtools_faidx -c tests/config/nextflow.config
tags: tags:
- samtools - samtools
- samtools/faidx - samtools/faidx
files: files:
- path: output/samtools/genome.fasta.fai - path: output/samtools/genome.fasta.fai
md5sum: 9da2a56e2853dc8c0b86a9e7229c9fe5 md5sum: 9da2a56e2853dc8c0b86a9e7229c9fe5
- path: output/samtools/versions.yml
md5sum: d56671a7c8f8058944d3d536c3058f7f