Configure MultiQC after import so megaqc upload works without multiqc_config.yaml
I have MegaQC running in a docker container, since I find it easier to get the right environment, and manage data in that form. However, I would then like to upload my MultiQC data to that docker container, but MegaQC always gives me a "Database path" which is on my local machine, and there doesn't seem to be a way to customize the DB it connects to.
Are you using the Dockerfile from the repo or did you make your own? If using the one from the repo, it includes its own postgres install. All you should need to use that is set megaqc_url and megaqc_access_token with the appropriate values in the MultiQC config. Some additional info on setting up MegaQC in docker is available here: https://github.com/ewels/MegaQC/blob/master/docs/installation-docker.md
If that doesn't work, or you would prefer an external database, you can create a MegaQC config with the connection info and include that in the docker container. It should be in YAML format and specified with the environment variable MEGAQC_CONFIG. This config is loaded after the default config, so you only need to put the values that you're changing. For database configuration, you'll want these: https://github.com/ewels/MegaQC/blob/master/megaqc/settings.py#L30-L34
Right now, only sqlite and postgres are officially supported. There were some kinks with mysql when someone tried that not too long ago, but if that's your db of choice the odds are good it's a fairly simple fix and PRs are of course welcome. :smiley:
I'm using the dockerhub container, and that is working fine, my issue is communicating with the web application from outside the container, in order to upload MultiQC results. I don't have any issue with the MegaQC application communicating with the database.
However megaqc_url sounds like what I'm looking for. Is that documented anywhere?
Actually it can't be anything on the MultiQC side, because I don't intend to run MultiQC again, I just want to upload some existing MultiQC results to a custom server host.
Hmm, it could be that you still need to configure MultiQC even when uploading using MegaQC, as it just imports the MultiQC functions. Not sure I’ve tried without.
If you’re logged in to MegaQC, click the nav drop down top right to get to a page with the MultiQC config file that you can just copy and save.
Phil
Okay, that seems to be the case. You need to configure multiQC before you can use megaqc upload.
This could definitely be improved: add MultiQC as an installation dependency (already the case?) and configure after the import if not already known.