diff --git a/docs/releases/v2.12.0.md b/docs/releases/v2.12.0.md new file mode 100644 index 0000000000000000000000000000000000000000..9af41c221a2b364cb69e74b65365fb5cdbbc1c6c --- /dev/null +++ b/docs/releases/v2.12.0.md @@ -0,0 +1,5 @@ +# v2.12.0 + +## Feature + +- enable rat connectivity diff --git a/package.json b/package.json index 4ea49304574b3072c6f16f5690b98a624b3558ba..9414f748771618ee48197f0ef0e3e58c898c0f0c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "siibra-explorer", - "version": "2.11.2", + "version": "2.12.0", "description": "siibra-explorer - explore brain atlases. Based on humanbrainproject/nehuba & google/neuroglancer. Built with angular", "scripts": { "lint": "eslint src --ext .ts", diff --git a/src/atlasComponents/sapi/sapi.service.ts b/src/atlasComponents/sapi/sapi.service.ts index bf83652addca6154bc509ef4ce7b3c25e743f752..7afa3871728516ca4ebd63c10e08b6cf88526ab7 100644 --- a/src/atlasComponents/sapi/sapi.service.ts +++ b/src/atlasComponents/sapi/sapi.service.ts @@ -296,7 +296,7 @@ export class SAPI{ switchMap(atlases => forkJoin( atlases.items.map(atlas => translateV3Entities.translateAtlas(atlas)) )), - map(atlases => atlases.sort((a, b) => speciesOrder.indexOf(a.species) - speciesOrder.indexOf(b.species))), + map(atlases => atlases.sort((a, b) => (speciesOrder as string[]).indexOf(a.species) - (speciesOrder as string[]).indexOf(b.species))), tap(() => { const respVersion = SAPI.API_VERSION if (respVersion !== EXPECTED_SIIBRA_API_VERSION) { diff --git a/src/features/entry/entry.component.ts b/src/features/entry/entry.component.ts index 610af8724d495501def8df5fc6ead5e761f9b17f..e4cfbe75e126083681838c1fe815bca654737345 100644 --- a/src/features/entry/entry.component.ts +++ b/src/features/entry/entry.component.ts @@ -10,6 +10,7 @@ import { CategoryAccDirective } from "../category-acc.directive" import { combineLatest, concat, forkJoin, merge, of, Subject, Subscription } from 'rxjs'; import { DsExhausted, IsAlreadyPulling, PulledDataSource } from 'src/util/pullable'; import { TranslatedFeature } from '../list/list.directive'; +import { SPECIES_ENUM } from 'src/util/constants'; const categoryAcc = <T extends Record<string, unknown>>(categories: T[]) => { const returnVal: Record<string, T[]> = {} @@ -148,10 +149,10 @@ export class EntryComponent extends FeatureBase implements AfterViewInit, OnDest public showConnectivity$ = combineLatest([ this.selectedAtlas$.pipe( - map(atlas => atlas?.species === "Homo sapiens") + map(atlas => atlas?.species === SPECIES_ENUM.HOMO_SAPIENS || atlas?.species === SPECIES_ENUM.RATTUS_NORVEGICUS) ), this.TPRBbox$.pipe( - map(({ parcellation }) => parcellation?.id === IDS.PARCELLATION.JBA29) + map(({ parcellation }) => parcellation?.id === IDS.PARCELLATION.JBA29 || parcellation?.id === IDS.PARCELLATION.WAXHOLMV4) ) ]).pipe( map(flags => flags.every(f => f)) diff --git a/src/util/constants.ts b/src/util/constants.ts index 001b1283945568cc84378cc55b4f06a41f02f866..763bc0695829eec89caa1c15c41d86be61d720ad 100644 --- a/src/util/constants.ts +++ b/src/util/constants.ts @@ -126,14 +126,21 @@ export const UNSUPPORTED_PREVIEW = [{ export const UNSUPPORTED_INTERVAL = 7000 +export const SPECIES_ENUM = { + HOMO_SAPIENS: "Homo sapiens", + MACACA_FASCICULARIS: "Macaca fascicularis", + RATTUS_NORVEGICUS: "Rattus norvegicus", + MUS_MUSCULUS: "Mus musculus", +} as const + /** * atlas should follow the following order */ export const speciesOrder = [ - "Homo sapiens", - "Macaca fascicularis", - "Rattus norvegicus", - "Mus musculus" + SPECIES_ENUM.HOMO_SAPIENS, + SPECIES_ENUM.MACACA_FASCICULARIS, + SPECIES_ENUM.RATTUS_NORVEGICUS, + SPECIES_ENUM.MUS_MUSCULUS, ] export const parcBanList: string[] = [