Skip to content

Commit

Permalink
(GSoC) Generic Assay Categorical/Binary data implementation Backend (#…
Browse files Browse the repository at this point in the history
…10303)

* update backend

* finish tests

* modify controller file structure

* modify import

* update backend

* finish tests

* modify controller file structure

* refactor some variables

* modify enrichment compare and validate issue

* refactor the controllers and services

* refactor test

* Update GenericAssayEnrichmentServiceImpl.java

* fixed simplification issues

* add inline comments

* modify import

* solve core test issue

* test check

* modify expressionenrichment

* modify imports

* update backend

* finish tests

* modify controller file structure

* modify import

* update backend

* finish tests

* modify controller file structure

* refactor some variables

* modify enrichment compare and validate issue

* refactor the controllers and services

* refactor test

* Update GenericAssayEnrichmentServiceImpl.java

* fixed simplification issues

* add inline comments

* modify import

* solve core test issue

* test check

* modify expressionenrichment

* modify imports

* update imports

* Update GenericAssayEnrichment.java
  • Loading branch information
Djokovic0311 committed Aug 18, 2023
1 parent fe2c82e commit 901406f
Show file tree
Hide file tree
Showing 14 changed files with 1,096 additions and 273 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package org.cbioportal.model;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

public class GenericAssayBinaryEnrichment extends GenericAssayEnrichment {
@NotNull
private List<GenericAssayCountSummary> counts;

public List<GenericAssayCountSummary> getCounts() {
return counts;
}

public void setCounts(List<GenericAssayCountSummary> counts) {
this.counts = counts;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package org.cbioportal.model;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

public class GenericAssayCategoricalEnrichment extends GenericAssayEnrichment {
@NotNull
private BigDecimal qValue;

public BigDecimal getqValue() {
return qValue;
}

public void setqValue(BigDecimal qValue) {
this.qValue = qValue;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package org.cbioportal.model;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

public class GenericAssayCountSummary implements Serializable {

@NotNull
private String name;
@NotNull
private Integer count;
@NotNull
private Integer totalCount;

public Integer getCount() {
return count;
}

public void setCount(Integer count) {
this.count = count;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public Integer getTotalCount() {
return totalCount;
}

public void setTotalCount(Integer totalCount) {
this.totalCount = totalCount;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.cbioportal.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.HashMap;

import javax.validation.constraints.NotNull;
Expand All @@ -11,6 +12,8 @@ public class GenericAssayEnrichment extends ExpressionEnrichment implements Seri
private String stableId;
@NotNull
private String name;
@NotNull
private BigDecimal qValue;
@NotNull
private HashMap<String, String> genericEntityMetaProperties;

Expand All @@ -37,5 +40,16 @@ public HashMap<String, String> getGenericEntityMetaProperties() {
public void setGenericEntityMetaProperties(HashMap<String, String> genericEntityMetaProperties) {
this.genericEntityMetaProperties = genericEntityMetaProperties;
}


public BigDecimal getqValue() {
return qValue;
}

public void setqValue(BigDecimal qValue) {
this.qValue = qValue;
}

public static int compare(GenericAssayEnrichment c1, GenericAssayEnrichment c2) {
return c1.getpValue().compareTo(c2.getpValue());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import org.cbioportal.model.GenericAssayEnrichment;
import org.cbioportal.model.GenomicEnrichment;
import org.cbioportal.model.MolecularProfileCaseIdentifier;
import org.cbioportal.model.GenericAssayBinaryEnrichment;
import org.cbioportal.model.GenericAssayCategoricalEnrichment;
import org.cbioportal.service.exception.MolecularProfileNotFoundException;

public interface ExpressionEnrichmentService {
Expand All @@ -15,8 +17,18 @@ List<GenomicEnrichment> getGenomicEnrichments(String molecularProfileId,
Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
throws MolecularProfileNotFoundException;

List<GenericAssayEnrichment> getGenericAssayEnrichments(String molecularProfileId,
List<GenericAssayEnrichment> getGenericAssayNumericalEnrichments(String molecularProfileId,
Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
throws MolecularProfileNotFoundException;
List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
String molecularProfileId,
Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets,
EnrichmentType enrichmentType)
throws MolecularProfileNotFoundException;

List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichments(String molecularProfileId,
Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets,
EnrichmentType enrichmentType)
throws MolecularProfileNotFoundException;

}
Loading

0 comments on commit 901406f

Please sign in to comment.