Repository navigation
Macs gsize docs validation - #548
Conversation
|
…o keep it consistent with igenomes
JoseEspinosa
left a comment
There was a problem hiding this comment.
I have a question, otherwise great job!
| def getMacsGsize(params) { | ||
| def val = null | ||
| if (params.genomes && params.genome && params.genomes.containsKey(params.genome)) { | ||
| if (params.macs_gsize) { |
There was a problem hiding this comment.
@JoseEspinosa after opening the PR, I realized that the pipeline actually never uses params.macs_gsize as a fall back, as suggested in the error message and the usage.
I added it now. I hope this solution is fine?
Also initialized macs_gsize in the nextflow.config.
There was a problem hiding this comment.
If I remember well @Kevin-Brockers, it was not initialize since otherwise, the parameter was not overwritten by the function that reads the predefined values, maybe in recent nextflow versions this behavior have changed, but worth checking
There was a problem hiding this comment.
I think this changed with the newer nextflow versions.
Before this PR, params.macs_gsize is assigned by getMacsGsize(), therefore params.macs_gsize is always reassigned and --macs_gsize from the cli is never used in the pipeline.
I tested this behavior locally, I don't know how to write a nf-test for this.
Not sure if the params.macs_gsize = getMacsGsize() is an ideal pattern (reassigning params on the fly), I would be in favor of declaring a new variable instead but didn't want to make to many changes.
|
What might be worth discussing is whether to let the user specify The behavior could be:
I can ask on slack what user think? Setting a random |
Yes, I agree it could be dangerous, but it is something that can not be done by mistake, so the user is on full control of it.
I don't think this was the case, the thing is that nextflow does not overwrite this value when it is provided by the CLI or in the config file and the |
PR checklist
Closes #478.
Claude and I tried to clarify the usage of
macs_gsize.Changed behavior ->
--macs_gsizeis provided, this value is always used. It can be given as an integer, e.g.--macs_gsize 2805665311.--genomeand--read_lengthare provided and pre-computedmacs_gsizeforigenomes.configexist it will be used.Some commonly used genomes contain pre-computed
macs_gsizewith different read length (50,75,100,150and200).--read_lengthis the only value provided for e.g. custom genomes (--fasta), thenmacs_gsizeis calculated from the genome FASTA withkhmer unique-kmers.py.This should fix the bug described in #478.
nf-core lint).nextflow run . -profile test,docker --outdir <OUTDIR>).nextflow run . -profile debug,test,docker --outdir <OUTDIR>).docs/usage.mdis updated.docs/output.mdis updated.CHANGELOG.mdis updated.README.mdis updated (including new tool citations and authors/contributors).