-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add sans-UMI option #128
Add sans-UMI option #128
Conversation
Release 1.2.0
Release 2.0.0
…tered reads (but before collapsing duplicates)
…ultiple files to output_dir instead of only one when multiple sources exist
…hold to 0 and print warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @dladd thanks for this PR, it has some great additions to the pipeline!
Seeing the number of changes required to add the sans-umi option, I've tried to make such addition a bit easier adding a presto_UMI sub-workflow (and maybe a bit easier to follow in the code for other people). Check out the #130 PR. Let me know what you think there, if that would make it easier to incorporate your changes with less if/else, also providing a subworkflow presto_sans_UMI (or sth similar), and maybe also for other people to add further pRESTO pre-processing subworkflows.
Co-authored-by: Gisela Gabernet <[email protected]>
Co-authored-by: Gisela Gabernet <[email protected]>
Co-authored-by: Gisela Gabernet <[email protected]>
Co-authored-by: Gisela Gabernet <[email protected]>
…res in user-defined sample names, remove unused tools in no-umi mode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @dladd ,
it's looking great, thanks for the sans-umi
addition! I just have a couple of comments, but otherwise looks good.
So the nf-core CI
tests also pass, one can add the - assets/multiqc_config.yaml
to the list of files that need to be ignored for the linting test, as you added a FastQC module description. It should be below this line:
workflows/bcellmagic.nf
Outdated
@@ -46,7 +46,7 @@ if (params.protocol == "pcr_umi"){ | |||
|
|||
// Validate UMI position | |||
if (params.index_file & params.umi_position == 'R2') {exit 1, "Please do not set `--umi_position` option if index file with UMIs is provided."} | |||
if (params.umi_length == 0) {exit 1, "Please provide the UMI barcode length in the option `--umi_length`."} | |||
if (params.umi_length == null) {exit 1, "Please provide the UMI barcode length in the option `--umi_length`. To run without UMIs, set umi_length to 0."} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (params.umi_length == null) {exit 1, "Please provide the UMI barcode length in the option `--umi_length`. To run without UMIs, set umi_length to 0."} | |
if (!params.umi_length) {exit 1, "Please provide the UMI barcode length in the option `--umi_length`. To run without UMIs, set umi_length to 0."} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've swapped this back to check for params.umi_length == null
. Apparently in groovy !0 == true
so running a no-UMI pipeline would otherwise always trigger the exit condition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm it doesn't look like the linting likes us defining an integer param with null
as the default in the schema. I've set default umi_length = -1
as a workaround but let me know if you have a different preferred solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok weird, I've tested it in the nextflow console (nextflow console
) and it was interpreted as false
:
def foo = null
var= "hello"
if (!foo) {
print var
}
But yes you are right, the schema does not like an integer defined by default as null
. The proposed -1
solution sounds good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue was that with no-UMI, we are defining foo = 0
, which is interpreted the same as foo = null
and triggers the exit. Cool will stick with the -1 default workaround :-)
conf/modules.config
Outdated
'presto_parseheaders_collapse_sans_umi' { | ||
publish_dir = false | ||
subcommand = 'collapse' | ||
args = '-f CONSCOUNT --act min' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this here, as far as I understand it the CONSCOUNT
value is the count of sequences having the same UMI barcode use to build a consensus. So without UMIs you should actually not have this field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! This was a vestigial step that snuck under my radar. Removed in d8dc9d0
Co-authored-by: Gisela Gabernet <[email protected]>
Co-authored-by: Gisela Gabernet <[email protected]>
Co-authored-by: Gisela Gabernet <[email protected]>
Co-authored-by: Gisela Gabernet <[email protected]>
Co-authored-by: Gisela Gabernet <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should really fix the lint tests now :)
Co-authored-by: Gisela Gabernet <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't see those two extra lines 🙄 , these should be removed as well 👍
|
…ated test bug. The umi_length > 0 check in the pipeline and -1 default should cover this; update changelog
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR looks good to me, thanks a lot for your contribution!
Co-authored-by: Gisela Gabernet <[email protected]>
Addresses issue #127
PR checklist
params.umi_length = 0
. Will be-1
by default to remind users to set this value when running the pipelineprimer_revpr
nf-core lint .
).nextflow run . -profile test,docker
).docs/usage.md
is updated.docs/output.md
is updated.CHANGELOG.md
is updated.README.md
is updated (including new tool citations and authors/contributors).