Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BEDbase Stats UI #170

Merged
merged 15 commits into from
Mar 12, 2025
117 changes: 110 additions & 7 deletions ui/bedbase-types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export interface paths {
cookie?: never;
};
/**
* Get summary statistics for the DRS object store
* Get summary statistics for BEDbase platform
* @description Returns statistics
*/
get: operations["get_bedbase_db_stats_v1_stats_get"];
Expand All @@ -78,6 +78,26 @@ export interface paths {
patch?: never;
trace?: never;
};
"/v1/detailed-stats": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get detailed statistics for BEDbase platform, including number of files for each genome
* @description Returns detailed statistics
*/
get: operations["get_detailed_stats_v1_detailed_stats_get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/v1/genomes": {
parameters: {
query?: never;
Expand Down Expand Up @@ -118,6 +138,23 @@ export interface paths {
patch?: never;
trace?: never;
};
"/v1/files/{file_path}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/** Redirect To Download */
get: operations["redirect_to_download_v1_files__file_path__get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/v1/bed/example": {
parameters: {
query?: never;
Expand Down Expand Up @@ -971,7 +1008,7 @@ export interface components {
* @description Library source (e.g. genomic, transcriptomic)
* @default
*/
library_source: string;
assay: string;
/**
* Genotype
* @description Genotype of the sample
Expand Down Expand Up @@ -1066,7 +1103,7 @@ export interface components {
* @description Library source (e.g. genomic, transcriptomic)
* @default
*/
library_source: string;
assay: string;
/**
* Genotype
* @description Genotype of the sample
Expand Down Expand Up @@ -1313,6 +1350,21 @@ export interface components {
/** Access Methods */
access_methods?: components["schemas"]["AccessMethod"][];
};
/** FileStats */
FileStats: {
/** File Type */
file_type: {
[key: string]: number;
};
/** File Format */
file_format: {
[key: string]: number;
};
/** File Genome */
file_genome: {
[key: string]: number;
};
};
/** HTTPValidationError */
HTTPValidationError: {
/** Detail */
Expand Down Expand Up @@ -1397,7 +1449,7 @@ export interface components {
* @description Name of species. e.g. Homo sapiens.
* @default
*/
species_name: string;
organism: string;
/**
* Species Id
* @default
Expand Down Expand Up @@ -1443,13 +1495,13 @@ export interface components {
* @description Library source (e.g. genomic, transcriptomic)
* @default
*/
library_source: string;
assay: string;
/**
* Exp Protocol
* @description Experimental protocol (e.g. ChIP-seq)
* @default
*/
assay: string;
exp_protocol: string;
/**
* Antibody
* @description Antibody used in the assay
Expand Down Expand Up @@ -1633,6 +1685,26 @@ export interface operations {
};
};
};
get_detailed_stats_v1_detailed_stats_get: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["FileStats"];
};
};
};
};
get_bedbase_db_stats_v1_genomes_get: {
parameters: {
query?: never;
Expand Down Expand Up @@ -1673,6 +1745,37 @@ export interface operations {
};
};
};
redirect_to_download_v1_files__file_path__get: {
parameters: {
query?: never;
header?: never;
path: {
file_path: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": unknown;
};
};
/** @description Validation Error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
get_example_bed_record_v1_bed_example_get: {
parameters: {
query?: never;
Expand Down Expand Up @@ -2100,7 +2203,7 @@ export interface operations {
text_to_bed_search_v1_bed_search_text_post: {
parameters: {
query: {
query: unknown;
query: string;
limit?: number;
offset?: number;
};
Expand Down
36 changes: 23 additions & 13 deletions ui/package-lock.json

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

1 change: 1 addition & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"bootstrap-icons": "^1.11.3",
"chart.js": "^4.4.2",
"chartjs-chart-error-bars": "^4.4.0",
"chartjs-plugin-datalabels": "^2.2.0",
"framer-motion": "^11.0.20",
"js-yaml": "^4.1.0",
"react": "^18.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ const chartOptions = {
legend: {
position: 'top' as const,
},
datalabels: {
display: false,
},
},
};

Expand Down Expand Up @@ -95,7 +98,7 @@ export const GenomicFeatureBar = (props: Props) => {
}

return (
<div className="border rounded p-2 shadow-sm">
<div className="border rounded p-2 shadow-sm" style={{ height: "calc(100% - 0.5rem - 2px)" }}>
<div className="d-flex flex-column align-items-center justify-content-between h-100">
<div className="d-flex position-relative flex-row align-items-center w-100">
<h4 className="fw-bold text-base text-center w-100">Genomic Features</h4>
Expand Down
3 changes: 1 addition & 2 deletions ui/src/components/bed-splash-components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const BedSplashHeader = (props: Props) => {
<div className="d-flex flex-col align-items-center gap-1 flex-shrink-0">
<a href={`${API_BASE}/bed/${record_identifier}/metadata?full=true`}>
<button className="btn btn-outline-primary btn-sm">
<i className="bi bi-info-circle me-1" />
<i className="bi bi-info-circle me-1"/>
API
</button>
</a>
Expand Down Expand Up @@ -194,7 +194,6 @@ export const BedSplashHeader = (props: Props) => {
className="badge bg-primary border-start border-light rounded-start-0"
role="button"
onClick={() => {
// conditional required to prevent double click
if (showRefGenomeModal !== true) {
setShowRefGenomeModal(true);
}
Expand Down
Loading