Show
Ignore:
Timestamp:
04/08/10 11:04:53 (2 years ago)
Author:
martijn
Message:

Fixed batchmapper.bat. Batchmapper uses transitive mapping by default.
Made transitive mapping observe target datasource

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/org.bridgedb/src/org/bridgedb/IDMapperStack.java

    r333 r337  
    1818 
    1919import java.util.ArrayList; 
     20import java.util.Arrays; 
    2021import java.util.Collection; 
    2122import java.util.Collections; 
     
    438439                // first round 
    439440                Set<Xref> result = new HashSet<Xref>(); 
     441                Set<DataSource> dsFilter = new HashSet<DataSource>(Arrays.asList(resultDs)); 
    440442                for (IDMapper i : gdbs) 
    441443                { 
     
    444446                        // map ref in IDMapper i 
    445447                        Set<Xref> round1 = i.mapID(ref); 
    446                         result.addAll (round1); 
     448 
     449                        for (Xref r1 : round1) 
     450                        { 
     451                                if (resultDs.length == 0 || dsFilter.contains(r1.getDataSource())) 
     452                                { 
     453                                        result.add (r1); 
     454                                } 
     455                        } 
    447456 
    448457                        // then map the result of that in all IDMappers j (j != i)