-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: link to CCBR/nf-modules & include example
resolves #25
- Loading branch information
1 parent
2937e1f
commit e95ed5e
Showing
5 changed files
with
125 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
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,17 @@ | ||
{ | ||
"name": "CCBR/TOOL_NAME", | ||
"homePage": "https://github.com/CCBR/TOOL_NAME", | ||
"repos": { | ||
"https://github.com/CCBR/nf-modules": { | ||
"modules": { | ||
"CCBR": { | ||
"bwa/mem": { | ||
"branch": "main", | ||
"git_sha": "490e4454c81e3fb852f7f964356f9981b6f1c439", | ||
"installed_by": ["modules"] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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,53 @@ | ||
process BWA_MEM { | ||
tag { meta.id } | ||
label 'process_high' | ||
|
||
container 'nciccbr/ccbr_ubuntu_base_20.04:v5' | ||
|
||
input: | ||
tuple val(meta), path(fastq) | ||
tuple val(meta_idx), path(index_files) | ||
|
||
output: | ||
tuple val(meta), path("*.bam"), path("*.bai"), emit: bam | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
""" | ||
# current working directory is a tmpdir when 'scratch' is set | ||
TMP=tmp/ | ||
mkdir \$TMP | ||
trap 'rm -rf "\$TMP"' EXIT | ||
INDEX=`find -L ./ -name "*.amb" | sed 's/\\.amb\$//'` | ||
bwa mem \\ | ||
-t ${task.cpus} \\ | ||
-o \$TMP/align.bam \\ | ||
\$INDEX \\ | ||
${fastq} | ||
samtools sort \\ | ||
-@ ${task.cpus} \\ | ||
-m 2G \\ | ||
-T \$TMP \\ | ||
--write-index \\ | ||
-o ${prefix}.bam##idx##${prefix}.bam.bai \\ | ||
\$TMP/align.bam | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
bwa: \$(echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') | ||
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
""" | ||
touch ${meta.id}.bam ${meta.id}.bam.bai versions.yml | ||
""" | ||
} |
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,51 @@ | ||
name: bwa_mem | ||
description: Performs fastq alignment to a fasta reference using BWA. Adapted from the nf-core bwa-mem module. | ||
keywords: | ||
- mem | ||
- bwa | ||
- alignment | ||
- map | ||
- fastq | ||
- bam | ||
- sam | ||
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 | ||
licence: ["GPL-3.0-or-later"] | ||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test', single_end:false ] | ||
- reads: | ||
type: file | ||
description: | | ||
List of input FastQ files of size 1 and 2 for single-end and paired-end data, | ||
respectively. | ||
- index: | ||
type: file | ||
description: BWA genome index files | ||
pattern: "Directory containing BWA index *.{amb,ann,bwt,pac,sa}" | ||
output: | ||
- bam: | ||
type: file | ||
description: Output BAM file containing read alignments | ||
pattern: "*.{bam}" | ||
- bai: | ||
type: file | ||
description: Output BAI index file | ||
pattern: "*.{bai}" | ||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
authors: | ||
- "@kelly-sovacool" | ||
maintainers: | ||
- "@kelly-sovacool" |