Skip to content
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

TASK-6930 - Unable to launch variant-stats-index from IVA #1001

Merged
merged 4 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/webcomponents/study/admin/variant/operations-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export default class OperationsAdmin extends LitElement {
}
return html`
<variant-annotation-index-operation
.toolParams="${{project: opencgaSession.project.id}}"
.toolParams="${{project: opencgaSession.project.fqn}}"
.opencgaSession="${opencgaSession}">
</variant-annotation-index-operation>
`;
Expand All @@ -217,7 +217,7 @@ export default class OperationsAdmin extends LitElement {
}
return html`
<variant-secondary-annotation-index-operation
.toolParams="${{project: opencgaSession.project.id}}"
.toolParams="${{project: opencgaSession.project.fqn}}"
.opencgaSession="${opencgaSession}">
</variant-secondary-annotation-index-operation>
`;
Expand Down Expand Up @@ -265,10 +265,9 @@ export default class OperationsAdmin extends LitElement {
visibility: "private",
type: "navitem",
render: (opencgaSession, study) => {
// CAUTION: no .fqn? in toolParams property?
return html`
<variant-secondary-sample-index-operation
.toolParams="${{study: study.id}}"
.toolParams="${{study: study.fqn}}"
.opencgaSession="${opencgaSession}">
</variant-secondary-sample-index-operation>
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export default class VariantAnnotationIndexOperation extends LitElement {
onClear() {
this.toolParams = {
...UtilsNew.objectClone(this.DEFAULT_TOOLPARAMS),
project: this.toolParams.project || "",
};
this.config = this.getDefaultConfig();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export default class VariantIndexOperation extends LitElement {
onClear() {
this.toolParams = {
...UtilsNew.objectClone(this.DEFAULT_TOOLPARAMS),
study: this.toolParams.study || "",
};
this.config = this.getDefaultConfig();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export default class VariantSecondaryAnnotationIndexOperation extends LitElement
onClear() {
this.toolParams = {
...UtilsNew.objectClone(this.DEFAULT_TOOLPARAMS),
project: this.toolParams.project || "",
};
this.config = this.getDefaultConfig();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export default class VariantSecondarySampleIndexOperation extends LitElement {
onClear() {
this.toolParams = {
...UtilsNew.objectClone(this.DEFAULT_TOOLPARAMS),
study: this.toolParams.study || "",
};
this.config = this.getDefaultConfig();
}
Expand Down Expand Up @@ -168,7 +169,7 @@ export default class VariantSecondarySampleIndexOperation extends LitElement {
title: "Configuration Parameters",
elements: [
{
title: "Sample",
title: "Sample IDs",
type: "custom",
required: true,
display: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export default class VariantStatsIndexOperation extends LitElement {
...UtilsNew.objectClone(this.DEFAULT_TOOLPARAMS),
};

this.study = "";
this.config = this.getDefaultConfig();
}

Expand Down Expand Up @@ -84,6 +83,11 @@ export default class VariantStatsIndexOperation extends LitElement {
message: "Study is a mandatory parameter, please select one."
};
}
if (!this.toolParams.cohort) {
return {
message: "Cohort IDs is a mandatory parameter, please select some cohorts."
};
}
return null;
}

Expand All @@ -98,6 +102,7 @@ export default class VariantStatsIndexOperation extends LitElement {

onSubmit() {
const toolParams = {
cohort: this.toolParams.cohort?.split(",") || [],
overwriteStats: this.toolParams.overwriteStats || false,
resume: this.toolParams.resume || false,
};
Expand All @@ -116,6 +121,7 @@ export default class VariantStatsIndexOperation extends LitElement {
onClear() {
this.toolParams = {
...UtilsNew.objectClone(this.DEFAULT_TOOLPARAMS),
study: this.toolParams.study || "",
};
this.config = this.getDefaultConfig();
}
Expand Down Expand Up @@ -160,6 +166,22 @@ export default class VariantStatsIndexOperation extends LitElement {
{
title: "Configuration Parameters",
elements: [
{
title: "Cohort IDs",
type: "custom",
required: true,
display: {
render: toolParams => html `
<catalog-search-autocomplete
.value="${toolParams?.cohort}"
.resource="${"COHORT"}"
.opencgaSession="${this.opencgaSession}"
.config="${{multiple: true}}"
@filterChange="${e => this.onFieldChange(e, "cohort")}">
</catalog-search-autocomplete>
`,
},
},
{
title: "Overwrite Stats",
field: "overwriteStats",
Expand Down
Loading