Skip to content

Commit

Permalink
feat(R207): Update for R207.
Browse files Browse the repository at this point in the history
BREAKING CHANGE: R207 taxonomy
  • Loading branch information
aaronmussig committed Mar 23, 2022
1 parent 7babc86 commit d8366ec
Show file tree
Hide file tree
Showing 30 changed files with 702 additions and 51 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/stats/r207/red-archaea.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/stats/r207/red-bacteria.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/stats/r207/sp-rep-type-small.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/stats/r207/sp-rep-type.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions assets/models/taxon-history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export enum TaxonHistoryRelease {
R89 = "89",
R95 = "95",
R202 = "202",
R207 = "207",
NCBI = "NCBI"
}

Expand All @@ -18,6 +19,7 @@ export const TaxonHistoryReleases = [
TaxonHistoryRelease.R89,
TaxonHistoryRelease.R95,
TaxonHistoryRelease.R202,
TaxonHistoryRelease.R207,
TaxonHistoryRelease.NCBI
]

Expand Down
2 changes: 1 addition & 1 deletion components/genome/GenomeTaxonHistory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export default Vue.extend({
methods: {
// Compute the taxon history URL for the current taxon
getHistUrl(taxon: string) {
return `/taxon-history/?from=R80&to=R202&query=${encodeURIComponent(taxon)}`
return `/taxon-history?from=R80&to=R207&query=${encodeURIComponent(taxon)}`
},
// Retrieve the taxon history for this accession
Expand Down
56 changes: 53 additions & 3 deletions components/index/NotifyBar.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,63 @@
<template>
<div class="notifyBar body-2 text-center py-1">
<slot></slot>
<div v-if="isVisible" class="notifyBar py-1 d-flex">
<div class="d-flex ml-5" style="min-width: 30px;">
</div>
<div class="d-flex mx-auto my-auto body-2">
<slot></slot>
</div>
<div class="d-flex mr-5" style="min-width: 30px;">
<v-btn
color="#a0b8a0"
depressed
icon
small
@click="close"
>
<v-icon>
{{ mdiCloseCircleOutlineSvg }}
</v-icon>
</v-btn>
</div>
</div>
</template>

<script lang="ts">
import Vue from 'vue';
export default Vue.extend({})
import {mdiCloseCircleOutline} from '@mdi/js';
export default Vue.extend({
props: {
uid: {
type: String,
required: true,
},
},
computed: {
cookieKey(): string {
return `gtdb-notify-bar-hidden-${this.uid}`;
}
},
data: () => ({
isVisible: true,
mdiCloseCircleOutlineSvg: mdiCloseCircleOutline,
}),
methods: {
close() {
this.$cookies.set(this.cookieKey, 'true', {
path: '/',
maxAge: 2147483647,
sameSite: true,
});
this.isVisible = false;
},
},
created() {
if (this.$cookies.get(this.cookieKey)) {
this.isVisible = false;
}
}
})
</script>

<style scoped>
Expand Down
2 changes: 1 addition & 1 deletion components/search/ResultsFromPreviousReleases.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

<!-- Rows -->
<template v-slot:item.view="{ item }">
<nuxt-link :to="`/taxon-history?from=${item.firstSeen}&to=R202&query=${item.taxon}`">
<nuxt-link :to="`/taxon-history?from=${item.firstSeen}&to=R207&query=${item.taxon}`">
Taxon History ({{ item.firstSeen }} to {{ item.lastSeen }})
</nuxt-link>
</template>
Expand Down
32 changes: 32 additions & 0 deletions components/stats/REDr207.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<template>
<div class="mt-2">
<!-- <h3>Bacteria</h3>-->
<!-- <div id="fig_el730431405688597008165473308651"></div>-->

<!-- <h3>Archaea</h3>-->
<!-- <div id="fig_el729391400845065580326015787637"></div>-->

</div>
</template>

<script lang="ts">
import Vue from 'vue';
import * as d3 from 'd3v5';
//@ts-ignore
import mpld3 from 'mpld3';
// const archaea = require('~/assets/data/stats/r202/red-archaea.json')
// const bacteria = require('~/assets/data/stats/r202/red-bacteria.json')
export default Vue.extend({
mounted() {
// mpld3.draw_figure("fig_el729391400845065580326015787637", archaea);
// mpld3.draw_figure("fig_el730431405688597008165473308651", bacteria);
}
})
</script>

<style scoped>
</style>
14 changes: 7 additions & 7 deletions components/taxon-history/TaxonHistoryFullTaxonomy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<td v-if="currentTaxonIndex >= 0"
>
<!-- If this is the current release, link to the tree -->
<template v-if="item.release === 'R202' && item.taxonomy.d.length > 3">
<template v-if="item.release === 'R207' && item.taxonomy.d.length > 3">
<nuxt-link :to="`/tree?r=${item.taxonomy.d}`">
{{ item.taxonomy.d }}
</nuxt-link>
Expand All @@ -53,7 +53,7 @@
</td>
<td v-if="currentTaxonIndex >= 1">
<!-- If this is the current release, link to the tree -->
<template v-if="item.release === 'R202' && item.taxonomy.p.length > 3">
<template v-if="item.release === 'R207' && item.taxonomy.p.length > 3">
<nuxt-link :to="`/tree?r=${item.taxonomy.p}`">
{{ item.taxonomy.p }}
</nuxt-link>
Expand All @@ -65,7 +65,7 @@
</td>
<td v-if="currentTaxonIndex >= 2">
<!-- If this is the current release, link to the tree -->
<template v-if="item.release === 'R202' && item.taxonomy.c.length > 3">
<template v-if="item.release === 'R207' && item.taxonomy.c.length > 3">
<nuxt-link :to="`/tree?r=${item.taxonomy.c}`">
{{ item.taxonomy.c }}
</nuxt-link>
Expand All @@ -77,7 +77,7 @@
</td>
<td v-if="currentTaxonIndex >= 3">
<!-- If this is the current release, link to the tree -->
<template v-if="item.release === 'R202' && item.taxonomy.o.length > 3">
<template v-if="item.release === 'R207' && item.taxonomy.o.length > 3">
<nuxt-link :to="`/tree?r=${item.taxonomy.o}`">
{{ item.taxonomy.o }}
</nuxt-link>
Expand All @@ -89,7 +89,7 @@
</td>
<td v-if="currentTaxonIndex >= 4">
<!-- If this is the current release, link to the tree -->
<template v-if="item.release === 'R202' && item.taxonomy.f.length > 3">
<template v-if="item.release === 'R207' && item.taxonomy.f.length > 3">
<nuxt-link :to="`/tree?r=${item.taxonomy.f}`">
{{ item.taxonomy.f }}
</nuxt-link>
Expand All @@ -101,7 +101,7 @@
</td>
<td v-if="currentTaxonIndex >= 5">
<!-- If this is the current release, link to the tree -->
<template v-if="item.release === 'R202' && item.taxonomy.g.length > 3">
<template v-if="item.release === 'R207' && item.taxonomy.g.length > 3">
<nuxt-link :to="`/tree?r=${item.taxonomy.g}`">
{{ item.taxonomy.g }}
</nuxt-link>
Expand All @@ -113,7 +113,7 @@
</td>
<td v-if="currentTaxonIndex >= 6">
<!-- If this is the current release, link to the tree -->
<template v-if="item.release === 'R202' && item.taxonomy.s.length > 3">
<template v-if="item.release === 'R207' && item.taxonomy.s.length > 3">
<nuxt-link :to="`/tree?r=${item.taxonomy.s}`">
{{ item.taxonomy.s }}
</nuxt-link>
Expand Down
7 changes: 7 additions & 0 deletions layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,13 @@ export default {
},
],
navStatistics: [
{
icon: 'mdi-apps',
title: 'Release 207',
to: '/stats/r207',
nuxt: true,
external: false,
},
{
icon: 'mdi-apps',
title: 'Release 202',
Expand Down
5 changes: 3 additions & 2 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ export default {
// Modules: https://go.nuxtjs.dev/config-modules
modules: [// https://go.nuxtjs.dev/axios
'@nuxtjs/axios', // https://go.nuxtjs.dev/pwa
'@nuxtjs/pwa' // https://pwa.nuxtjs.org/
'@nuxtjs/pwa', // https://pwa.nuxtjs.org/
'cookie-universal-nuxt' // https://www.npmjs.com/package/cookie-universal-nuxt
],

// Axios module configuration: https://go.nuxtjs.dev/config-axios
Expand Down Expand Up @@ -120,7 +121,7 @@ export default {
advancedMaxHistory: 50, // Maximum number of history states to retain in advanced search
captchaSiteKey: process.env.CAPTCHA_KEY,
googleAnalyticsId: process.env.GA_TRACKING_ID,
latestStatsPageUrl: '/stats/r202', // this is used to point to the latest stats page,
latestStatsPageUrl: '/stats/r207', // this is used to point to the latest stats page,
nuxtVersion: version
},

Expand Down
80 changes: 71 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"dependencies": {
"@nuxtjs/axios": "^5.13.6",
"@nuxtjs/pwa": "^3.3.5",
"cookie-universal-nuxt": "^2.1.5",
"core-js": "^3.21.1",
"d3-sankey": "^0.12.3",
"d3-scale-chromatic": "^3.0.0",
Expand All @@ -22,7 +23,7 @@
"nuxt": "^2.15.8",
"nuxt-typed-vuex": "^0.3.0",
"vue-gtag": "^1.16.1",
"vuetify": "^2.6.3"
"vuetify": "^2.6.4"
},
"devDependencies": {
"@babel/eslint-parser": "^7.17.0",
Expand Down
Loading

0 comments on commit d8366ec

Please sign in to comment.