Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
175c36d
KPMP-6359: Remove unused code
zwright Dec 4, 2025
f19bff3
KPMP-6359: Remove unused code 2
zwright Dec 4, 2025
3d8d5aa
KPMP-6359: Remove unused code 3
zwright Dec 4, 2025
252cb02
KPMP-6359: Remove unused code 4
zwright Dec 4, 2025
8003f61
KPMP-6359: Remove unused code 5
zwright Dec 4, 2025
9dfe32e
KPMP-6359: Remove unused code 6
zwright Dec 4, 2025
67854b8
KPMP-6359: Remove unused code 7
zwright Dec 4, 2025
9f99bfc
KPMP-6359: Remove unused code 8
zwright Dec 4, 2025
6457b25
KPMP-6359: Remove unused code 8
zwright Dec 4, 2025
92aa2c2
KPMP-6359: Remove unused code 9
zwright Dec 4, 2025
814a24e
KPMP-6359: Fix tests
zwright Dec 4, 2025
83e9be1
KPMP-6359: Fix tests 2
zwright Dec 4, 2025
a520d4b
KPMP-6359: Fix graphql
zwright Dec 4, 2025
3aa3062
KPMP-6359: More graphql fixed
zwright Dec 5, 2025
92b2401
Merge pull request #198 from KPMP/KPMP-6359_remove_old_code
rlreamy Jan 5, 2026
4937fd5
add fake data to endpoint
Dert1129 Jan 20, 2026
59263f3
Merge pull request #203 from KPMP/KPMP-6504_return-fake-st-data
rlreamy Jan 20, 2026
7ad2a42
KPMP-6505: placeholder data for spatial transcriptomics
HaneenT Jan 26, 2026
8b9f00a
Merge pull request #204 from KPMP/KPMP-6505_datatypesummaryinfo_ST_pl…
zwright Jan 27, 2026
8c4111c
KPMP-6538: added code to return the ontology id to cell type mapping
rlreamy Feb 26, 2026
79531e4
KPMP-6538: Fix mapping
rlreamy Mar 2, 2026
78501e7
Merge pull request #205 from KPMP/KPMP-6538_HubmapMapping
zwright Mar 2, 2026
75a5e07
Update build-gradle-project.yml
rlreamy Mar 3, 2026
f3931de
Update build.gradle
rlreamy Mar 3, 2026
04495a8
KPMP-6335: add id class
zwright Mar 3, 2026
fe34d67
KPMP-6335: add tests
zwright Mar 4, 2026
c45dcfa
KPMP-6335: fix repo id
zwright Mar 4, 2026
2d4956f
Merge pull request #206 from KPMP/KPMP-6335_Fix_Dupes
rlreamy Mar 5, 2026
c285376
update base image
Dert1129 Mar 27, 2026
37821a4
Merge pull request #207 from KPMP/KPMP-6419_address-vulns
HaneenT Mar 27, 2026
3e4f8d6
update change log
Dert1129 Mar 30, 2026
9a3cb95
remove item from change lgo
Dert1129 Mar 30, 2026
d44c44b
Merge pull request #208 from KPMP/update-changelog
zwright Mar 30, 2026
d8f76c3
increase version number
Dert1129 Mar 30, 2026
9d1b1d6
upgrade version
Dert1129 Mar 30, 2026
9515f34
Merge pull request #210 from KPMP/increase-version
Dert1129 Mar 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
687 changes: 11 additions & 676 deletions .classpath

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/workflows/build-gradle-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
build-gradle-project:
env:
IMAGE_TAG: 3.1.0
IMAGE_TAG: 3.3.0
runs-on: ubuntu-latest
steps:
- name: Get branch names
Expand Down
2 changes: 1 addition & 1 deletion .java-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
11
21.0.4
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=linux/amd64 alpine:3.19.1
FROM --platform=linux/amd64 alpine:3.21.6

RUN apk update
RUN apk add openjdk21
Expand Down
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ plugins {
}

group = 'kingstonduo'
version = '3.1.0'
version = '3.3.0'

apply plugin: 'java'
apply plugin: 'eclipse'
Expand Down Expand Up @@ -45,6 +45,7 @@ dependencies {
implementation 'org.springframework.graphql:spring-graphql'
implementation 'org.springframework.boot:spring-boot-starter-cache'
implementation 'com.hazelcast:hazelcast-all:4.2.5'
implementation 'com.graphql-java:graphql-java-extended-scalars:21.0'

testImplementation('org.mockito:mockito-junit-jupiter:3.12.4')
testImplementation 'org.springframework.boot:spring-boot-starter-test'
Expand Down
8 changes: 7 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# Changelog

## Release 3.2 (unreleased)
## Release 3.3 (unreleased)

---

## Release 3.2
Brief summary:
- return HUBMAP cell type ontology ID
- fixed duplicate data being returned for Regional Transcriptomics data

### Breaking changes

Expand Down
8 changes: 8 additions & 0 deletions src/main/java/org/kpmp/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import graphql.scalars.ExtendedScalars;
import org.springframework.graphql.execution.RuntimeWiringConfigurer;

@Configuration
@EnableCaching
@SpringBootApplication
Expand All @@ -28,4 +31,9 @@ public void addCorsMappings(CorsRegistry registry) {
}
};
}

@Bean
public RuntimeWiringConfigurer runtimeWiringConfigurer() {
return wiringBuilder -> wiringBuilder.scalar(ExtendedScalars.Json);
}
}
113 changes: 23 additions & 90 deletions src/main/java/org/kpmp/QueryController.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,26 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.kpmp.atlasMessage.AtlasMessage;
import org.kpmp.atlasMessage.AtlasMessageService;
import org.kpmp.autocomplete.AutocompleteResult;
import org.kpmp.autocomplete.AutocompleteService;
import org.kpmp.cellType.CellTypeHierarchy;
import org.kpmp.cellType.CellTypeService;
import org.kpmp.cellType.HubmapCellTypeMappingService;
import org.kpmp.cellType.HubmapOntologyCellType;
import org.kpmp.cellTypeSummary.ClusterHierarchy;
import org.kpmp.cellTypeSummary.ClusterHierarchyService;
import org.kpmp.dataSummary.AtlasRepoSummaryResult;
import org.kpmp.dataSummary.DataSummaryService;
import org.kpmp.dataSummary.DataTypeSummary;
import org.kpmp.geneExpression.*;
import org.kpmp.geneExpressionSummary.GeneExpressionSummary;
import org.kpmp.geneExpressionSummary.GeneExpressionSummaryService;
import org.kpmp.geneExpressionSummary.GeneExpressionSummaryService2025;
import org.kpmp.participant.ParticipantClinicalDataset;
import org.kpmp.participant.ParticipantDataTypeSummary;
import org.kpmp.participant.ParticipantDataTypeSummary2025;
import org.kpmp.participant.ParticipantRepoDataTypeInformation;
import org.kpmp.participant.ParticipantRepoDataTypeSummary;
import org.kpmp.participant.ParticipantService;
import org.kpmp.participant.ParticipantService2025;
import org.kpmp.participant.ParticipantSummaryDataset;
import org.kpmp.participant.ParticipantEnrollmentCategorySummary;
import org.kpmp.participant.*;
import org.kpmp.umap.PlotData;
import org.kpmp.umap.UmapDataService;
import org.kpmp.umap.UmapDataService2025;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -45,71 +38,47 @@ public class QueryController implements GraphQLQueryResolver {

private AutocompleteService autocompleteService;
private CellTypeService cellTypeService;
private GeneExpressionSummaryService geneExpressionSummaryService;
private GeneExpressionSummaryService2025 geneExpressionSummaryService2025;
private DataSummaryService dataSummaryService;
private UmapDataService umapService;
private UmapDataService2025 umapService2025;
private ClusterHierarchyService clusterHierarchyService;
private RTExpressionDataService rtExpressionDataService;

private RPExpressionDataService rpExpressionDataService;
private ParticipantService participantService;
private ParticipantService2025 participantService2025;
private AtlasMessageService atlasMessageService;
private HubmapCellTypeMappingService hubmapCellTypeMappingService;
private Logger logger = LoggerFactory.getLogger(QueryController.class);

@Autowired
public QueryController(AutocompleteService autocompleteService, CellTypeService cellTypeService,
UmapDataService umapService, UmapDataService2025 umapService2025, GeneExpressionSummaryService geneExpressionSummaryService,
public QueryController(AutocompleteService autocompleteService, CellTypeService cellTypeService, UmapDataService2025 umapService2025,
GeneExpressionSummaryService2025 geneExpressionService2025,
DataSummaryService dataSummaryService, ClusterHierarchyService clusterHierarchyService,
RTExpressionDataService rtExpressionDataService, RPExpressionDataService rpExpressionDataService,
ParticipantService participantService, ParticipantService2025 participantService2025, AtlasMessageService atlasMessageService) {
RTExpressionDataService rtExpressionDataService, RPExpressionDataService rpExpressionDataService, ParticipantService2025 participantService2025,
AtlasMessageService atlasMessageService, HubmapCellTypeMappingService hubmapCellTypeMappingService) {

this.autocompleteService = autocompleteService;
this.cellTypeService = cellTypeService;
this.umapService = umapService;
this.umapService2025 = umapService2025;
this.geneExpressionSummaryService = geneExpressionSummaryService;
this.geneExpressionSummaryService2025 = geneExpressionService2025;
this.dataSummaryService = dataSummaryService;
this.clusterHierarchyService = clusterHierarchyService;
this.rtExpressionDataService = rtExpressionDataService;
this.rpExpressionDataService = rpExpressionDataService;
this.participantService = participantService;
this.participantService2025 = participantService2025;
this.atlasMessageService = atlasMessageService;
this.hubmapCellTypeMappingService = hubmapCellTypeMappingService;
}

@QueryMapping
public List<AutocompleteResult> autocomplete(@Argument String searchTerm) throws IOException, Exception {
return autocompleteService.query(searchTerm);
}

@QueryMapping
public CellTypeHierarchy cellTypeHierarchy() throws IOException {
return cellTypeService.getCellTypeHierarchy();
}

@QueryMapping
public CellTypeHierarchy cellTypeHierarchy2025() throws IOException {
return cellTypeService.getCellTypeHierarchy2025();
}

@QueryMapping
public List<? extends GeneExpressionSummary> geneExpressionSummary(@Argument String dataType, @Argument String geneSymbol,
@Argument String cellType, @Argument String enrollmentCategory) throws IOException {
List<? extends GeneExpressionSummary> results = new ArrayList<>();
if (cellType.isEmpty()) {
results = geneExpressionSummaryService.getByDataTypeEnrollmentCategoryAndGene(dataType, geneSymbol, enrollmentCategory);
} else if (geneSymbol.isEmpty()) {
results = geneExpressionSummaryService.getExpressionSummaryPerGeneByCellTypeAndEnrollmentCategory(dataType,
cellType, enrollmentCategory);
}
return results;
}

@QueryMapping
public List<? extends GeneExpressionSummary> geneExpressionSummary2025(@Argument String dataType, @Argument String geneSymbol,
@Argument String cellType, @Argument String enrollmentCategory) throws IOException {
Expand All @@ -123,26 +92,11 @@ public List<? extends GeneExpressionSummary> geneExpressionSummary2025(@Argument
return results;
}

@QueryMapping
public List<ClusterHierarchy> getClusterHieararchies(@Argument String cellType) throws IOException {
return clusterHierarchyService.findClustersByCellType(cellType);
}

@QueryMapping
public List<ClusterHierarchy> getClusterHieararchies2025(@Argument String cellType) throws IOException {
return clusterHierarchyService.findClustersByCellType2025(cellType);
}

@QueryMapping
public PlotData getUmapPlotData(@Argument String dataType, @Argument String geneSymbol, @Argument String enrollmentCategory) throws Exception {
try {
return umapService.getPlotData(dataType, geneSymbol, enrollmentCategory);
} catch (Exception e) {
logger.error(e.getMessage());
throw e;
}
}

@QueryMapping
public PlotData getUmapPlotData2025(@Argument String dataType, @Argument String geneSymbol, @Argument String enrollmentCategory) throws Exception {
try {
Expand All @@ -153,16 +107,6 @@ public PlotData getUmapPlotData2025(@Argument String dataType, @Argument String
}
}

@QueryMapping
public List<DataTypeSummary> getDataTypeSummaryInformation() throws Exception {
try {
return geneExpressionSummaryService.getDataTypeSummaryInformation();
} catch (Exception e) {
logger.error(e.getMessage());
throw e;
}
}

@QueryMapping
public List<DataTypeSummary> getDataTypeSummaryInformation2025() throws Exception {
try {
Expand All @@ -183,21 +127,10 @@ public List<DataTypeSummary> getSummaryData() throws Exception {
}
}

@QueryMapping
public List<String> dataTypesForConcept(@Argument String geneSymbol, @Argument String clusterName) throws Exception {
if (geneSymbol != null && !geneSymbol.isEmpty()) {
return geneExpressionSummaryService.findDataTypesByGene(geneSymbol);
} else if (clusterName != null && !clusterName.isEmpty()) {
return clusterHierarchyService.findDataTypesByClusterName(clusterName);
}
throw new Exception("Must provide either a cluster or a gene symbol.");

}

@QueryMapping
public List<String> dataTypesForConcept2025(@Argument String geneSymbol, @Argument String clusterName) throws Exception {
if (geneSymbol != null && !geneSymbol.isEmpty()) {
return geneExpressionSummaryService.findDataTypesByGene(geneSymbol);
return geneExpressionSummaryService2025.findDataTypesByGene(geneSymbol);
} else if (clusterName != null && !clusterName.isEmpty()) {
return clusterHierarchyService.findDataTypesByClusterName2025(clusterName);
}
Expand Down Expand Up @@ -260,32 +193,27 @@ public List<RPAccessionGroup> getRPGeneExpressionByEnrollment(@Argument String g
@QueryMapping
public ParticipantClinicalDataset getParticipantClinicalDataset(@Argument String redcapId) {
try{
return participantService.getParticipantClinicalDataset(redcapId);
return participantService2025.getParticipantClinicalDataset(redcapId);
}catch (Exception e) {
logger.error(e.getMessage());
throw e;
}
}

@QueryMapping
public ParticipantDataTypeSummary getDataTypeInformationByParticipant(@Argument String redcapId) {
return participantService.getExperimentCounts(redcapId);
}

@QueryMapping
public ParticipantDataTypeSummary2025 getDataTypeInformationByParticipant2025(@Argument String redcapId) {
return participantService2025.getExperimentCounts(redcapId);
}

@QueryMapping
public ParticipantRepoDataTypeSummary getRepoDataTypeInformationByParticipant(@Argument String redcapId) {
return participantService.getDataTypeCounts(redcapId);
}
public ParticipantRepoDataTypeSummary getRepoDataTypeInformationByParticipant(@Argument String redcapId) {
return participantService2025.getDataTypeCounts(redcapId);
}

@QueryMapping
public ParticipantSummaryDataset participantSummaryDataset(@Argument String redcapId) throws Exception {
try {
return participantService.getParticipantSummaryDataset(redcapId);
return participantService2025.getParticipantSummaryDataset(redcapId);
} catch (Exception e) {
logger.error(e.getMessage());
ParticipantSummaryDataset emptyResult = new ParticipantSummaryDataset();
Expand All @@ -298,7 +226,7 @@ public ParticipantSummaryDataset participantSummaryDataset(@Argument String redc
@QueryMapping
public ParticipantRepoDataTypeInformation getTotalParticipantFilesCount(@Argument String redcapId) throws Exception {
try {
return this.participantService.getTotalFilesCount(redcapId);
return this.participantService2025.getTotalFilesCount(redcapId);
} catch (Exception e) {
logger.error(e.getMessage());
throw e;
Expand All @@ -308,7 +236,7 @@ public ParticipantRepoDataTypeInformation getTotalParticipantFilesCount(@Argumen
@QueryMapping
public List<ParticipantEnrollmentCategorySummary> getEnrollmentCategorySummaryData() throws Exception {
try {
return participantService.getEnrollmentData();
return participantService2025.getEnrollmentData();
} catch (Exception e) {
logger.error(e.getMessage());
throw e;
Expand Down Expand Up @@ -337,6 +265,11 @@ public List<AtlasMessage> getAtlasMessages() throws Exception {

@QueryMapping
public List<ParticipantRepoDataTypeInformation> getExperimentalStrategyCountsByParticipant(@Argument String redcapId) {
return participantService.getExperimentalStrategyCountsByParticipant(redcapId);
return participantService2025.getExperimentalStrategyCountsByParticipant(redcapId);
}

@QueryMapping
public List<HubmapOntologyCellType> getHubmapTermMap() {
return hubmapCellTypeMappingService.buildHubmapIdToCellTypeMap();
}
}
3 changes: 0 additions & 3 deletions src/main/java/org/kpmp/cellType/CellTypeRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ public interface CellTypeRepository extends CrudRepository<CellType, Integer> {
+ " WHERE ct.cell_type LIKE %:searchTerm% ", nativeQuery = true)
List<CellType> findByCellTypeContainingOrSynonymContaining(@Param("searchTerm") String searchTerm);

@Cacheable("cellTypeIsNotNullOrderByCellTypeOrdering")
List<CellType> findAllByCellTypeIsNotNullOrderByCellTypeOrdering();

@Cacheable("cellTypeIsNotNullOrderByCellTypeOrdering2025")
@Query(value = "SELECT * FROM cell_type_2025 WHERE cell_type IS NOT NULL ORDER BY cell_type_order ASC", nativeQuery = true)
List<CellType> findAllByCellTypeIsNotNullOrderByCellTypeOrdering2025();
Expand Down
15 changes: 0 additions & 15 deletions src/main/java/org/kpmp/cellType/CellTypeService.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,6 @@ public CellTypeService(CellTypeRepository cellTypeRepo) {
this.cellTypeRepo = cellTypeRepo;
}

public CellTypeHierarchy getCellTypeHierarchy() {
List<CellType> cellTypes = cellTypeRepo.findAllByCellTypeIsNotNullOrderByCellTypeOrdering();
CellTypeHierarchy hierarchy = new CellTypeHierarchy();

for (CellType cellType : cellTypes) {
CellTypeStructureSubregion subregion = new CellTypeStructureSubregion(cellType.getStructureSubregion());
subregion.addCellType(cellType);
CellTypeStructureRegion region = new CellTypeStructureRegion(cellType.getStructureRegion());
region.addCellTypeSubregion(subregion);
hierarchy.addCellTypeStructureRegion(region);
}

return hierarchy;
}

public CellTypeHierarchy getCellTypeHierarchy2025() {
List<CellType> cellTypes = cellTypeRepo.findAllByCellTypeIsNotNullOrderByCellTypeOrdering2025();
CellTypeHierarchy hierarchy = new CellTypeHierarchy();
Expand Down
18 changes: 18 additions & 0 deletions src/main/java/org/kpmp/cellType/HubmapCellTypeMappingService.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package org.kpmp.cellType;

import java.util.List;
import org.springframework.stereotype.Service;

@Service
public class HubmapCellTypeMappingService {

private final HubmapOnotologyCellTypeRepository repo;

public HubmapCellTypeMappingService(HubmapOnotologyCellTypeRepository repo) {
this.repo = repo;
}

public List<HubmapOntologyCellType> buildHubmapIdToCellTypeMap() {
return repo.findAll();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package org.kpmp.cellType;

import org.jetbrains.annotations.NotNull;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface HubmapOnotologyCellTypeRepository extends CrudRepository<HubmapOntologyCellType, String> {

@NotNull
@Cacheable("hubmapOntologyCellTypeMap")
List<HubmapOntologyCellType> findAll();
}
Loading
Loading