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

mirna parser doesn't return duplicates when searching by target

parent 0d25c444
......@@ -181,7 +181,7 @@ public class MiRNAParser extends CachableInterface implements IExternalService {
* @throws MiRNASearchException
* thrown when there is a problem with accessing mirna database
*/
public List<MiRNA> getMiRnasByNames(List<String> names) throws MiRNASearchException {
public List<MiRNA> getMiRnasByNames(Collection<String> names) throws MiRNASearchException {
List<MiRNA> miRNAs = new ArrayList<>();
List<String> idsToRemove = new ArrayList<>();
MiRNA miRNA = null;
......@@ -419,7 +419,7 @@ public class MiRNAParser extends CachableInterface implements IExternalService {
* thrown when there is a problem with accessing mirna database
*/
public List<MiRNA> getMiRnaListByTargets(Collection<MiriamData> targetsMiriam) throws MiRNASearchException {
List<String> mirnaNames = new ArrayList<>();
Set<String> mirnaNames = new HashSet<>();
Set<MiriamData> targets = new HashSet<>();
for (MiriamData miriamData : targetsMiriam) {
if (!MiriamType.HGNC_SYMBOL.equals(miriamData.getDataType()) && !MiriamType.ENTREZ.equals(miriamData.getDataType())) {
......
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