-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Pull and update latest submodule changes * Add organism part and cell type search to analytics search DAO * Clean variable naming * Add cell types as an input parameter to OrganismPartSearchDao * Add cell types as an input parameter to OrganismPartSearchService * clean code in JsonGeneSearchController * remove unneeded JdbcUtils from CellTypeSearchDaoIT * Add cell type query parameter to the JsonGeneSearchController - WIP * Rename test method name and remove unneeded test case * Add organism parts parameter to CellTypeSearchDao * Implement CellTypeSearchService * Use new CellTypeSearchService in JsonGeneSearchController * Remove null value from cell type search results
- Loading branch information
Showing
9 changed files
with
308 additions
and
27 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
29 changes: 29 additions & 0 deletions
29
app/src/main/java/uk/ac/ebi/atlas/search/celltype/CellTypeSearchService.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,29 @@ | ||
package uk.ac.ebi.atlas.search.celltype; | ||
|
||
import com.google.common.collect.ImmutableSet; | ||
import lombok.RequiredArgsConstructor; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.stereotype.Component; | ||
import uk.ac.ebi.atlas.search.GeneSearchService; | ||
|
||
@Component | ||
@RequiredArgsConstructor | ||
public class CellTypeSearchService { | ||
|
||
private final CellTypeSearchDao cellTypeSearchDao; | ||
private final GeneSearchService geneSearchService; | ||
|
||
private static final Logger LOGGER = LoggerFactory.getLogger(CellTypeSearchService.class); | ||
|
||
public ImmutableSet<String> search(ImmutableSet<String> geneIds, ImmutableSet<String> organismParts) { | ||
if (geneIds.isEmpty()) { | ||
LOGGER.warn("Can't query for organism part as no gene IDs has given."); | ||
return ImmutableSet.of(); | ||
} | ||
|
||
LOGGER.info("Searching organism parts for this gene ids: {}", geneIds.asList()); | ||
|
||
return cellTypeSearchDao.searchCellTypes(geneSearchService.getCellIdsFromGeneIds(geneIds), organismParts); | ||
} | ||
} |
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.