Skip to content

Commit

Permalink
Merge pull request #157 from KPMP/develop
Browse files Browse the repository at this point in the history
Release v2.6 (Q4 2024)
  • Loading branch information
rlreamy authored Dec 13, 2024
2 parents 5c5ece0 + c427cb1 commit 2975e8f
Show file tree
Hide file tree
Showing 72 changed files with 1,133 additions and 663 deletions.
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: 2.5.0
IMAGE_TAG: 2.6.0
runs-on: ubuntu-latest
steps:
- name: Get branch names
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ plugins {
}

group = 'kingstonduo'
version = '2.5.0'
version = '2.6.0'

apply plugin: 'java'
apply plugin: 'eclipse'
Expand Down
13 changes: 9 additions & 4 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@

## Release 2.6 (unreleased)
Brief summary of what's in this release:
- Added Primary adjudicated category to the participant summary
- Modified participant summary endpoint to remove "clinicalData" section in favor of individual elements
- Changed tables to refer to enrollment category rather than tissue type

### Breaking changes


### Non-breaking changes

- This version won't work with previous versions of the database because we:
- moved where/how we store clinical data for a participant
- changed the tissue type columns to enrollment category
- This version won't work with previous versions of front end apps because we:
- changed the format of the data returned to refer to enrollment category rather than tissue type
- changed the format of the data returned for participant summary

## Release 2.5 (10/3/2024)
- Java upgrade
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
package org.kpmp;

public enum TissueTypeEnum {
public enum EnrollmentCategoryEnum {

ALL("all", "all"), AKI("aki", "AKI"), CKD("ckd", "CKD"), HEALTHY_REFERENCE("hrt", "Healthy Reference"),
DMR("dmr", "DM-R"), UNKNOWN("", "");

private String requestType;
private String participantTissueType;
private String participantEnrollmentCategory;

private TissueTypeEnum(String requestType, String participantTissueType) {
private EnrollmentCategoryEnum(String requestType, String participantEnrollmentCategory) {
this.requestType = requestType;
this.participantTissueType = participantTissueType;
this.participantEnrollmentCategory = participantEnrollmentCategory;
}

public String getParticipantTissueType() {
return this.participantTissueType;
public String getParticipantEnrollmentCategory() {
return this.participantEnrollmentCategory;
}

public String getRequestType() {
return this.requestType;
}


public static TissueTypeEnum fromRequestType(String requestType) {
public static EnrollmentCategoryEnum fromRequestType(String requestType) {
if (ALL.requestType.equalsIgnoreCase(requestType)) {
return ALL;
} else if (AKI.requestType.equalsIgnoreCase(requestType)) {
Expand Down
41 changes: 26 additions & 15 deletions src/main/java/org/kpmp/QueryController.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
import org.kpmp.geneExpression.*;
import org.kpmp.geneExpressionSummary.GeneExpressionSummary;
import org.kpmp.geneExpressionSummary.GeneExpressionSummaryService;
import org.kpmp.participant.ParticipantClinicalDataset;
import org.kpmp.participant.ParticipantDataTypeSummary;
import org.kpmp.participant.ParticipantRepoDataTypeInformation;
import org.kpmp.participant.ParticipantRepoDataTypeSummary;
import org.kpmp.participant.ParticipantService;
import org.kpmp.participant.ParticipantSummaryDataset;
import org.kpmp.participant.ParticipantTissueTypeSummary;
import org.kpmp.participant.ParticipantEnrollmentCategorySummary;
import org.kpmp.umap.PlotData;
import org.kpmp.umap.UmapDataService;
import org.slf4j.Logger;
Expand Down Expand Up @@ -82,13 +83,13 @@ public CellTypeHierarchy cellTypeHierarchy() throws IOException {

@QueryMapping
public List<? extends GeneExpressionSummary> geneExpressionSummary(@Argument String dataType, @Argument String geneSymbol,
@Argument String cellType, @Argument String tissueType) throws IOException {
@Argument String cellType, @Argument String enrollmentCategory) throws IOException {
List<? extends GeneExpressionSummary> results = new ArrayList<>();
if (cellType.isEmpty()) {
results = geneExpressionSummaryService.getByDataTypeTissueTypeAndGene(dataType, geneSymbol, tissueType);
results = geneExpressionSummaryService.getByDataTypeEnrollmentCategoryAndGene(dataType, geneSymbol, enrollmentCategory);
} else if (geneSymbol.isEmpty()) {
results = geneExpressionSummaryService.getExpressionSummaryPerGeneByCellTypeAndTissueType(dataType,
cellType, tissueType);
results = geneExpressionSummaryService.getExpressionSummaryPerGeneByCellTypeAndEnrollmentCategory(dataType,
cellType, enrollmentCategory);
}
return results;
}
Expand All @@ -99,9 +100,9 @@ public List<ClusterHierarchy> getClusterHieararchies(@Argument String cellType)
}

@QueryMapping
public PlotData getUmapPlotData(@Argument String dataType, @Argument String geneSymbol, @Argument String tissueType) throws Exception {
public PlotData getUmapPlotData(@Argument String dataType, @Argument String geneSymbol, @Argument String enrollmentCategory) throws Exception {
try {
return umapService.getPlotData(dataType, geneSymbol, tissueType);
return umapService.getPlotData(dataType, geneSymbol, enrollmentCategory);
} catch (Exception e) {
logger.error(e.getMessage());
throw e;
Expand Down Expand Up @@ -140,20 +141,20 @@ public List<String> dataTypesForConcept(@Argument String geneSymbol, @Argument S
}

@QueryMapping
public RTExpressionByTissueType getRTGeneExpressionByTissue(@Argument String comparisonType, @Argument String geneSymbol)
public RTExpressionByEnrollmentCategory getRTGeneExpressionByEnrollment(@Argument String comparisonType, @Argument String geneSymbol)
throws Exception {
try {
return rtExpressionDataService.getByComparisonTypeAndGeneSymbolPerTissue(comparisonType, geneSymbol);
return rtExpressionDataService.getByComparisonTypeAndGeneSymbolPerEnrollment(comparisonType, geneSymbol);
} catch (Exception e) {
logger.error(e.getMessage());
throw e;
}
}

@QueryMapping
public RPExpressionByTissueType getRPGeneExpressionByTissueAndProtein(@Argument String geneSymbol, @Argument String protein) throws Exception {
public RPExpressionByEnrollmentCategory getRPGeneExpressionByEnrollmentAndProtein(@Argument String geneSymbol, @Argument String protein) throws Exception {
try {
return rpExpressionDataService.getByGeneSymbolAndProteinPerTissue(geneSymbol, protein);
return rpExpressionDataService.getByGeneSymbolAndProteinPerEnrollment(geneSymbol, protein);
} catch (Exception e) {
logger.error(e.getMessage());
throw e;
Expand Down Expand Up @@ -181,16 +182,26 @@ public List<RPExpressionData> getRPGeneExpressionByStructure(@Argument String st
}

@QueryMapping
public List<RPAccessionGroup> getRPGeneExpressionByTissue(@Argument String geneSymbol)
public List<RPAccessionGroup> getRPGeneExpressionByEnrollment(@Argument String geneSymbol)
throws Exception {
try {
return rpExpressionDataService.getByGeneSymbolPerTissue(geneSymbol);
return rpExpressionDataService.getByGeneSymbolPerEnrollment(geneSymbol);
} catch (Exception e) {
logger.error(e.getMessage());
throw e;
}
}

@QueryMapping
public ParticipantClinicalDataset getParticipantClinicalDataset(@Argument String redcapId) {
try{
return participantService.getParticipantClinicalDataset(redcapId);
}catch (Exception e) {
logger.error(e.getMessage());
throw e;
}
}

@QueryMapping
public ParticipantDataTypeSummary getDataTypeInformationByParticipant(@Argument String redcapId) {
return participantService.getExperimentCounts(redcapId);
Expand Down Expand Up @@ -225,9 +236,9 @@ public ParticipantRepoDataTypeInformation getTotalParticipantFilesCount(@Argumen
}

@QueryMapping
public List<ParticipantTissueTypeSummary> getTissueTypeSummaryData() throws Exception {
public List<ParticipantEnrollmentCategorySummary> getEnrollmentCategorySummaryData() throws Exception {
try {
return participantService.getTissueData();
return participantService.getEnrollmentData();
} catch (Exception e) {
logger.error(e.getMessage());
throw e;
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/org/kpmp/dataSummary/DataSummaryRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ public interface DataSummaryRepository extends CrudRepository<DataSummaryValue,
@Query(value = "select count(distinct(redcap_id)) from participant p "
+ "join file_participant fp on p.participant_id = fp.participant_id "
+ "join file f on f.file_id= fp.file_id " + "join sv_file_info sv on sv.file_id = f.file_id "
+ "where sv.config_type = :data_type " + "and p.tissue_type = :tissue_type "
+ "where sv.config_type = :data_type " + "and p.enrollment_category = :enrollment_category "
+ "and sv.release_sunset_version is null", nativeQuery = true)
Long getDataSummaryCount(@Param("tissue_type") String tissue_type, @Param("data_type") String data_type);
Long getDataSummaryCount(@Param("enrollment_category") String enrollment_category, @Param("data_type") String data_type);

@Cacheable("dataSummaryTotal")
@Query(value = "select count(distinct(redcap_id)) from participant p "
Expand All @@ -26,25 +26,25 @@ public interface DataSummaryRepository extends CrudRepository<DataSummaryValue,
Long getDataSummaryTotal(@Param("data_type") String data_type);

@Cacheable("repoDataSummaryCount")
@Query(value = "select count(distinct(dl_file_id)) from repo_file_v where experimental_strategy = :exp_strat and tissue_type = :tissue_type", nativeQuery = true)
Long getRepoDataSummaryCount(@Param("tissue_type") String tissue_type, @Param("exp_strat") String exp_strat);
@Query(value = "select count(distinct(dl_file_id)) from repo_file_v where experimental_strategy = :exp_strat and enrollment_category = :enrollment_category", nativeQuery = true)
Long getRepoDataSummaryCount(@Param("enrollment_category") String enrollment_category, @Param("exp_strat") String exp_strat);

@Cacheable("repoDataSummaryTotal")
@Query(value = "select count(distinct(dl_file_id)) from repo_file_v where experimental_strategy = :exp_strat", nativeQuery = true)
Long getRepoDataSummaryTotal(@Param("exp_strat") String exp_strat);

@Cacheable("repoBiomarkerSummaryCount")
@Query(value = "select count(distinct(dl_file_id)) from repo_file_v where data_category = 'Biomarker' and tissue_type = :tissue_type", nativeQuery = true)
Long getRepoBiomarkerSummaryCount(@Param("tissue_type") String tissue_type);
@Query(value = "select count(distinct(dl_file_id)) from repo_file_v where data_category = 'Biomarker' and enrollment_category = :enrollment_category", nativeQuery = true)
Long getRepoBiomarkerSummaryCount(@Param("enrollment_category") String enrollment_category);

@Cacheable("repoBiomarkerSummaryTotal")
@Query(value = "select count(distinct(dl_file_id)) from repo_file_v where data_category = 'Biomarker' ", nativeQuery = true)
Long getRepoBiomarkerSummaryTotal();

@Cacheable("dataSummaryLinkCount")
@Query(value = "select count(distinct(redcap_id)) " + "from sv_link_v " + "where data_type = :data_type "
+ "and tissue_type = :tissue_type", nativeQuery = true)
Long getDataSummaryLinkCount(@Param("tissue_type") String tissue_type, @Param("data_type") String data_type);
+ "and enrollment_category = :enrollment_category", nativeQuery = true)
Long getDataSummaryLinkCount(@Param("enrollment_category") String enrollment_category, @Param("data_type") String data_type);

@Cacheable("dataSummaryLinkTotal")
@Query(value = "select count(distinct(redcap_id)) " + "from sv_link_v " + "where data_type = :data_type ", nativeQuery = true)
Expand Down
Loading

0 comments on commit 2975e8f

Please sign in to comment.