diff --git a/src/webcomponents/variant/family-genotype-filter.js b/src/webcomponents/variant/family-genotype-filter.js
index 8a2cffb37..a3a9c57b1 100644
--- a/src/webcomponents/variant/family-genotype-filter.js
+++ b/src/webcomponents/variant/family-genotype-filter.js
@@ -297,7 +297,7 @@ export default class FamilyGenotypeFilter extends LitElement {
// Return the default genotype values according the role
defaultGenotype(sample) {
- return sample.id === this.clinicalAnalysis.proband.samples[0].id ? ["0/1", "1/1", "1/2"] : [...this._config.defaultGenotypes];
+ return sample.id === this.clinicalAnalysis.proband.samples[0].id ? ["0/1", "1/1", "1", "1/2"] : [...this._config.defaultGenotypes];
}
render() {
@@ -339,12 +339,13 @@ export default class FamilyGenotypeFilter extends LitElement {
${BioinfoUtils.getIdName(this.clinicalAnalysis.disorder.id, this.clinicalAnalysis.disorder.name)}
-
Genotypes |
+ Genotypes |
HOM_REF (0/0) |
HET (0/1) |
HOM_ALT (1/1) |
+ HAPLOID (1) |
BIALLELIC (1/2) |
@@ -415,6 +416,14 @@ export default class FamilyGenotypeFilter extends LitElement {
?disabled="${this.mode !== "CUSTOM"}"
@change="${this.onSampleTableChange}">
+
+
+ |
0) {
- sampleIds.push(member.samples[0].id + ":" + ["0/0", "0/1", "1/1", "1/2"].join(","));
+ sampleIds.push(member.samples[0].id + ":" + ["0/0", "0/1", "1/1", "1", "1/2"].join(","));
}
}
this._sampleQuery = sampleIds.join(";");
diff --git a/src/webcomponents/variant/variant-samples.js b/src/webcomponents/variant/variant-samples.js
index 7c0d4a372..029762f2c 100644
--- a/src/webcomponents/variant/variant-samples.js
+++ b/src/webcomponents/variant/variant-samples.js
@@ -68,15 +68,15 @@ export default class VariantSamples extends LitElement {
this.config = this.getDefaultConfig();
this.gridCommons = new GridCommons(this.gridId, this, this.config);
- // Select all genotypes by default
+ // Nacho: to be more consistent with the rest of the application we are NOT selecting all genotypes by default
this.selectedGenotypes = "";
- const selectedGenotypesArray = []
- for (const genotype of this.config.genotypes) {
- if (genotype.fields) {
- selectedGenotypesArray.push(genotype.fields.filter(gt => gt.id).map(gt => gt.id).join(","));
- }
- }
- this.selectedGenotypes = selectedGenotypesArray.join(",");
+ // const selectedGenotypesArray = [];
+ // for (const genotype of this.config.genotypes) {
+ // if (genotype.fields) {
+ // selectedGenotypesArray.push(genotype.fields.filter(gt => gt.id).map(gt => gt.id).join(","));
+ // }
+ // }
+ // this.selectedGenotypes = selectedGenotypesArray.join(",");
}
updated(changedProperties) {
@@ -87,6 +87,7 @@ export default class VariantSamples extends LitElement {
genotypeFormatter(value) {
if (value?.data?.length > 0) {
+ // Color schema: 0/1, 0|1, 1|0 == darkorange; 1, 1/1 == red
const gt = value.data[0];
const color = gt === "0/1" || gt === "0|1" || gt === "1|0" ? "darkorange" : "red";
return `${value.data[0]}`;
@@ -95,7 +96,7 @@ export default class VariantSamples extends LitElement {
}
}
- variantFormatter(value, row) {
+ variantFormatter(value) {
if (value && value.file && value.dataKeys && value.data && value.dataKeys.length === value.data.length) {
const fileInfo = `Filter: ${value.file.data["FILTER"]}; Qual: ${value.file.data["QUAL"]}`;
const sampleFormat = [];
@@ -108,10 +109,6 @@ export default class VariantSamples extends LitElement {
}
}
- individualFormatter(value) {
- return value || "-";
- }
-
renderTable() {
if (!this.opencgaSession || !this.variantId) {
return;
@@ -151,10 +148,6 @@ export default class VariantSamples extends LitElement {
total: response.total,
rows: response.rows
}),
- // responseHandler: response => {
- // const result = this.gridCommons.responseHandler(response, $(this.table).bootstrapTable("getOptions"));
- // return result.response;
- // },
onClickRow: (row, selectedElement) => this.gridCommons.onClickRow(row.id, row, selectedElement),
onLoadSuccess: data => {
this.gridCommons.onLoadSuccess(data, 2);
@@ -274,7 +267,6 @@ export default class VariantSamples extends LitElement {
field: "id",
rowspan: 2,
colspan: 1,
- // formatter: this.variantFormatter,
halign: "center"
},
{
@@ -297,7 +289,6 @@ export default class VariantSamples extends LitElement {
title: "Individual",
rowspan: 1,
colspan: 4,
- // formatter: this.variantFormatter,
halign: "center"
},
{
@@ -315,7 +306,7 @@ export default class VariantSamples extends LitElement {
field: "individualId",
colspan: 1,
rowspan: 1,
- formatter: this.individualFormatter,
+ formatter: value => value || "-",
halign: "center"
},
{
@@ -363,6 +354,7 @@ export default class VariantSamples extends LitElement {
skip: 0,
limit: 5000,
};
+
// batch size for sample query
const BATCH_SIZE = 100;
@@ -489,9 +481,9 @@ export default class VariantSamples extends LitElement {
},
]
},
- {
- separator: true
- },
+ // {
+ // separator: true
+ // },
{
id: "Secondary Alternate Genotypes",
fields: [
|