-
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.
Merge branch 'develop' of https://github.com/ebi-gene-expression-grou…
…p/atlas-web-single-cell into develop
- Loading branch information
Showing
26 changed files
with
4,703 additions
and
3,861 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
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); | ||
} | ||
} |
Oops, something went wrong.