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

Merge branch 'dev' into matrix-pdock

parents 63fb2de8 6e535f35
Branches dev
No related tags found
1 merge request!226Resolve "Design of the structure section in a system's page"
......@@ -360,12 +360,13 @@ update-meilisearch-index:prod:
stage: get-meili-key
variables:
MEILI_HOST: "http://localhost:7700"
MEILI_HOST_NO_PROTOCOLE: "localhost:7700"
script:
- >
df-wiki-cli
meilisearch
--key "${MEILI_MASTER_KEY}"
--host ${MEILI_HOST}
--host "${MEILI_HOST}"
get-env-var
--output build.env
artifacts:
......@@ -378,6 +379,7 @@ set-meili-env:dev:
extends: .set-meili-env
variables:
MEILI_HOST: "https://${MEILI_HOST_DEV}"
MEILI_HOST_NO_PROTOCOLE: ${MEILI_HOST_DEV}
rules:
- if: $CI_COMMIT_BRANCH != "main"
......@@ -385,6 +387,8 @@ set-meili-env:prod:
extends: .set-meili-env
variables:
MEILI_HOST: "https://${MEILI_HOST_PROD}"
MEILI_HOST_NO_PROTOCOLE: ${MEILI_HOST_PROD}
rules:
- if: $CI_COMMIT_BRANCH == "main"
......@@ -416,7 +420,6 @@ sync-zotero:
- *docker-login
script:
- echo $MEILI_HOST
- echo $MEILI_API_KEY
- >
docker buildx build --pull -t "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$CI_COMMIT_SHORT_SHA"
--build-arg "BASE_URL=$BASE_URL"
......@@ -450,7 +453,7 @@ build:prod:wiki:
# - get-pfam
variables:
BASE_URL: /wiki/
HOST_URL: https://${HOST_PROD}
HOST_URL: "https://${HOST_PROD}"
rules:
- if: $CI_COMMIT_BRANCH == "main"
......@@ -517,7 +520,7 @@ deploy:prod:
variables:
NODE_ENV: "production"
KUBE_NAMESPACE: "defense-finder-prod"
PUBLIC_URL: "${HOST_PROD}"
PUBLIC_URL: "https://${HOST_PROD}"
CI_DEBUG_TRACE: "false"
ENV: "production"
environment:
......@@ -601,7 +604,7 @@ create-structures-archives:prod:
variables:
NODE_ENV: "production"
KUBE_NAMESPACE: "defense-finder-prod"
PUBLIC_URL: "${HOST_PROD}"
PUBLIC_URL: "https://${HOST_PROD}"
CI_DEBUG_TRACE: "false"
ENV: "production"
environment:
......
......@@ -18,7 +18,12 @@ const itemValue = ref("id");
const { width } = useDisplay();
const dbName = ref("refseq")
const taxonomyFacet = ref<Record<string, any> | undefined>(undefined)
const cellPlotMargin = ref({
marginLeft: 150,
marginBottom: 200,
marginTop: 0,
marginRight: 50
})
onBeforeMount(async () => {
......@@ -150,7 +155,7 @@ const availableTaxo: Ref<string[]> = ref([
"Superkingdom"
]);
const scaleTypes = ref<string[]>(['linear', 'sqrt', 'log', 'symlog'])
const scaleTypes = ref<string[]>(['linear', 'sqrt', 'symlog'])
const selectedTaxoRank = ref<"species" | "genus" | "family" | "order" | "class" | "phylum" | "Superkingdom">("Superkingdom");
const headers = ref([
......@@ -190,7 +195,18 @@ const computedWidth = computed(() => {
return Math.max(currentWidth, 550);
});
const cellPlotComputedDimension = computed(() => {
const { marginLeft, marginBottom, marginRight, marginTop } = toValue(cellPlotMargin)
const toValWidth = toValue(width)
const widthFixCell = countSystem.value * 50 + marginLeft + marginRight
const heigthFix = countClade.value * 50 + marginTop + marginBottom
if (widthFixCell > toValWidth) {
return { width: toValWidth - marginLeft - marginRight, height: undefined }
} else {
return { width: widthFixCell, height: heigthFix }
}
})
const allHits: Ref<Record<string, any> | undefined> = ref(undefined)
......@@ -364,17 +380,33 @@ const sortedCellDomain = computed(() => {
}
})
const binPlotOptions = computed(() => {
const { marginLeft, marginBottom } = toValue(cellPlotMargin)
const { height } = toValue(cellPlotComputedDimension)
return {
marginLeft: 150,
marginBottom: 200,
marginLeft,
marginBottom,
padding: 0,
grid: true,
aspectRatio: true,
aspectRatio: height ? undefined : 1,
x: { tickRotate: 90, label: "Systems", domain: toValue(sortedCellDomain) },
color: { scheme: "plasma", legend: true, label: `Proportion per ${selectedTaxoRank.value}`, domain: [0, 100] },
}
})
const countSystem = computed(() => {
const toValueAllHits = toValue(allHits)
const data = toValueAllHits?.hits ?? []
const setSystem = new Set(data.map(d => d.type))
return setSystem.size
})
const countClade = computed(() => {
const toValueAllHits = toValue(allHits)
const data = toValueAllHits?.hits ?? []
const setSystem = new Set(data.map(d => d[selectedTaxoRank.value]))
return setSystem.size
})
const binPlotGroup = computed(() => {
return Plot.group(
......@@ -423,9 +455,13 @@ const binPlotDataOptions = computed(() => {
const toValBinPlotGroup = toValue(binPlotGroup)
const data = toValueAllHits?.hits ?? []
const plotCellMark = Plot.cell(data, toValBinPlotGroup)
const { width, height } = toValue(cellPlotComputedDimension)
const dim = height ? { width, height } : { width }
return toValueAllHits?.hits?.length > 0 ? {
...binPlotOptions.value,
width: width.value,
...dim,
title: `Proportion of genomes with defense system X per ${selectedTaxoRank.value} taxonomic rank`,
color: {
...binPlotOptions.value.color,
......
......@@ -35,6 +35,7 @@ securityContext:
runAsNonRoot: true
runAsUser: 101
runAsGroup: 101
allowPrivilegeEscalation: false
# capabilities:
# drop:
# - ALL
......
......@@ -25,6 +25,6 @@ appVersion: "1.16.0"
dependencies:
- name: meilisearch
version: 0.3.0
version: 0.5.0
repository: "https://meilisearch.github.io/meilisearch-kubernetes"
......@@ -7,7 +7,7 @@ services:
args:
BASE_URL: /wiki
MEILI_HOST: http://localhost:7700
MEILI_API_KEY: f9cc073016cbb392365aae86517878cb3f3408bb85c1fafd06e27f73ccb35e3d
MEILI_API_KEY: f5f5f1bc48e6379fc2509f5bf0aed1fce96c1bbf86e0a194c605b258d7cfe890
HOST_URL: http://localhost:8082
container_name: nuxt
environment:
......@@ -31,7 +31,7 @@ services:
- main
meilisearch:
image: getmeili/meilisearch:v1.5
image: getmeili/meilisearch:v1.7
# command:
# - meilisearch
# - --http-addr
......
......@@ -137,7 +137,9 @@ def get_env_var(
keys = client.get_keys()
api_key = [res.key for res in keys.results if res.name == "Default Search API Key"]
print(ctx.obj.host)
if len(api_key) == 1:
with open(output, "a") as outfile:
outfile.write(f"MEILI_HOST={ctx.obj.host}\n")
outfile.write(f"MEILI_API_KEY={api_key[0]}\n")
print(ctx.obj.host)
outfile.write(f'MEILI_HOST="{ctx.obj.host}"\n')
outfile.write(f'MEILI_API_KEY="{api_key[0]}"\n')
#!/bin/bash
# REFSEQ
df-wiki-cli meilisearch delete-all-documents refseq
df-wiki-cli meilisearch update --file ../data/refseq_res.csv --document refseq
# REF SEQ TAXO
df-wiki-cli content refseq-group-per-assembly --input ../data/refseq_res.csv --output /tmp/refseqtaxo.csv
df-wiki-cli meilisearch delete-all-documents refseqtaxo
df-wiki-cli meilisearch update --file /tmp/refseqtaxo.csv --document refseqtaxo
# REFSEQ TAXO TYPE
df-wiki-cli content refseq-group-per-assembly-and-type --input ../data/refseq_res.csv --output /tmp/refseqtaxotype.csv
df-wiki-cli meilisearch delete-all-documents refseqtaxotype
df-wiki-cli meilisearch update --file /tmp/refseqtaxotype.csv --document refseqtaxotype
# SANITIZED REFSEQ
df-wiki-cli content refseq-sanitized-hits --input ../data/refseq_res.csv --output /tmp/refseq-sanitized.csv
df-wiki-cli meilisearch delete-all-documents refseqsanitized
df-wiki-cli meilisearch update --file /tmp/refseq-sanitized.csv --document refseqsanitized
# systems
df-wiki-cli content systems --dir ../content/3.defense-systems/ --pfam ../public/pfam-a-hmm.csv --output /tmp/list-systems.json
df-wiki-cli meilisearch update --file /tmp/list-systems.json --document systems
# STRUCTURE
df-wiki-cli meilisearch update --file ../data/all_predictions_statistics_clean.csv --document structure
# ARTICLES
# df-wiki-cli meilisearch delete-all-documents article
# df-wiki-cli meilisearch
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment