Commit f2ea69f2 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

interacting drugs work for RNA

parent 7531a452
......@@ -27,6 +27,7 @@ import lcsb.mapviewer.model.map.model.Model;
import lcsb.mapviewer.model.map.species.Element;
import lcsb.mapviewer.model.map.species.Gene;
import lcsb.mapviewer.model.map.species.Protein;
import lcsb.mapviewer.model.map.species.Rna;
import lcsb.mapviewer.model.map.statistics.SearchType;
import lcsb.mapviewer.services.interfaces.ISearchHistoryService;
import lcsb.mapviewer.services.search.db.DbSearchCriteria;
......@@ -255,10 +256,10 @@ public class DrugService implements IDrugService {
@Override
public List<DrugView> getForTargets(Collection<Element> targets, DbSearchCriteria searchCriteria) {
List<Drug> drugList = new ArrayList<Drug>();
Set<MiriamData> targetsMiriam = new HashSet<MiriamData>();
List<Drug> drugList = new ArrayList<>();
Set<MiriamData> targetsMiriam = new HashSet<>();
for (Element target : targets) {
if (target instanceof Protein || target instanceof Gene) {
if (target instanceof Protein || target instanceof Gene || target instanceof Rna) {
boolean hgncFound = false;
for (MiriamData md : target.getMiriamData()) {
if (MiriamType.HGNC_SYMBOL.equals(md.getDataType())) {
......@@ -295,7 +296,7 @@ public class DrugService implements IDrugService {
for (Drug drug : drugList) {
removeUnknownOrganisms(drug, searchCriteria.getOrganisms());
}
List<DrugView> result = new ArrayList<DrugView>();
List<DrugView> result = new ArrayList<>();
for (Drug drug : drugList) {
result.add(drugViewFactory.create(drug));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment