Skip to content

Commit

Permalink
Merge pull request #38 from nf-core/iss-multifasta
Browse files Browse the repository at this point in the history
Added option for using draft genomes with insilicoseq
  • Loading branch information
a4000 authored Mar 20, 2024
2 parents cb84711 + ed43715 commit 7c807dd
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</h1>

[![GitHub Actions CI Status](https://github.com/nf-core/readsimulator/actions/workflows/ci.yml/badge.svg)](https://github.com/nf-core/readsimulator/actions/workflows/ci.yml)
[![GitHub Actions Linting Status](https://github.com/nf-core/readsimulator/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-core/readsimulator/actions/workflows/linting.yml)[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/readsimulator/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)
[![GitHub Actions Linting Status](https://github.com/nf-core/readsimulator/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-core/readsimulator/actions/workflows/linting.yml)[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/readsimulator/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.10622410-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.10622410)
[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)

[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A523.04.0-23aa62.svg)](https://www.nextflow.io/)
Expand Down Expand Up @@ -113,8 +113,7 @@ For further information or help, don't hesitate to get in touch on the [Slack `#

## Citations

<!-- TODO nf-core: Add citation for pipeline after first release. Uncomment lines below and update Zenodo doi and badge at the top of this file. -->
<!-- If you use nf-core/readsimulator for your analysis, please cite it using the following doi: [10.5281/zenodo.XXXXXX](https://doi.org/10.5281/zenodo.XXXXXX) -->
If you use nf-core/readsimulator for your analysis, please cite it using the following doi: [10.5281/zenodo.10622410](https://doi.org/10.5281/zenodo.10622410)

<!-- TODO nf-core: Add bibliography of tools and data used in your pipeline -->

Expand Down
4 changes: 3 additions & 1 deletion modules/local/insilicoseq/generate/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ process INSILICOSEQ_GENERATE {

input:
tuple val(meta), path(fasta)
val(input_format)

output:
tuple val(meta), path("*.fastq.gz*"), emit: fastq
Expand All @@ -22,6 +23,7 @@ process INSILICOSEQ_GENERATE {
def args2 = task.ext.args2 ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def seed = task.ext.seed ?: "${meta.seed}"
def input_format = input_format == "genomes" ? "--genomes": "--draft"
if (fasta) {
def is_compressed = fasta.name.endsWith(".gz")
def fasta_name = fasta.name.replace(".gz", "")
Expand All @@ -34,7 +36,7 @@ process INSILICOSEQ_GENERATE {
fi
iss generate \\
--genomes ${fasta_name} \\
${input_format} ${fasta_name} \\
--seed \$seed \\
--output \$prefix \\
--compress \\
Expand Down
3 changes: 2 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ params {
metagenome_abundance_file = null
metagenome_coverage = null
metagenome_coverage_file = null
metagenome_input_format = 'genomes'
metagenome_n_reads = '1M'
metagenome_mode = 'kde'
metagenome_model = 'MiSeq'
Expand Down Expand Up @@ -290,7 +291,7 @@ manifest {
mainScript = 'main.nf'
nextflowVersion = '!>=23.04.0'
version = '1.0.0'
doi = ''
doi = '10.5281/zenodo.10622410'
}

// Load modules.config for DSL2 module specific options
Expand Down
11 changes: 9 additions & 2 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
},
"target_capture_fshape": {
"type": "number",
"default": 6.0,
"default": 6,
"description": "Shape parameter of the fragment size distribution."
},
"target_capture_smedian": {
Expand All @@ -168,7 +168,7 @@
},
"target_capture_sshape": {
"type": "number",
"default": 6.0,
"default": 6,
"description": "Shape parameter of the fragment size distribution."
},
"target_capture_tmedian": {
Expand Down Expand Up @@ -240,6 +240,13 @@
"description": "Path to tab-separated file containing coverage information.",
"help_text": "The first column should contain the genome and the second column should contain the coverage (e.g., use the value 20 for a coverage of 20X)."
},
"metagenome_input_format": {
"type": "string",
"default": "genomes",
"description": "Format of FASTA file used to generate reads",
"help_text": "If complete genomes are used (i.e. 1 sequence per genome FASTA) choose 'genomes'; if draft genomes are used (i.e. multiple sequences per genome FASTA) choose 'draft'",
"enum": ["genomes", "draft"]
},
"metagenome_n_reads": {
"type": "string",
"default": "1M",
Expand Down

0 comments on commit 7c807dd

Please sign in to comment.