-
Notifications
You must be signed in to change notification settings - Fork 560
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/mutated genes total profiled counts and gene panels (#10824)
* Add Support for TotalProfiledCase Counts for Mutated-genes endpoint. * Create sql files to create new tables * Add unit test for totalProfiledCount * Add matching gene panel ids * Add TotalProfiledCountsWithoutPanelData * Add profileCount for genes without gene panel data * Add Comments for SQL * Update matching Gene Panel Ids * Clean up code * Fix test * Add query to get correct Gene Panels * Fix unit test * Add comments
- Loading branch information
Showing
19 changed files
with
363 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
package org.cbioportal.model; | ||
|
||
public enum AlterationType { | ||
MUTATION, | ||
COPY_NUMBER_ALTERATION | ||
MUTATION_EXTENDED, | ||
COPY_NUMBER_ALTERATION, | ||
STRUCTURAL_VARIANT, | ||
GENERIC_ASSAY; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...ava/org/cbioportal/persistence/mybatisclickhouse/typehandler/GenePanelIdsTypeHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package org.cbioportal.persistence.mybatisclickhouse.typehandler; | ||
|
||
import org.apache.ibatis.type.BaseTypeHandler; | ||
import org.apache.ibatis.type.JdbcType; | ||
|
||
import java.sql.CallableStatement; | ||
import java.sql.PreparedStatement; | ||
import java.sql.ResultSet; | ||
import java.sql.SQLException; | ||
import java.util.HashSet; | ||
import java.util.Set; | ||
import java.util.Arrays; | ||
|
||
public class GenePanelIdsTypeHandler extends BaseTypeHandler<Set<String>> { | ||
|
||
@Override | ||
public void setNonNullParameter(PreparedStatement ps, int i, Set<String> parameter, JdbcType jdbcType) throws SQLException { | ||
// Convert Set to array for storage (if needed) | ||
throw new UnsupportedOperationException("Storage of GenePanelIds not supported"); | ||
} | ||
|
||
@Override | ||
public Set<String> getNullableResult(ResultSet rs, String columnName) throws SQLException { | ||
String[] array = (String[]) rs.getArray(columnName).getArray(); | ||
return new HashSet<>(Arrays.asList(array)); | ||
} | ||
|
||
@Override | ||
public Set<String> getNullableResult(ResultSet rs, int columnIndex) throws SQLException { | ||
String[] array = (String[]) rs.getArray(columnIndex).getArray(); | ||
return new HashSet<>(Arrays.asList(array)); | ||
} | ||
|
||
@Override | ||
public Set<String> getNullableResult(CallableStatement cs, int columnIndex) throws SQLException { | ||
String[] array = (String[]) cs.getArray(columnIndex).getArray(); | ||
return new HashSet<>(Arrays.asList(array)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.