Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take parameters for setDadaOpt from the command line #21

Merged
merged 3 commits into from
Jul 8, 2021

Conversation

wbazant
Copy link
Contributor

@wbazant wbazant commented Jun 30, 2021

This change allows running the pipeline on 454 data, issue #6.

I've tested the whole pipeline by:

  • running a small test run on the current version
  • running the same run on the changed version and verifying errorsF.RDS and seqtab_original.RDS are the same
  • specifying slightly different alignment parameters (--dadaOpt.GAP_PENALTY -10 \ etc.) and verifying errorsF.RDS and seqtab_original.RDS have slightly changed

For the mad optparse + eval line added to R scripts, I've checked that the following program works:

#!/usr/bin/env Rscript
suppressPackageStartupMessages(library(dada2))
suppressPackageStartupMessages(library(optparse))
option_list = list(
    make_option(c("--dadaOptStr"), type="character", default='', help="values for setDadaOpt passed as one string")
)
opt <- parse_args(OptionParser(option_list=option_list))
eval(parse(text=paste0("setDadaOpt(", opt$dadaOptStr, ")")))
getDadaOpt()

```
perl -i -pe 's{uct-cbio/16S-rDNA-dada2-pipeline}{h3abionet/TADA}g'
```
params.dadaOpt can be specified as a dictionary in a config
or as --dadaOpt.XXX VALUE
( providing nested scope params from command line requires Nextflow 20.11.0)

The params are passed to scripts where learnErrors() or dada() are called.

A default dadaOpt = [] removes a startup warning. Deprecate a similar dadaParams in pacbio.nf
@cjfields
Copy link
Contributor

Hi @wbazant I will merge this into a branch for now to work around some issues with pull requests failing CI (unrelated to this specific request; seems to be happening to all prior submitted requests as well).

@cjfields cjfields merged commit 8ce748e into h3abionet:master Jul 8, 2021
@cjfields
Copy link
Contributor

cjfields commented Jul 8, 2021

Thanks @wbazant ! I'll also add you to the contributing/authors list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants