-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement gene API module for fetching symbols and gene details…
…, update theme configuration
- Loading branch information
Showing
6 changed files
with
57 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// src/api/geneApi.js | ||
import axios from 'axios'; | ||
import geneApiConfig from '@/config/geneApiConfig.json'; | ||
|
||
/** | ||
* Fetch the index of gene symbols. | ||
* @returns {Promise<Array>} The symbols index. | ||
*/ | ||
export async function fetchSymbolsIndex() { | ||
const response = await axios.get(geneApiConfig.symbolsIndexUrl); | ||
return response.data; | ||
} | ||
|
||
/** | ||
* Fetch detailed gene data for a given symbol. | ||
* @param {string} symbol - The gene symbol. | ||
* @returns {Promise<Object>} The gene data. | ||
*/ | ||
export async function fetchGeneDetails(symbol) { | ||
// Construct the URL using the base URL from config and the symbol. | ||
const url = `${geneApiConfig.geneDetailsBaseUrl}${symbol}.json`; | ||
const response = await axios.get(url); | ||
return response.data; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"symbolsIndexUrl": "https://raw.githubusercontent.com/halbritter-lab/nephro_candidate_score/refs/heads/main/gene_score/predictions/results/json/symbols_index.json", | ||
"geneDetailsBaseUrl": "https://raw.githubusercontent.com/halbritter-lab/nephro_candidate_score/refs/heads/main/gene_score/predictions/results/json/symbols/" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"defaultTheme": "dark" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,29 @@ | ||
// main.js | ||
|
||
import { createApp } from 'vue' | ||
import App from './App.vue' | ||
import router from './router'; // Import the router | ||
// src/main.js | ||
import { createApp } from 'vue'; | ||
import App from './App.vue'; | ||
import router from './router'; | ||
|
||
// Vuetify | ||
import 'vuetify/styles' | ||
import { createVuetify } from 'vuetify' | ||
import * as components from 'vuetify/components' | ||
import * as directives from 'vuetify/directives' | ||
import 'vuetify/styles'; | ||
import { createVuetify } from 'vuetify'; | ||
import * as components from 'vuetify/components'; | ||
import * as directives from 'vuetify/directives'; | ||
|
||
// Material Design Icons | ||
import "@mdi/font/css/materialdesignicons.css"; | ||
|
||
// Import the theme configuration | ||
import themeConfig from '@/config/themeConfig.json'; | ||
|
||
const vuetify = createVuetify({ | ||
components, | ||
directives, | ||
theme: { | ||
defaultTheme: 'dark' | ||
defaultTheme: themeConfig.defaultTheme | ||
} | ||
}) | ||
}); | ||
|
||
createApp(App) | ||
.use(vuetify) | ||
.use(router) // Use the router | ||
.mount('#app') | ||
.use(router) | ||
.mount('#app'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters