diff options
author | Frederick Muriuki Muriithi | 2024-09-19 13:30:20 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-09-19 13:30:20 -0500 |
commit | f909cd13cadab9bd0bb6e816b6c6f492ab18f28a (patch) | |
tree | 612e676d95ac2ee4a0a4c765338ed73c30b674ad /uploader/genotypes/views.py | |
parent | fc99a1700007e8a1b71e07455c57f8692aad2a59 (diff) | |
download | gn-uploader-f909cd13cadab9bd0bb6e816b6c6f492ab18f28a.tar.gz |
List genotype datasets
Diffstat (limited to 'uploader/genotypes/views.py')
-rw-r--r-- | uploader/genotypes/views.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/uploader/genotypes/views.py b/uploader/genotypes/views.py index 2ff9965..294da0e 100644 --- a/uploader/genotypes/views.py +++ b/uploader/genotypes/views.py @@ -15,6 +15,7 @@ from uploader.population.models import (populations_by_species, population_by_species_and_id) from .models import (genotype_markers, + genotype_datasets, genotype_markers_count, genocode_by_population) @@ -97,6 +98,8 @@ def list_genotypes(species_id: int, population_id: int): conn, population_id), total_markers=genotype_markers_count( conn, species_id), + datasets=genotype_datasets( + conn, species_id, population_id), activelink="list-genotypes") @@ -125,3 +128,13 @@ def list_markers(species_id: int): count=count, markers=markers, activelink="list-markers") + +@genotypesbp.route( + "/<int:species_id>/populations/<int:population_id>/genotypes/datasets/" + "<int:dataset_id>/view", + methods=["GET"]) +@require_login +def view_dataset(species_id: int, population_id: int, dataset_id: int): + """View details regarding a specific dataset.""" + return (f"Genotype dataset '{dataset_id}, from population '{population_id}' " + f"of species '{species_id}'.") |