Changeset 337

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

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

Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/batchmapper.bat

    r145 r337  
    1 java -jar dist/bridgedb-batchmapper.jar %* 
     1java -jar dist/org.bridgedb.tools.batchmapper.jar %* 
  • trunk/org.bridgedb.tools.batchmapper/src/org/bridgedb/tools/batchmapper/BatchMapper.java

    r308 r337  
    9393                                "               [-r <report file>] \n" + 
    9494                                "\n" + 
    95                                 "You should specify at least one -g or -t option \n"); 
     95                                "You should specify at least one -g or -t option.\n" + 
     96                                "Multiple -g or -t options will be combined transitively.\n"); 
    9697        } 
    9798         
     
    246247                                gdb.addIDMapper(connectionString); 
    247248                        } 
     249                        gdb.setTransitive(true); 
    248250                } 
    249251                 
  • 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)