-
Notifications
You must be signed in to change notification settings - Fork 1
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
Allow use of a custom config file #29
Conversation
I seem to be stuck where this works for a custom config file when This fails
But this passes
|
subworkflows/run_histoqc.nf
Outdated
if (params.convert) { | ||
CONVERT( images ) | ||
HISTOQC( CONVERT.out, config_ch ) | ||
} | ||
else { | ||
HISTOQC ( images, config_ch ) | ||
} |
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 error seems to suggest some behavioral difference between how config_ch
is passed to HISTOQC
on each side of this if/else statement.
There seems to be no tangible difference in how the For
for
|
From the command run there is also no tangible difference between if converted or not. when
We have the following command executed
When convert is not set we have
command.sh:
|
Also important to getting to the bottom of it is that the error is actually thrown by HistoQC itself. There is some internal logic (lines and python script mentioned in error) where it decides if the value passed to its -c argument is a path or the name of a built in config file. |
Linked Jira ticket MC2DPQC-53 |
Here is where HistoQC attempts to read the config file
|
So for some reason it seems to think that the path passed to When it fails the
|
I think that these fixes get us working. config only
config and convert:
custom config only
custom config and convert
|
@adamjtaylor I was able to reproduce your successful runs on my local machine using the config file you provided in the Jira ticket. The changes look good! |
Thanks @BWMac! Remaining action on me is to update the README. |
HistoQC uses configs to determine which modules are run (eg pen markings, blurry areas, fill small holes etc).
Natively HistoQC's config allows the user to pass either a string matching the name of a built-in config file (eg
first
orv2.1
) or the path to a custom config file (egfolder/my_custom_config.ini
).To enable the use of custom configs in nf-histoqc we need to add some logic to pass a file if a custom config is used or the string if a default config is used.
I thought it best to split this into a new param
custom_config
that overrides the paramconfig
if provided.It is clunky but there is then logic in both the subworkflow
run_histoqc.nf
and the modulehistoqc.nf
to check which param is being used and to appropriately stage the custom config file.