add samtools faidx to index fasta file

This commit is contained in:
MaxUlysse 2020-01-23 11:36:21 +01:00
parent b8dda67338
commit 7fbfd2d6cb
4 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,16 @@
process samtools_faidx {
tag {fasta}
container 'quay.io/biocontainers/samtools:1.9--h10a08f8_12'
input:
path(fasta)
output:
path("${fasta}.fai")
script:
"""
samtools faidx ${fasta}
"""
}

View file

@ -0,0 +1,27 @@
name: samtools faidx
description: index a fasta file
keywords:
- faidx
tools:
- samtools:
description: |
SAMtools is a set of utilities for interacting with and post-processing
short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li.
These files are generated as output by short read aligners like BWA.
homepage: http://www.htslib.org/
documentation: hhttp://www.htslib.org/doc/samtools.html
doi: 10.1093/bioinformatics/btp352
input:
-
- input:
type: file
description: Input fasta file
pattern: *.{fasta,fa}
output:
-
- faidx:
type: file
description: samtools index fasta file
pattern: *.fasta.fai
authors:
- @maxulysse

View file

@ -0,0 +1,13 @@
#!/usr/bin/env nextflow
nextflow.preview.dsl = 2
include '../../../nf-core/module_testing/check_process_outputs.nf' params(params)
include '../main.nf' params(params)
// Define input channels
input = '../../../test-datasets/tools/bwa/index/input/reference.fasta'
// Run the workflow
workflow {
samtools_faidx(input)
// .check_output()
}

View file

@ -0,0 +1,2 @@
docker.enabled = true
params.outdir = './results'