diff --git a/components/content/RefseqDb.vue b/components/content/RefseqDb.vue index b292e394e9809830168d55d69d10ab88fa459220..604208ffc8c3ea0de8050550c73c5cbb89554170 100644 --- a/components/content/RefseqDb.vue +++ b/components/content/RefseqDb.vue @@ -204,7 +204,7 @@ const computedSystemDistribution = computed(() => { }) const computedDistriSystemOptions = computed(() => { - const toValNormalizePerAssembly = toValue(normalizePerAssembly) + // const toValNormalizePerAssembly = toValue(normalizePerAssembly) return { ...defaultBarPlotOptions.value, @@ -215,15 +215,22 @@ const computedDistriSystemOptions = computed(() => { marks: [ // Plot.frame(), Plot.barY( - toValNormalizePerAssembly, - Plot.groupX({ y: "sum" }, { - x: 'system', tip: true, + toValue(computedSystemDistribution), + { + y: "count", x: 'type', tip: true, sort: { x: "-y" }, }, - ) - // toValue(computedSystemDistribution), ), + // Plot.barY( + // toValNormalizePerAssembly, + // Plot.groupX({ y: "sum" }, { + // x: 'system', tip: true, + // sort: { x: "-y" }, + // }), + + + // ), ], }; }); @@ -296,8 +303,7 @@ const binPlotOptions = ref({ const binPlotDataOptions = computed(() => { const toValueAllHits = toValue(allHits) - const toValNormalizePerAssembly = toValue(normalizePerAssembly) - return toValNormalizePerAssembly?.length > 0 ? { + return toValueAllHits?.hits?.length > 0 ? { ...binPlotOptions.value, width: width.value, @@ -308,21 +314,38 @@ const binPlotDataOptions = computed(() => { ticks: scaleType.value === 'symlog' ? 3 : 5, }, marks: [ - Plot.cell( - toValNormalizePerAssembly ?? [], - Plot.group({ - fill: "count" - }, { - x: "system", - y: "rank", - tip: true, - inset: 0.5, - sort: { y: "fill" } - })), + Plot.cell(toValueAllHits?.hits ?? [], Plot.group({ fill: "count" }, { x: "type", y: selectedTaxoRank.value, tip: true, inset: 0.5, sort: { y: "fill" } })), ] } : null + // const toValNormalizePerAssembly = toValue(normalizePerAssembly) + // return toValNormalizePerAssembly?.length > 0 ? { + // ...binPlotOptions.value, + // width: width.value, + + // color: { + // ...binPlotOptions.value.color, + // type: scaleType.value, + // tickFormat: '~s', + // ticks: scaleType.value === 'symlog' ? 3 : 5, + // }, + // marks: [ + // Plot.cell( + // toValNormalizePerAssembly ?? [], + // Plot.group({ + // fill: "count" + // }, { + // x: "system", + // y: "rank", + // tip: true, + // inset: 0.5, + // sort: { y: "fill" } + // })), + // ] + + // } : null + }) const systemPerAssemblyPerRank = computed(() => {