use of ubic.gemma.core.image.ABALinkOutValueObject in project Gemma by PavlidisLab.
the class LinkOutController method getAllenBrainAtlasLink.
/**
* AJAX METHOD Given a gene's official symbol will return value object with the link to use
*
* @param geneOfficialSymbol gene official symbol
* @return linkout vo
*/
@RemoteMethod
public ABALinkOutValueObject getAllenBrainAtlasLink(String geneOfficialSymbol) {
Collection<ImageSeries> imageSeries = null;
String abaGeneUrl = null;
Collection<String> imageUrls = new ArrayList<>();
// Get Allen Brain Atals information and put in value object
try {
imageSeries = allenBrainAtlasService.getRepresentativeSaggitalImages(geneOfficialSymbol);
if (imageSeries != null) {
abaGeneUrl = allenBrainAtlasService.getGeneUrl(geneOfficialSymbol);
Collection<Image> representativeImages = allenBrainAtlasService.getImagesFromImageSeries(imageSeries);
for (Image image : representativeImages) {
imageUrls.add(image.getDownloadExpressionPath());
}
}
} catch (IOException e) {
}
return new ABALinkOutValueObject(imageUrls, abaGeneUrl, geneOfficialSymbol);
}
Aggregations