Skip to content
Snippets Groups Projects
Commit 830a140a authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

use total taxa for distri system count

parent f898e3f9
No related branches found
No related tags found
No related merge requests found
Pipeline #128001 waiting for manual action
...@@ -2,5 +2,47 @@ ...@@ -2,5 +2,47 @@
"editor.defaultFormatter": "Vue.volar", "editor.defaultFormatter": "Vue.volar",
"[python]": { "[python]": {
"editor.defaultFormatter": "ms-python.black-formatter" "editor.defaultFormatter": "ms-python.black-formatter"
} },
} // Enable the ESlint flat config support
\ No newline at end of file "eslint.experimental.useFlatConfig": true,
// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,
// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},
// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{ "rule": "style/*", "severity": "off" },
{ "rule": "format/*", "severity": "off" },
{ "rule": "*-indent", "severity": "off" },
{ "rule": "*-spacing", "severity": "off" },
{ "rule": "*-spaces", "severity": "off" },
{ "rule": "*-order", "severity": "off" },
{ "rule": "*-dangle", "severity": "off" },
{ "rule": "*-newline", "severity": "off" },
{ "rule": "*quotes", "severity": "off" },
{ "rule": "*semi", "severity": "off" }
],
// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml",
"toml",
"astro",
]
}
<script setup lang="ts"> <script setup lang="ts">
import { toValue } from '@vueuse/core';
import { computed, toValue, ref, onMounted, watchEffect, unref } from 'vue'
import * as d3 from "d3"; import * as d3 from "d3";
import * as Plot from "@observablehq/plot"; import * as Plot from "@observablehq/plot";
import { useDisplay } from "vuetify"; import { useDisplay } from "vuetify";
...@@ -22,7 +23,7 @@ const { width } = useDisplay(); ...@@ -22,7 +23,7 @@ const { width } = useDisplay();
const systemHits = ref(undefined) const systemHits = ref(undefined)
const refseqTaxo = ref(undefined) const refseqTaxo = ref(undefined)
const selectedTaxoRank = ref("phylum") const selectedTaxoRank = ref("phylum")
const taxoRanks: Ref<string[]> = ref([ const taxoRanks = ref<string[]>([
"species", "species",
"genus", "genus",
"family", "family",
...@@ -40,7 +41,6 @@ const pending = ref<boolean>(false) ...@@ -40,7 +41,6 @@ const pending = ref<boolean>(false)
const genomeCountThreshold = ref<boolean>(true) const genomeCountThreshold = ref<boolean>(true)
const genomeCountDomain = ref<[number | null, number | null]>([null, null]) const genomeCountDomain = ref<[number | null, number | null]>([null, null])
const genomeCountValue = ref<number>(10) const genomeCountValue = ref<number>(10)
const resetCount = ref<Fn | null>(null)
const genomePercentDomain = ref<[number, number]>([0, 100]) const genomePercentDomain = ref<[number, number]>([0, 100])
...@@ -80,7 +80,8 @@ const computedDistribution = computed(() => { ...@@ -80,7 +80,8 @@ const computedDistribution = computed(() => {
const distribution = [] const distribution = []
for (const [taxo, values] of itemsPerGroup.entries()) { for (const [taxo, values] of itemsPerGroup.entries()) {
if (toValFacetsPerRank[taxo] && toValFacetsPerRank[taxo] > 0) { if (toValFacetsPerRank[taxo] && toValFacetsPerRank[taxo] > 0) {
distribution.push({ taxo, size: values.size, percent: (values.size / toValFacetsPerRank[taxo]) * 100 }) const totalGenomePerTaxa = toValFacetsPerRank[taxo]
distribution.push({ taxo, size: totalGenomePerTaxa, percent: (values.size / totalGenomePerTaxa) * 100 })
} }
} }
return distribution return distribution
...@@ -99,9 +100,6 @@ const filteredDistribution = computed(() => { ...@@ -99,9 +100,6 @@ const filteredDistribution = computed(() => {
}) })
}) })
// const totalGenome = computed(() => {
// refseqTaxo?.estimatedTotalHits
// })
const systemStatistics = computed(() => { const systemStatistics = computed(() => {
const toValSystemHits = toValue(systemHits) const toValSystemHits = toValue(systemHits)
const toValRefseqTaxo = toValue(refseqTaxo) const toValRefseqTaxo = toValue(refseqTaxo)
......
...@@ -46,8 +46,8 @@ const title = defineModel('title') ...@@ -46,8 +46,8 @@ const title = defineModel('title')
const pdbeMolstarComponent = ref(null) const pdbeMolstarComponent = ref(null)
const dialog = ref(false) const dialog = ref(false)
const moleculeFormat: Ref<string> = ref("pdb") const moleculeFormat = ref<string>("pdb")
const selectedPdb: Ref<string | null> = ref(null) const selectedPdb = ref<string | null>(null)
const structureToDownload: Ref<string | null> = ref(null) const structureToDownload: Ref<string | null> = ref(null)
......
<script setup lang="ts"> <script setup lang="ts">
import { useTheme } from "vuetify"; import { useTheme } from "vuetify";
import type { WikiArticle } from '@/types/articles'; import { useFetchArticle } from "../../composables/useFetchArticle";
const theme = useTheme(); const theme = useTheme();
......
<script setup lang="ts"> <script setup lang="ts">
import ProseH2 from '~/components/content/ProseH2' import ProseH2 from '~/components/content/ProseH2'
import { computed } from 'vue'
const { page } = useContent(); const { page } = useContent();
const computedDois = computed(() => { const computedDois = computed(() => {
if (page.value?.references?.length > 0) { if (page.value?.references?.length > 0) {
......
...@@ -11,6 +11,7 @@ export default defineNuxtConfig({ ...@@ -11,6 +11,7 @@ export default defineNuxtConfig({
'nuxt-meilisearch', 'nuxt-meilisearch',
'@nuxtjs/plausible', '@nuxtjs/plausible',
'@nuxtjs/seo', '@nuxtjs/seo',
'@nuxtjs/eslint-module',
], ],
app: { app: {
head: { head: {
...@@ -94,6 +95,10 @@ export default defineNuxtConfig({ ...@@ -94,6 +95,10 @@ export default defineNuxtConfig({
isCustomElement: (tag) => ['pdbe-molstar'].includes(tag), isCustomElement: (tag) => ['pdbe-molstar'].includes(tag),
}, },
}, },
eslint: {
/* module options */
lintOnStart: false
}
}) })
This diff is collapsed.
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
"preview": "nuxt preview" "preview": "nuxt preview"
}, },
"devDependencies": { "devDependencies": {
"@antfu/eslint-config": "^2.12.2",
"@iconify-json/game-icons": "^1.1.7", "@iconify-json/game-icons": "^1.1.7",
"@iconify-json/gravity-ui": "^1.1.1", "@iconify-json/gravity-ui": "^1.1.1",
"@iconify-json/material-symbols": "^1.1.69", "@iconify-json/material-symbols": "^1.1.69",
...@@ -17,20 +18,21 @@ ...@@ -17,20 +18,21 @@
"@iconify-json/tabler": "^1.1.103", "@iconify-json/tabler": "^1.1.103",
"@iconify-json/vscode-icons": "^1.1.32", "@iconify-json/vscode-icons": "^1.1.32",
"@nuxt/content": "^2.10.0", "@nuxt/content": "^2.10.0",
"@nuxtjs/eslint-module": "^4.1.0",
"@nuxtjs/plausible": "^0.2.4", "@nuxtjs/plausible": "^0.2.4",
"@nuxtjs/seo": "^2.0.0-rc.9", "@nuxtjs/seo": "^2.0.0-rc.9",
"@types/d3": "^7.4.3", "@types/d3": "^7.4.3",
"@types/node": "^20.11.0", "@types/node": "^20.11.0",
"@unocss/eslint-plugin": "^0.59.0",
"@unocss/nuxt": "^0.58.3", "@unocss/nuxt": "^0.58.3",
"@unocss/preset-icons": "^0.58.3", "@unocss/preset-icons": "^0.58.3",
"@vueuse/core": "^10.7.1", "@vueuse/core": "^10.7.1",
"@vueuse/nuxt": "^10.7.1", "@vueuse/nuxt": "^10.7.1",
"eslint": "^8.57.0",
"eslint-plugin-format": "^0.1.0",
"nuxt": "^3.11.1", "nuxt": "^3.11.1",
"nuxt-meilisearch": "^1.1.0", "nuxt-meilisearch": "^1.1.0",
"vuetify-nuxt-module": "^0.9.0", "vuetify-nuxt-module": "^0.9.0"
"@antfu/eslint-config": "^2.11.6",
"eslint-plugin-format": "^0.1.0",
"@unocss/eslint-plugin": "^0.58.8"
}, },
"overrides": { "overrides": {
"vue": "latest" "vue": "latest"
......
import type { MarkdownParsedContent } from '@nuxt/content/dist/runtime/types'
interface DefenseFinderContent extends MarkdownParsedContent {
tableColumns: {
article: {
doi: string
abstract?: string
}
Sensor: string
Activator: string
Effector: string
PFAM: string
}
contributors?: string[]
relevantAbstracts: { doi: string }[]
}
export interface WikiArticle { export interface WikiArticle {
DOI: string DOI: string
title?: string title?: string
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment