-
Notifications
You must be signed in to change notification settings - Fork 752
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into main
- Loading branch information
Showing
7 changed files
with
164 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
process SHASTA { | ||
tag "$meta.id" | ||
label 'process_medium' | ||
|
||
conda (params.enable_conda ? "bioconda::shasta=0.8.0" : null) | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/shasta:0.8.0--h7d875b9_0': | ||
'quay.io/biocontainers/shasta:0.8.0--h7d875b9_0' }" | ||
|
||
input: | ||
tuple val(meta), path(reads) | ||
|
||
output: | ||
tuple val(meta), path("*_Assembly.fasta.gz"), emit: assembly | ||
tuple val(meta), path("*_Assembly.gfa.gz") , emit: gfa | ||
tuple val(meta), path("ShastaRun/") , emit: results | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
def model = "${meta.model}" ?: 'Nanopore-Oct2021' | ||
""" | ||
# shasta requires uncompressed | ||
zcat -f $reads > reads.fq | ||
# run shasta | ||
shasta \\ | ||
--input reads.fq \\ | ||
--config $model \\ | ||
$args \\ | ||
--threads $task.cpus | ||
# compress results | ||
gzip -c ShastaRun/Assembly.fasta > ${prefix}_Assembly.fasta.gz | ||
gzip -c ShastaRun/Assembly.gfa > ${prefix}_Assembly.gfa.gz | ||
# cleanup temp files | ||
rm reads.fq | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
shasta: \$(shasta --version | head -n 1 | cut -f 3 -d " ") | ||
END_VERSIONS | ||
""" | ||
} |
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,52 @@ | ||
name: shasta | ||
description: The goal of the Shasta long read assembler is to rapidly produce accurate assembled sequence using DNA reads generated by Oxford Nanopore flow cells as input. Please note Assembler is design to focus on speed, so assembly may be considered somewhat non-deterministic as final assembly may vary across executions. See https://github.com/chanzuckerberg/shasta/issues/296. | ||
keywords: | ||
- nanopore | ||
- de-novo | ||
- assembly | ||
- longread | ||
tools: | ||
- shasta: | ||
description: Rapidly produce accurate assembled sequence using as input DNA reads generated by Oxford Nanopore flow cells. | ||
homepage: https://chanzuckerberg.github.io/shasta/index.html | ||
documentation: https://chanzuckerberg.github.io/shasta/index.html | ||
tool_dev_url: https://github.com/chanzuckerberg/shasta | ||
doi: "https://doi.org/10.1038/s41587-020-0503-6" | ||
licence: ["MIT"] | ||
|
||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test', single_end:false ] | ||
- reads: | ||
type: file | ||
description: Input file in FASTQ format. | ||
pattern: "*.{fastq,fastq.gz,fq,fq.gz}" | ||
|
||
output: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test', single_end:false ] | ||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
- assembly: | ||
type: file | ||
description: Assembled FASTA file | ||
pattern: "${prefix}_Assembly.fasta.gz" | ||
- gfa: | ||
type: file | ||
description: Repeat graph | ||
pattern: "${prefix}_Assembly.gfa.gz" | ||
- results: | ||
type: dir | ||
description: Resulting assembly directory | ||
pattern: "ShastaRun" | ||
|
||
authors: | ||
- "@fmalmeida" |
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,15 @@ | ||
#!/usr/bin/env nextflow | ||
|
||
nextflow.enable.dsl = 2 | ||
|
||
include { SHASTA } from '../../../modules/shasta/main.nf' | ||
|
||
workflow test_shasta { | ||
|
||
input = [ | ||
[ id:'test', model:'Nanopore-Dec2019' ], // meta map | ||
[ file(params.test_data['candidatus_portiera_aleyrodidarum']['nanopore']['test_fastq_gz']) ], | ||
] | ||
|
||
SHASTA ( input ) | ||
} |
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,7 @@ | ||
process { | ||
|
||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } | ||
|
||
ext.args = '--Reads.minReadLength 100' | ||
|
||
} |
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,35 @@ | ||
- name: shasta test_shasta | ||
command: nextflow run ./tests/modules/shasta -entry test_shasta -c ./tests/config/nextflow.config -c ./tests/modules/shasta/nextflow.config | ||
tags: | ||
- shasta | ||
files: | ||
- path: output/shasta/ShastaRun/Assembly-BothStrands-NoSequence.gfa | ||
- path: output/shasta/ShastaRun/Assembly-BothStrands.gfa | ||
- path: output/shasta/ShastaRun/Assembly.fasta | ||
- path: output/shasta/ShastaRun/Assembly.gfa | ||
- path: output/shasta/ShastaRun/AssemblySummary.csv | ||
- path: output/shasta/ShastaRun/AssemblySummary.html | ||
- path: output/shasta/ShastaRun/AssemblySummary.json | ||
- path: output/shasta/ShastaRun/Binned-ReadLengthHistogram.csv | ||
md5sum: f7997650e6ff2b060c583c6fa796628e | ||
- path: output/shasta/ShastaRun/DisjointSetsHistogram.csv | ||
md5sum: eecb9fae34b719dad64952257e2398a6 | ||
- path: output/shasta/ShastaRun/LowHashBucketHistogram.csv | ||
md5sum: e5eb4a0d28ade913de6584928f32b7aa | ||
- path: output/shasta/ShastaRun/MarkerGraphEdgeCoverageHistogram.csv | ||
md5sum: 37ecac444067fbf4e0d96dc2705a9ada | ||
- path: output/shasta/ShastaRun/MarkerGraphVertexCoverageHistogram.csv | ||
md5sum: ccb236ab97ab1b9964b4856aa47d3c94 | ||
- path: output/shasta/ShastaRun/ReadGraphComponents.csv | ||
- path: output/shasta/ShastaRun/ReadLengthHistogram.csv | ||
md5sum: ccb25c4850ba2682fd1d452d6596d7bc | ||
- path: output/shasta/ShastaRun/ReadLowHashStatistics.csv | ||
md5sum: 2431d47341b239cb6edf8e3a7a76021f | ||
- path: output/shasta/ShastaRun/ReadSummary.csv | ||
md5sum: 8e0bffccf7afae54a937266949d118af | ||
- path: output/shasta/ShastaRun/index.html | ||
md5sum: 2d067ccc873b94a73e7300fe597db135 | ||
- path: output/shasta/ShastaRun/shasta.conf | ||
md5sum: cba4aebac8a74eb5868f4a20f04bc618 | ||
- path: output/shasta/test_Assembly.fasta.gz | ||
- path: output/shasta/test_Assembly.gfa.gz |