Skip to content

Commit

Permalink
feat: rename "organism" to "taxon" (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterckx committed Nov 17, 2024
1 parent 2b98f8d commit 910ffd2
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion app/apis/catalog/brc-analytics-catalog/common/entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ export interface BRCDataCatalogGenome {
length: number;
level: string;
ncbiTaxonomyId: string;
organism: string;
scaffoldCount: number;
scaffoldL50: number;
scaffoldN50: number;
taxon: string;
ucscBrowserUrl: string | null;
}

Expand Down
2 changes: 1 addition & 1 deletion app/apis/catalog/brc-analytics-catalog/common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export function getGenomeId(genome: BRCDataCatalogGenome): string {

export function getGenomeTitle(genome?: BRCDataCatalogGenome): string {
if (!genome) return "";
return `${genome.organism}`;
return `${genome.taxon}`;
}

export function sanitizeEntityId(entityId?: string): string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,15 @@ export const buildLevel = (
};

/**
* Build props for the organism cell.
* Build props for the taxon cell.
* @param genome - Genome entity.
* @returns Props to be used for the cell.
*/
export const buildOrganism = (
export const buildTaxon = (
genome: BRCDataCatalogGenome
): ComponentProps<typeof C.BasicCell> => {
return {
value: genome.organism,
value: genome.taxon,
};
};

Expand Down Expand Up @@ -289,7 +289,7 @@ export const buildGenomeDetails = (
keyValuePairs.set(
"Taxon",
C.Link({
label: genome.organism,
label: genome.taxon,
url: `https://www.ncbi.nlm.nih.gov/datasets/taxonomy/${encodeURIComponent(
genome.ncbiTaxonomyId
)}/`,
Expand Down Expand Up @@ -321,7 +321,7 @@ function getGenomeEntityChooseAnalysisMethodBreadcrumbs(
): Breadcrumb[] {
return [
{ path: ROUTES.GENOMES, text: "Genomes" },
{ path: "", text: `${genome.organism}` },
{ path: "", text: `${genome.taxon}` },
{ path: "", text: "Choose Analysis Methods" },
];
}
2 changes: 1 addition & 1 deletion files/build-catalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ async function buildGenomes(): Promise<BRCDataCatalogGenome[]> {
length: parseNumber(row.length),
level: row.level,
ncbiTaxonomyId: row.taxonomyId,
organism: row.taxon,
scaffoldCount: parseNumber(row.scaffoldCount),
scaffoldL50: parseNumber(row.scaffoldL50),
scaffoldN50: parseNumber(row.scaffoldN50),
taxon: row.taxon,
ucscBrowserUrl: parseStringOrNull(row.ucscBrowser),
})
);
Expand Down
40 changes: 20 additions & 20 deletions files/out/genomes.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"length": 27007701,
"level": "Chromosome",
"ncbiTaxonomyId": "5855",
"organism": "Plasmodium vivax",
"scaffoldCount": 2747,
"scaffoldL50": 6,
"scaffoldN50": 1678596,
"taxon": "Plasmodium vivax",
"ucscBrowserUrl": "https://genome.ucsc.edu/h/GCF_000002415.2"
},
{
Expand All @@ -27,10 +27,10 @@
"length": 26075494,
"level": "Chromosome",
"ncbiTaxonomyId": "185431",
"organism": "Trypanosoma brucei brucei TREU927",
"scaffoldCount": 12,
"scaffoldL50": 4,
"scaffoldN50": 2481190,
"taxon": "Trypanosoma brucei brucei TREU927",
"ucscBrowserUrl": "https://genome.ucsc.edu/h/GCF_000002445.2"
},
{
Expand All @@ -44,10 +44,10 @@
"length": 32855089,
"level": "Complete Genome",
"ncbiTaxonomyId": "347515",
"organism": "Leishmania major strain Friedlin",
"scaffoldCount": 36,
"scaffoldL50": 11,
"scaffoldN50": 1091540,
"taxon": "Leishmania major strain Friedlin",
"ucscBrowserUrl": "https://genome.ucsc.edu/h/GCF_000002725.2"
},
{
Expand All @@ -61,10 +61,10 @@
"length": 23292622,
"level": "Complete Genome",
"ncbiTaxonomyId": "36329",
"organism": "Plasmodium falciparum 3D7",
"scaffoldCount": 14,
"scaffoldL50": 5,
"scaffoldN50": 1687656,
"taxon": "Plasmodium falciparum 3D7",
"ucscBrowserUrl": "https://genome.ucsc.edu/h/GCF_000002765.5"
},
{
Expand All @@ -78,10 +78,10 @@
"length": 32068771,
"level": "Chromosome",
"ncbiTaxonomyId": "420245",
"organism": "Leishmania braziliensis MHOM/BR/75/M2904",
"scaffoldCount": 138,
"scaffoldL50": 11,
"scaffoldN50": 992961,
"taxon": "Leishmania braziliensis MHOM/BR/75/M2904",
"ucscBrowserUrl": "https://genome.ucsc.edu/h/GCF_000002845.2"
},
{
Expand All @@ -95,10 +95,10 @@
"length": 65633124,
"level": "Chromosome",
"ncbiTaxonomyId": "508771",
"organism": "Toxoplasma gondii ME49",
"scaffoldCount": 2276,
"scaffoldL50": 6,
"scaffoldN50": 4973582,
"taxon": "Toxoplasma gondii ME49",
"ucscBrowserUrl": "https://genome.ucsc.edu/h/GCF_000006565.2"
},
{
Expand All @@ -112,10 +112,10 @@
"length": 28947925,
"level": "Scaffold",
"ncbiTaxonomyId": "246410",
"organism": "Coccidioides immitis RS",
"scaffoldCount": 6,
"scaffoldL50": 3,
"scaffoldN50": 4323945,
"taxon": "Coccidioides immitis RS",
"ucscBrowserUrl": "https://genome.ucsc.edu/h/GCF_000149335.2"
},
{
Expand All @@ -129,10 +129,10 @@
"length": 4411532,
"level": "Complete Genome",
"ncbiTaxonomyId": "83332",
"organism": "Mycobacterium tuberculosis H37Rv",
"scaffoldCount": 1,
"scaffoldL50": 1,
"scaffoldN50": 4411532,
"taxon": "Mycobacterium tuberculosis H37Rv",
"ucscBrowserUrl": null
},
{
Expand All @@ -146,10 +146,10 @@
"length": 89937456,
"level": "Scaffold",
"ncbiTaxonomyId": "5693",
"organism": "Trypanosoma cruzi",
"scaffoldCount": 29495,
"scaffoldL50": 212,
"scaffoldN50": 88624,
"taxon": "Trypanosoma cruzi",
"ucscBrowserUrl": "https://genome.ucsc.edu/h/GCF_000209065.1"
},
{
Expand All @@ -163,10 +163,10 @@
"length": 32444968,
"level": "Chromosome",
"ncbiTaxonomyId": "5661",
"organism": "Leishmania donovani",
"scaffoldCount": 36,
"scaffoldL50": 11,
"scaffoldN50": 1024085,
"taxon": "Leishmania donovani",
"ucscBrowserUrl": "https://genome.ucsc.edu/h/GCF_000227135.1"
},
{
Expand All @@ -180,10 +180,10 @@
"length": 4411709,
"level": "Complete Genome",
"ncbiTaxonomyId": "83332",
"organism": "Mycobacterium tuberculosis H37Rv",
"scaffoldCount": 1,
"scaffoldL50": 1,
"scaffoldN50": 4411709,
"taxon": "Mycobacterium tuberculosis H37Rv",
"ucscBrowserUrl": null
},
{
Expand All @@ -197,10 +197,10 @@
"length": 196858,
"level": "Complete Genome",
"ncbiTaxonomyId": "10244",
"organism": "Monkeypox virus",
"scaffoldCount": 1,
"scaffoldL50": 1,
"scaffoldN50": 196858,
"taxon": "Monkeypox virus",
"ucscBrowserUrl": null
},
{
Expand All @@ -214,10 +214,10 @@
"length": 29903,
"level": "Complete Genome",
"ncbiTaxonomyId": "2697049",
"organism": "Severe acute respiratory syndrome coronavirus 2",
"scaffoldCount": 1,
"scaffoldL50": 1,
"scaffoldN50": 29903,
"taxon": "Severe acute respiratory syndrome coronavirus 2",
"ucscBrowserUrl": null
},
{
Expand All @@ -231,10 +231,10 @@
"length": 566339288,
"level": "Chromosome",
"ncbiTaxonomyId": "42434",
"organism": "Culex pipiens pallens",
"scaffoldCount": 289,
"scaffoldL50": 2,
"scaffoldN50": 186194774,
"taxon": "Culex pipiens pallens",
"ucscBrowserUrl": null
},
{
Expand All @@ -248,10 +248,10 @@
"length": 28193268,
"level": "Complete Genome",
"ncbiTaxonomyId": "443226",
"organism": "Coccidioides posadasii str. Silveira",
"scaffoldCount": 9,
"scaffoldL50": 2,
"scaffoldN50": 8079863,
"taxon": "Coccidioides posadasii str. Silveira",
"ucscBrowserUrl": "https://genome.ucsc.edu/h/GCA_018416015.2"
},
{
Expand All @@ -265,10 +265,10 @@
"length": 4516435,
"level": "Complete Genome",
"ncbiTaxonomyId": "1773",
"organism": "Mycobacterium tuberculosis",
"scaffoldCount": 1,
"scaffoldL50": 1,
"scaffoldN50": 4516435,
"taxon": "Mycobacterium tuberculosis",
"ucscBrowserUrl": null
},
{
Expand All @@ -282,10 +282,10 @@
"length": 23043114,
"level": "Complete Genome",
"ncbiTaxonomyId": "5861",
"organism": "Plasmodium yoelii",
"scaffoldCount": 14,
"scaffoldL50": 5,
"scaffoldN50": 2046250,
"taxon": "Plasmodium yoelii",
"ucscBrowserUrl": "https://genome.ucsc.edu/h/GCF_900002385.2"
},
{
Expand All @@ -299,10 +299,10 @@
"length": 18338688,
"level": "Complete Genome",
"ncbiTaxonomyId": "54757",
"organism": "Plasmodium vinckei vinckei",
"scaffoldCount": 14,
"scaffoldL50": 5,
"scaffoldN50": 1692345,
"taxon": "Plasmodium vinckei vinckei",
"ucscBrowserUrl": "https://genome.ucsc.edu/h/GCF_900681995.1"
},
{
Expand All @@ -316,10 +316,10 @@
"length": 264451381,
"level": "Chromosome",
"ncbiTaxonomyId": "7165",
"organism": "Anopheles gambiae",
"scaffoldCount": 190,
"scaffoldL50": 2,
"scaffoldN50": 99149756,
"taxon": "Anopheles gambiae",
"ucscBrowserUrl": "https://genome.ucsc.edu/h/GCF_943734735.2"
},
{
Expand All @@ -333,10 +333,10 @@
"length": 4469156,
"level": "Complete Genome",
"ncbiTaxonomyId": "1773",
"organism": "Mycobacterium tuberculosis",
"scaffoldCount": 1,
"scaffoldL50": 1,
"scaffoldN50": 4469156,
"taxon": "Mycobacterium tuberculosis",
"ucscBrowserUrl": null
}
]
4 changes: 2 additions & 2 deletions site-config/brc-analytics/category.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ export const BRC_DATA_CATALOG_CATEGORY_KEY = {
IS_REF: "isRef",
LENGTH: "length",
LEVEL: "level",
ORGANISM: "organism",
SCAFFOLD_COUNT: "scaffoldCount",
SCAFFOLD_L50: "scaffoldL50",
SCAFFOLD_N50: "scaffoldN50",
TAXON: "taxon",
TAXONOMY_ID: "ncbiTaxonomyId",
UCSC_BROWSER_URL: "ucscBrowserUrl",
};
Expand All @@ -26,10 +26,10 @@ export const BRC_DATA_CATALOG_CATEGORY_LABEL = {
IS_REF: "Is Reference",
LENGTH: "Length",
LEVEL: "Level",
ORGANISM: "Organism",
SCAFFOLD_COUNT: "Scaffolds",
SCAFFOLD_L50: "Scaffold L50",
SCAFFOLD_N50: "Scaffold N50",
TAXON: "Taxon",
TAXONOMY_ID: "Taxonomy ID",
UCSC_BROWSER_URL: "UCSC Browser",
};
12 changes: 6 additions & 6 deletions site-config/brc-analytics/local/index/genomeEntityConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export const genomeEntityConfig: BRCEntityConfig<BRCDataCatalogGenome> = {
{
categoryConfigs: [
{
key: BRC_DATA_CATALOG_CATEGORY_KEY.ORGANISM,
label: BRC_DATA_CATALOG_CATEGORY_LABEL.ORGANISM,
key: BRC_DATA_CATALOG_CATEGORY_KEY.TAXON,
label: BRC_DATA_CATALOG_CATEGORY_LABEL.TAXON,
},
{
key: BRC_DATA_CATALOG_CATEGORY_KEY.TAXONOMY_ID,
Expand Down Expand Up @@ -99,10 +99,10 @@ export const genomeEntityConfig: BRCEntityConfig<BRCDataCatalogGenome> = {
{
componentConfig: {
component: C.BasicCell,
viewBuilder: V.buildOrganism,
viewBuilder: V.buildTaxon,
} as ComponentConfig<typeof C.BasicCell, BRCDataCatalogGenome>,
header: BRC_DATA_CATALOG_CATEGORY_LABEL.ORGANISM,
id: BRC_DATA_CATALOG_CATEGORY_KEY.ORGANISM,
header: BRC_DATA_CATALOG_CATEGORY_LABEL.TAXON,
id: BRC_DATA_CATALOG_CATEGORY_KEY.TAXON,
width: { max: "1fr", min: "284px" },
},
{
Expand Down Expand Up @@ -217,7 +217,7 @@ export const genomeEntityConfig: BRCEntityConfig<BRCDataCatalogGenome> = {
],
defaultSort: {
desc: SORT_DIRECTION.ASCENDING,
id: BRC_DATA_CATALOG_CATEGORY_KEY.ORGANISM,
id: BRC_DATA_CATALOG_CATEGORY_KEY.TAXON,
},
} as ListConfig<BRCDataCatalogGenome>,
listView: {
Expand Down

0 comments on commit 910ffd2

Please sign in to comment.