mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 02:58:17 +00:00
commit
f62fad63ca
18 changed files with 239 additions and 7 deletions
16
tools/bwa/index/main.nf
Normal file
16
tools/bwa/index/main.nf
Normal file
|
@ -0,0 +1,16 @@
|
|||
process bwa_index {
|
||||
tag {fasta}
|
||||
|
||||
container 'quay.io/biocontainers/bwa:0.7.17--hed695b0_7'
|
||||
|
||||
input:
|
||||
path(fasta)
|
||||
|
||||
output:
|
||||
path("${fasta}.*")
|
||||
|
||||
script:
|
||||
"""
|
||||
bwa index ${fasta}
|
||||
"""
|
||||
}
|
25
tools/bwa/index/meta.yml
Normal file
25
tools/bwa/index/meta.yml
Normal file
|
@ -0,0 +1,25 @@
|
|||
name: bwa index
|
||||
description: create indexes for BWA from a fasta file
|
||||
keywords:
|
||||
- index
|
||||
tools:
|
||||
- bwa:
|
||||
description: |
|
||||
BWA is a software package for mapping DNA sequences against a large reference genome, such as the human genome.
|
||||
homepage: http://bio-bwa.sourceforge.net/
|
||||
documentation: http://www.htslib.org/doc/samtools.html
|
||||
arxiv: arXiv:1303.3997
|
||||
input:
|
||||
-
|
||||
- input:
|
||||
type: file
|
||||
description: Input fasta file
|
||||
pattern: *.{fasta,fa}
|
||||
output:
|
||||
-
|
||||
- index:
|
||||
type: file
|
||||
description: bwa indexes file
|
||||
pattern: *.{fasta,fa}.{amb,ann,bwt,pac,sa}
|
||||
authors:
|
||||
- @maxulysse
|
16
tools/bwa/index/test/main.nf
Normal file
16
tools/bwa/index/test/main.nf
Normal file
|
@ -0,0 +1,16 @@
|
|||
#!/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'
|
||||
Channel
|
||||
.from(input)
|
||||
.set { ch_input }
|
||||
|
||||
// Run the workflow
|
||||
workflow {
|
||||
fastqc(ch_input)
|
||||
// .check_output()
|
||||
}
|
2
tools/bwa/index/test/nextflow.config
Normal file
2
tools/bwa/index/test/nextflow.config
Normal file
|
@ -0,0 +1,2 @@
|
|||
docker.enabled = true
|
||||
params.outdir = './results'
|
19
tools/gatk/dict/main.nf
Normal file
19
tools/gatk/dict/main.nf
Normal file
|
@ -0,0 +1,19 @@
|
|||
process gatk_dict {
|
||||
tag {fasta}
|
||||
|
||||
container 'quay.io/biocontainers/gatk4-spark:4.1.4.1--1'
|
||||
|
||||
input:
|
||||
path(fasta)
|
||||
|
||||
output:
|
||||
path("${fasta.baseName}.dict")
|
||||
|
||||
script:
|
||||
"""
|
||||
gatk --java-options "-Xmx${task.memory.toGiga()}g" \
|
||||
CreateSequenceDictionary \
|
||||
--REFERENCE ${fasta} \
|
||||
--OUTPUT ${fasta.baseName}.dict
|
||||
"""
|
||||
}
|
25
tools/gatk/dict/meta.yml
Normal file
25
tools/gatk/dict/meta.yml
Normal file
|
@ -0,0 +1,25 @@
|
|||
name: gatk dict
|
||||
description: create a dictionary file from a fasta file
|
||||
keywords:
|
||||
- dictionary
|
||||
tools:
|
||||
- gatk:
|
||||
description: |
|
||||
The GATK toolkit offers a wide variety of tools with a primary focus on variant discovery and genotyping, developed in the Data Sciences Platform at the Broad Institute.
|
||||
homepage: https://gatk.broadinstitute.org/hc/en-us
|
||||
documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s
|
||||
doi: 10.1158/1538-7445.AM2017-3590
|
||||
input:
|
||||
-
|
||||
- input:
|
||||
type: file
|
||||
description: Input fasta file
|
||||
pattern: *.{fasta,fa}
|
||||
output:
|
||||
-
|
||||
- dict:
|
||||
type: file
|
||||
description: gatk dictionary file
|
||||
pattern: *.{fasta,fa}.{dict}
|
||||
authors:
|
||||
- @maxulysse
|
13
tools/gatk/dict/test/main.nf
Normal file
13
tools/gatk/dict/test/main.nf
Normal 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 {
|
||||
gatk_dict(input)
|
||||
// .check_output()
|
||||
}
|
2
tools/gatk/dict/test/nextflow.config
Normal file
2
tools/gatk/dict/test/nextflow.config
Normal file
|
@ -0,0 +1,2 @@
|
|||
docker.enabled = true
|
||||
params.outdir = './results'
|
16
tools/htslib/tabix/main.nf
Normal file
16
tools/htslib/tabix/main.nf
Normal file
|
@ -0,0 +1,16 @@
|
|||
process htslib_tabix {
|
||||
tag {vcf}
|
||||
|
||||
container 'quay.io/biocontainers/tabix:0.2.6--ha92aebf_0'
|
||||
|
||||
input:
|
||||
path(vcf)
|
||||
|
||||
output:
|
||||
path("${vcf}.tbi")
|
||||
|
||||
script:
|
||||
"""
|
||||
tabix -p vcf ${vcf}
|
||||
"""
|
||||
}
|
26
tools/htslib/tabix/meta.yml
Normal file
26
tools/htslib/tabix/meta.yml
Normal file
|
@ -0,0 +1,26 @@
|
|||
name: htslib tabix
|
||||
description: create tabix index from a bgzip vcf file
|
||||
keywords:
|
||||
- index
|
||||
- tabix
|
||||
tools:
|
||||
- bwa:
|
||||
description: |
|
||||
Generic indexer for TAB-delimited genome position files.
|
||||
homepage: https://www.htslib.org/
|
||||
documentation: https://www.htslib.org/doc/tabix.1.html
|
||||
doi: 10.1093/bioinformatics/btq671
|
||||
input:
|
||||
-
|
||||
- input:
|
||||
type: file
|
||||
description: Input vcf.gz file
|
||||
pattern: *.{vcf.gz}
|
||||
output:
|
||||
-
|
||||
- index:
|
||||
type: file
|
||||
description: tabix index file
|
||||
pattern: *.{vcf.gz.tbi}
|
||||
authors:
|
||||
- @maxulysse
|
13
tools/htslib/tabix/test/main.nf
Normal file
13
tools/htslib/tabix/test/main.nf
Normal 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/file.vcf.gz'
|
||||
|
||||
// Run the workflow
|
||||
workflow {
|
||||
tabix_index(ch_read_files)
|
||||
// .check_output()
|
||||
}
|
2
tools/htslib/tabix/test/nextflow.config
Normal file
2
tools/htslib/tabix/test/nextflow.config
Normal file
|
@ -0,0 +1,2 @@
|
|||
docker.enabled = true
|
||||
params.outdir = './results'
|
16
tools/samtools/faidx/main.nf
Normal file
16
tools/samtools/faidx/main.nf
Normal 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}
|
||||
"""
|
||||
}
|
27
tools/samtools/faidx/meta.yml
Normal file
27
tools/samtools/faidx/meta.yml
Normal 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
|
13
tools/samtools/faidx/test/main.nf
Normal file
13
tools/samtools/faidx/test/main.nf
Normal 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()
|
||||
}
|
2
tools/samtools/faidx/test/nextflow.config
Normal file
2
tools/samtools/faidx/test/nextflow.config
Normal file
|
@ -0,0 +1,2 @@
|
|||
docker.enabled = true
|
||||
params.outdir = './results'
|
|
@ -7,15 +7,14 @@ process samtools_index {
|
|||
path(bam)
|
||||
|
||||
output:
|
||||
path "*.sorted.bam"
|
||||
path "*.bai"
|
||||
|
||||
script:
|
||||
def suff_mem = ("${(task.memory.toBytes() - 6000000000) / task.cpus}" > 2000000000) ? 'true' : 'false'
|
||||
def avail_mem = (task.memory && suff_mem) ? "-m" + "${(task.memory.toBytes() - 6000000000) / task.cpus}" : ''
|
||||
"""
|
||||
samtools sort $bam \\
|
||||
-@ ${task.cpus} ${avail_mem} \\
|
||||
-o ${bam.baseName}.sorted.bam
|
||||
samtools index $bam \\
|
||||
-@ ${task.cpus} ${avail_mem}
|
||||
|
||||
samtools --version &> v_samtools.txt
|
||||
"""
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name: samtools sort
|
||||
description: Sort a BAM or CRAM file
|
||||
name: samtools index
|
||||
description: index a BAM or CRAM file
|
||||
keywords:
|
||||
- sort
|
||||
- index
|
||||
tools:
|
||||
- samtools:
|
||||
description: |
|
||||
|
|
Loading…
Reference in a new issue