Skip to content

Commit

Permalink
Merge branch 'release-2.12.x' into TASK-5693
Browse files Browse the repository at this point in the history
  • Loading branch information
imedina committed Apr 1, 2024
2 parents 69a8809 + a120256 commit 1125efa
Show file tree
Hide file tree
Showing 32 changed files with 390 additions and 419 deletions.
8 changes: 7 additions & 1 deletion docker/docker-build.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
parser.add_argument('--images', help="comma separated list of images to be made, e.g. app", default="app")
parser.add_argument('--tag', help="the tag for this code, e.g. v2.0.0")
parser.add_argument('--build-folder', help="the location of the build folder, if not default location")
parser.add_argument('--platform', help="specify the target platform for the build image, e.g. 'linux/amd64'", default="linux/amd64")
parser.add_argument('--username', help="credentials for dockerhub (REQUIRED if deleting from DockerHub)")
parser.add_argument('--password', help="credentials for dockerhub (REQUIRED if deleting from DockerHub)")

Expand Down Expand Up @@ -81,7 +82,7 @@ def build():
site = "build/custom-sites" + "/" + image

print(shell_colors['blue'] + "Building " + organisation + "/iva-" + image + ":" + tag + " ..." + shell_colors['reset'])
run("docker build -t " + organisation + "/iva-" + image + ":" + tag + " --build-arg SITE=" + site + " -f " + build_folder + "/docker/iva-app/Dockerfile " + build_folder)
run("docker build --platform " + platform + " -t " + organisation + "/iva-" + image + ":" + tag + " --build-arg SITE=" + site + " -f " + build_folder + "/docker/iva-app/Dockerfile " + build_folder)

def tag_latest(image):
latest_tag = os.popen(("curl -s https://registry.hub.docker.com/v1/repositories/" + organisation + "/iva-" + image + "/tags"
Expand Down Expand Up @@ -163,6 +164,11 @@ def delete():
else:
images = args.images.split(",")

# 5. init platform: set platform to default value if not set
if args.platform is not None:
platform = args.platform
else:
platform = "linux/amd64"

## Execute the action
if args.action == "build":
Expand Down
2 changes: 1 addition & 1 deletion src/sites/iva/conf/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const hosts = [
url: "https://ws.opencb.org/opencga-prod"
},
{
id: "test",
id: "test1",
url: "https://demo.app.zettagenomics.com/opencga"
},
{
Expand Down
10 changes: 5 additions & 5 deletions src/sites/iva/iva-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1839,7 +1839,7 @@ class IvaApp extends LitElement {
<div class="content col-md-8 col-md-offset-2" id="inferred-sex-analysis">
<inferred-sex-analysis
.opencgaSession="${this.opencgaSession}"
.title="">
.config=${{title: ""}}>
</inferred-sex-analysis>
</div>
` : null}
Expand All @@ -1848,7 +1848,7 @@ class IvaApp extends LitElement {
<div class="content col-md-8 col-md-offset-2" id="individual-relatedness-analysis">
<individual-relatedness-analysis
.opencgaSession="${this.opencgaSession}"
.title="">
.config=${{title: ""}}>
</individual-relatedness-analysis>
</div>
` : null}
Expand All @@ -1863,7 +1863,7 @@ class IvaApp extends LitElement {
<div class="content col-md-8 col-md-offset-2" id="sample-qc-analysis">
<sample-qc-analysis
.opencgaSession="${this.opencgaSession}"
.title="">
.config=${{title: ""}}>
</sample-qc-analysis>
</div>
` : null}
Expand All @@ -1872,7 +1872,7 @@ class IvaApp extends LitElement {
<div class="content col-md-8 col-md-offset-2" id="individual-qc-analysis">
<individual-qc-analysis
.opencgaSession="${this.opencgaSession}"
.title="">
.config=${{title: ""}}>
</individual-qc-analysis>
</div>
` : null}
Expand All @@ -1881,7 +1881,7 @@ class IvaApp extends LitElement {
<div class="content col-md-8 col-md-offset-2" id="family-qc-analysis">
<family-qc-analysis
.opencgaSession="${this.opencgaSession}"
.title="">
.config=${{title: ""}}>
</family-qc-analysis>
</div>
` : null}
Expand Down
22 changes: 11 additions & 11 deletions src/webcomponents/clinical/analysis/exomiser-analysis.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

import {LitElement, html} from "lit";
import FormUtils from "../../commons/forms/form-utils";
import AnalysisUtils from "../../commons/analysis/analysis-utils.js";
import UtilsNew from "../../../core/utils-new.js";
import "../../commons/forms/data-form.js";
Expand All @@ -40,16 +39,16 @@ export default class ExomiserAnalysis extends LitElement {
opencgaSession: {
type: Object
},
title: {
type: String
config: {
type: Object
},
};
}

#init() {
this.TOOL = "interpreter-exomiser";
this.TITLE = "Interpreter Exomiser";
this.DESCRIPTION = "Executes an Exomiser Interpretation analysis";
this.ANALYSIS_TOOL = "interpreter-exomiser";
this.ANALYSIS_TITLE = "Interpreter Exomiser";
this.ANALYSIS_DESCRIPTION = "Executes an Exomiser Interpretation analysis";

this.DEFAULT_TOOLPARAMS = {};
// Make a deep copy to avoid modifying default object.
Expand Down Expand Up @@ -130,10 +129,10 @@ export default class ExomiserAnalysis extends LitElement {
};
const params = {
study: this.opencgaSession.study.fqn,
...AnalysisUtils.fillJobParams(this.toolParams, this.TOOL),
...AnalysisUtils.fillJobParams(this.toolParams, this.ANALYSIS_TOOL),
};
AnalysisUtils.submit(
this.TITLE,
this.ANALYSIS_TITLE,
this.opencgaSession.opencgaClient.clinical()
.runInterpreterExomiser(toolParams, params),
this,
Expand Down Expand Up @@ -189,11 +188,12 @@ export default class ExomiserAnalysis extends LitElement {
];

return AnalysisUtils.getAnalysisConfiguration(
this.TOOL,
this.title ?? this.TITLE,
this.DESCRIPTION,
this.ANALYSIS_TOOL,
this.ANALYSIS_TITLE,
this.ANALYSIS_DESCRIPTION,
params,
this.check(),
this.config
);
}

Expand Down
11 changes: 6 additions & 5 deletions src/webcomponents/clinical/analysis/hrdetect-analysis.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ export default class HRDetectAnalysis extends LitElement {
opencgaSession: {
type: Object
},
title: {
type: String
},
active: {
type: Boolean,
},
config: {
type: Object
},
};
}

Expand Down Expand Up @@ -339,10 +339,11 @@ export default class HRDetectAnalysis extends LitElement {

return AnalysisUtils.getAnalysisConfiguration(
this.ANALYSIS_TOOL,
this.title ?? this.ANALYSIS_TITLE,
this.ANALYSIS_TITLE,
this.ANALYSIS_DESCRIPTION,
params,
this.check()
this.check(),
this.config
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ export default class MutationalSignatureAnalysis extends LitElement {
opencgaSession: {
type: Object
},
title: {
type: String
},
active: {
type: Boolean,
},
config: {
type: Object
},
};
}

Expand Down Expand Up @@ -451,10 +451,11 @@ export default class MutationalSignatureAnalysis extends LitElement {

return AnalysisUtils.getAnalysisConfiguration(
this.ANALYSIS_TOOL,
this.title ?? this.ANALYSIS_TITLE,
this.ANALYSIS_TITLE,
this.ANALYSIS_DESCRIPTION,
params,
this.check(),
this.config
);
}

Expand Down
23 changes: 12 additions & 11 deletions src/webcomponents/clinical/analysis/rd-tiering-analysis.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ export default class RdTieringAnalysis extends LitElement {
opencgaSession: {
type: Object,
},
title: {
type: String
config: {
type: Object
},
};
}

#init() {
this.TOOL = "rd-tiering";
this.TITLE = "RD Tiering Interpretation";
this.DESCRIPTION = "Executes an RD Tiering Interpreation analysis job";
this.ANALYSIS_TOOL = "rd-tiering";
this.ANALYSIS_TITLE = "RD Tiering Interpretation";
this.ANALYSIS_DESCRIPTION = "Executes an RD Tiering Interpreation analysis job";

this.DEFAULT_TOOLPARAMS = {};
// Make a deep copy to avoid modifying default object.
Expand Down Expand Up @@ -98,10 +98,10 @@ export default class RdTieringAnalysis extends LitElement {
};
const params = {
study: this.opencgaSession.study.fqn,
...AnalysisUtils.fillJobParams(this.toolParams, this.TOOL),
...AnalysisUtils.fillJobParams(this.toolParams, this.ANALYSIS_TOOL),
};
AnalysisUtils.submit(
this.TITLE,
this.ANALYSIS_TITLE,
this.opencgaSession.opencgaClient.clinical()
.runInterpreterTiering(toolParams, params),
this,
Expand Down Expand Up @@ -193,11 +193,12 @@ export default class RdTieringAnalysis extends LitElement {
];

return AnalysisUtils.getAnalysisConfiguration(
this.TOOL,
this.title ?? this.TITLE,
this.DESCRIPTION,
this.ANALYSIS_TOOL,
this.ANALYSIS_TITLE,
this.ANALYSIS_DESCRIPTION,
params,
this.check()
this.check(),
this.config
);
}

Expand Down
8 changes: 5 additions & 3 deletions src/webcomponents/commons/analysis/analysis-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,15 @@ export default class AnalysisUtils {
];
}

static getAnalysisConfiguration(id, title, description, paramSections, check) {
static getAnalysisConfiguration(id, title, description, paramSections, check, config = {}) {
return {
id: id,
title: title,
description: description,
icon: config.icon,
title: config.title || title,
description: config.description || description,
display: {
// defaultLayout: "vertical"
...config.display
},
sections: [
{
Expand Down
16 changes: 8 additions & 8 deletions src/webcomponents/commons/filters/variant-file-format-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default class VariantFileFormatFilter extends LitElement {
render() {
return html`
<data-form
.data=${this._sampleData}
.data="${this._sampleData}"
.config="${this._config}"
@fieldChange="${this.filterChange}">
</data-form>
Expand All @@ -124,7 +124,7 @@ export default class VariantFileFormatFilter extends LitElement {
collapsable: true,
titleVisible: false,
titleWidth: 2,
defaultValue: "-",
defaultValue: "",
defaultLayout: "vertical"
},
sections: [
Expand All @@ -141,9 +141,9 @@ export default class VariantFileFormatFilter extends LitElement {
type: "input-number",
comparators: this.depthIndex?.type === "RANGE_LT" ? "<,>=" : "<=,>",
allowedValues: this.depthIndex?.thresholds,
defaultValue: "",
display: {
visible: () => this.depthIndex?.thresholds?.length > 0
defaultValue: "",
visible: () => this.depthIndex?.thresholds?.length > 0,
}
},
{
Expand All @@ -152,9 +152,9 @@ export default class VariantFileFormatFilter extends LitElement {
type: "input-number",
comparators: this.afIndex?.type === "RANGE_LT" ? "<,>=" : "<=,>",
allowedValues: this.afIndex?.thresholds,
defaultValue: "",
display: {
visible: () => this.afIndex?.thresholds?.length > 0
defaultValue: "",
visible: () => this.afIndex?.thresholds?.length > 0,
}
},
{
Expand All @@ -163,9 +163,9 @@ export default class VariantFileFormatFilter extends LitElement {
type: "input-number",
comparators: this.extVafIndex?.type === "RANGE_LT" ? "<,>=" : "<=,>",
allowedValues: this.extVafIndex?.thresholds,
defaultValue: "",
display: {
visible: () => this.extVafIndex?.thresholds?.length > 0
defaultValue: "",
visible: () => this.extVafIndex?.thresholds?.length > 0,
}
}
]
Expand Down
8 changes: 5 additions & 3 deletions src/webcomponents/commons/filters/variant-file-info-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ export default class VariantFileInfoFilter extends LitElement {
render() {
return html`
<data-form
.data=${this.fileDataQuery}
.data="${this.fileDataQuery}"
.config="${this._config}"
@fieldChange="${this.filterChange}">
</data-form>
Expand Down Expand Up @@ -469,7 +469,9 @@ export default class VariantFileInfoFilter extends LitElement {
allowedValues: field.allowedValues,
multiple: field.multiple ?? false,
maxOptions: field.maxOptions ?? 1,
defaultValue: "",
display: {
defaultValue: "",
},
}))
],
};
Expand All @@ -483,7 +485,7 @@ export default class VariantFileInfoFilter extends LitElement {
collapsable: true,
titleVisible: false,
titleWidth: 2,
defaultValue: "-",
defaultValue: "",
defaultLayout: "vertical"
},
sections: _sections,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import {LitElement, html} from "lit";
import AnalysisUtils from "../../commons/analysis/analysis-utils.js";
import FormUtils from "../../commons/forms/form-utils.js";
import UtilsNew from "../../../core/utils-new.js";
import "../../commons/forms/data-form.js";

Expand All @@ -40,8 +39,8 @@ export default class CohortVariantStatsAnalysis extends LitElement {
opencgaSession: {
type: Object
},
title: {
type: String
config: {
type: Object
},
};
}
Expand Down Expand Up @@ -191,10 +190,11 @@ export default class CohortVariantStatsAnalysis extends LitElement {

return AnalysisUtils.getAnalysisConfiguration(
this.ANALYSIS_TOOL,
this.title ?? this.ANALYSIS_TITLE,
this.ANALYSIS_TITLE,
this.ANALYSIS_DESCRIPTION,
params,
this.check()
this.check(),
this.config
);
}

Expand Down
Loading

0 comments on commit 1125efa

Please sign in to comment.