PHG ImputePipelinePlugin `liquibaseDir` and `skipLiquibaseCheck` hardcoded variables only?
1
0
Entering edit mode
4.2 years ago
dovi ▴ 60

Hi everyone,

I was reading the ImputePipelinePlugin.kt file from https://bitbucket.org/bucklerlab/practicalhaplotypegraph/src/master/src/main/kotlin/net/maizegenetics/pangenome/pipeline/ImputePipelinePlugin.kt

There is one step (~ line 123) to check if liquibase is available, however it searches for a hardcoded path var liquibaseDir = "/liquibase/changelogs", I wonder if is there any possibility to set this variable as an input parameter in the configuration file. Moreover, there is another parameter, called val skipLiquibaseCheck = false which is also hardcoded (line 124 of ImputePipelinePlugin.kt file), setting this to true would skip the error if not finding the liquibaseDir.

I wonder why are they hardcoded and if is there any possibility to overwrite them.

Thanks!

phg • 1.1k views
ADD COMMENT
4
Entering edit mode
4.2 years ago
lcj34 ▴ 420

Regarding the liquibaseDir: This is hardcoded to where liquiBase lives in the docker. If a user is running outside of the docker, they will probably want to skip the liquiBase update as that code expects specific directories.

in terms of the skipLiquibaseCheck value, you are correct - the code should be checking the value of the plugin parameter. I will make a note to change that.

ADD COMMENT
0
Entering edit mode

This actually caused me a lot of issues as I was following the steps through imputation. I initially updated the existing PHG database with liquibase prior to starting on imputing variants. This is what I got prior to updating the skipLiquibaseCheck to true:

[pool-1-thread-1] INFO net.maizegenetics.pangenome.liquibase.CheckDBVersionPlugin - queueHaplotypeNodesByRange: query: select name FROM sqlite_master where type='table' and name='variants';
[pool-1-thread-1] INFO net.maizegenetics.plugindef.AbstractPlugin - Finished net.maizegenetics.pangenome.liquibase.CheckDBVersionPlugin: time: Apr 2, 2021 17:07:27
[pool-1-thread-1] INFO net.maizegenetics.plugindef.AbstractPlugin - net.maizegenetics.pangenome.liquibase.CheckDBVersionPlugin  Citation: Bradbury PJ, Zhang Z, Kroon DE, Casstevens TM, Ramdoss Y, Buckler ES. (2007) $
[pool-1-thread-1] INFO net.maizegenetics.plugindef.AbstractPlugin - Starting net.maizegenetics.pangenome.liquibase.LiquibaseUpdatePlugin: time: Apr 2, 2021 17:07:27
[pool-1-thread-1] INFO net.maizegenetics.plugindef.AbstractPlugin -
LiquibaseUpdatePlugin Parameters
outputDir: /tempFileDir/outputDir
command: status

[pool-1-thread-1] INFO net.maizegenetics.pangenome.liquibase.LiquibaseUpdatePlugin - Please wait, begin Command:liquibase --driver=org.sqlite.JDBC --url=jdbc:sqlite:/tempFileDir/outputDir/attempt2_phg_db_name.db --u$
[pool-1-thread-1] ERROR net.maizegenetics.pangenome.liquibase.LiquibaseUpdatePlugin - liquibase run via ProcessBuilder returned error code 1
[pool-1-thread-1] INFO net.maizegenetics.plugindef.AbstractPlugin - Finished net.maizegenetics.pangenome.liquibase.LiquibaseUpdatePlugin: time: Apr 2, 2021 17:07:27
[pool-1-thread-1] DEBUG net.maizegenetics.plugindef.AbstractPlugin - ERROR!! - liquibase status command encountered an error.  See file /tempFileDir/outputDir/liquibase_status_error.log for details.
java.lang.IllegalStateException: ERROR!! - liquibase status command encountered an error.  See file /tempFileDir/outputDir/liquibase_status_error.log for details.
        at net.maizegenetics.pangenome.pipeline.PipelineUtilsKt.runLiquibaseCommand(PipelineUtils.kt:75)
        at net.maizegenetics.pangenome.pipeline.ImputePipelinePlugin.processData(ImputePipelinePlugin.kt:140)
        at net.maizegenetics.plugindef.AbstractPlugin.performFunction(AbstractPlugin.java:111)
        at net.maizegenetics.plugindef.AbstractPlugin.dataSetReturned(AbstractPlugin.java:2017)
        at net.maizegenetics.plugindef.ThreadedPluginListener.run(ThreadedPluginListener.java:29)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
[pool-1-thread-1] INFO net.maizegenetics.plugindef.AbstractPlugin -

Once I updated the skipLiquibaseCheck to true, it just worked. So, thank you guys!

ADD REPLY

Login before adding your answer.

Traffic: 1648 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6