diff --git a/components/CollapsibleChips.vue b/components/CollapsibleChips.vue index 1ea5ef641757b2d5404d7524d5d4ade3acde6d89..2f7a08ea757cc5e74d5f59d1f3f060065fdad0d5 100644 --- a/components/CollapsibleChips.vue +++ b/components/CollapsibleChips.vue @@ -17,6 +17,7 @@ const props = withDefaults(defineProps<Props>(), { }); + const show = ref(false); @@ -37,12 +38,12 @@ const show = ref(false); </span> <span v-else class="d-flex flex-wrap align-center justify-start"> <template v-for="(item, index) in items" :key="item.title"> - <v-chip v-if="index < itemsToDisplay || itemsToDisplay < 0" :href="item?.href" + <v-chip v-if="index < itemsToDisplay || itemsToDisplay < 0 || items.length - itemsToDisplay === 1" :href="item?.href" :target="item?.href === undefined ? item?.href : '_blank'" color="info" class="mr-1 my-1 align-self-center" size="small"> {{ item.title }} </v-chip> - <template v-if="index === itemsToDisplay"> + <template v-if="index === itemsToDisplay && items.length - itemsToDisplay > 1"> <v-chip v-if="!show" variant="text" class="text-grey text-caption align-self-center px-1" @click="show = !show"> (+{{ items.length - itemsToDisplay }} others) diff --git a/components/ServerDbTable.vue b/components/ServerDbTable.vue index 99fa7081d221871b4c142bccd7c297115084a54f..cab710918aae2e8119af91f77de6af7a438b6893 100644 --- a/components/ServerDbTable.vue +++ b/components/ServerDbTable.vue @@ -173,7 +173,7 @@ watch(filterInputValues, (newSoF) => { if (isFilter.value && filterInputValues.value !== null && filterInputValues.value?.length % 3 === 0) { msFilter.value = filterInputValues.value.map((it, index) => { - const sanitizedValue = it.value.split("-")[0] + const sanitizedValue = it.value.split("-").slice(0, -1).join("-") if (index >= 1 && (index + 1) % 3 === 1) { return ` AND ${sanitizedValue}` } else if ((index + 1) % 3 === 0) { diff --git a/components/content/RefseqDb.vue b/components/content/RefseqDb.vue index 0d92234412755e0cc3d52f974637a3012d3dff6e..fcf345d0522a64d872c00486cf80dd64ab9137f4 100644 --- a/components/content/RefseqDb.vue +++ b/components/content/RefseqDb.vue @@ -13,7 +13,9 @@ const { width } = useDisplay(); const distriTool: Ref<string[]> = ref([]) const facets = ref([ + "replicon", "type", + "subtype", "Superkingdom", "phylum", "order", @@ -43,7 +45,8 @@ const headers = ref([ }, { title: "Accessions", - key: "accession_in_sys" + key: "accession_in_sys", + sortable: false } ]) const logTransform = computed(() => { diff --git a/packages/df-wiki-cli/df_wiki_cli/meilisearch/__init__.py b/packages/df-wiki-cli/df_wiki_cli/meilisearch/__init__.py index 563be0c4fa41e07635d04c2f9ce6787b75d57dd0..875a1e6a28ad33aea1e8f3200794c3164666a7df 100644 --- a/packages/df-wiki-cli/df_wiki_cli/meilisearch/__init__.py +++ b/packages/df-wiki-cli/df_wiki_cli/meilisearch/__init__.py @@ -86,6 +86,7 @@ def update_refseq( index.update_pagination_settings({"maxTotalHits": 1000000}) index.update_filterable_attributes( body=[ + "replicon", "type", "subtype", "Superkingdom", @@ -98,6 +99,7 @@ def update_refseq( ) index.update_sortable_attributes( [ + "replicon", "type", "subtype", "Superkingdom", @@ -113,7 +115,6 @@ def update_refseq( "sortFacetValuesBy": {"*": "count"}, } index.update_faceting_settings(params) - print("typo toler") index.update_typo_tolerance( { "enabled": False @@ -154,12 +155,25 @@ def update_structure( "plddts", ] ) + params = { + "maxValuesPerFacet": 1000000, + "sortFacetValuesBy": {"*": "count"}, + } + index.update_faceting_settings(params) + print(attr_task) index.update_sortable_attributes( [ "system", "completed", "plddts", + "nb_sys", + "completed", + "prediction_type", + "system_number_of_genes", + "iptm+ptm", + "pDockQ", + "type", ] ) index.update_typo_tolerance({"enabled": False})