Changeset 20788

Show
Ignore:
Timestamp:
04/03/10 13:21:20 (6 months ago)
Author:
julie
Message:

remove local webapp from list. add comment

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/bio/tools/main/src/org/intermine/bio/logic/OrthologueLinkManager.java

    r20783 r20788  
    2929import org.intermine.model.bio.DataSet; 
    3030import org.intermine.model.bio.Gene; 
    31 import org.intermine.model.bio.Homologue; 
    3231import org.intermine.model.bio.Organism; 
    3332import org.intermine.objectstore.query.ConstraintOp; 
     
    289288            QueryClass qcGene = new QueryClass(Gene.class); 
    290289            QueryClass qcOrganism = new QueryClass(Organism.class); 
    291             QueryClass qcHomologue = new QueryClass(Homologue.class)
     290            QueryClass qcHomologue = null
    292291            QueryClass qcHomologueOrganism = new QueryClass(Organism.class); 
    293292            QueryClass qcDataset = new QueryClass(DataSet.class); 
    294293            QueryClass qcGeneHomologue = new QueryClass(Gene.class); 
    295294 
     295            try { 
     296                qcHomologue = new QueryClass(Class.forName(im.getModel().getPackageName()  
     297                        + ".Homologue")); 
     298            } catch (ClassNotFoundException e) { 
     299                LOG.info("No orthologues found.", e); 
     300                return; 
     301            } 
     302             
    296303            QueryField qfGeneOrganismName = new QueryField(qcOrganism, "shortName"); 
    297304            QueryField qfDataset = new QueryField(qcDataset, "title"); 
  • trunk/flymine/webapp/resources/web.properties

    r20771 r20788  
    418418attributelink.ratmineList.Gene.10116.primaryIdentifier.list.usePost=true 
    419419 
     420attributelink.ratmine.Pathway.*.identifier.url=http://www.intermine.org/rgd/portal.do?externalids=<<attributeValue>>&class=Pathway&origin=FlyMine 
     421attributelink.ratmine.Pathway.*.identifier.text=RatMine: <<attributeValue>> 
     422attributelink.ratmine.Pathway.*.identifier.imageName=ratmine_logo.png 
     423 
     424attributelink.ratmine.ProteinDomain.*.identifier.url=http://www.intermine.org/rgd/portal.do?externalids=<<attributeValue>>&class=ProteinDomain&origin=FlyMine 
     425attributelink.ratmine.ProteinDomain.*.identifier.text=RatMine: <<attributeValue>> 
     426attributelink.ratmine.ProteinDomain.*.identifier.imageName=ratmine_logo.png 
     427 
    420428# home page 
    421429begin.query.classes = Gene,Protein 
  • trunk/intermine/web/main/src/org/intermine/web/logic/widget/BenjaminiHochberg.java

    r20631 r20788  
    1313import java.math.BigDecimal; 
    1414import java.math.MathContext; 
    15 import java.math.RoundingMode; 
    1615import java.util.HashMap; 
    1716import java.util.LinkedHashMap; 
     
    4746        numberOfTests = originalMap.size(); 
    4847        SortableMap sortedMap = new SortableMap(originalMap); 
    49         // sort descending 
    50         sortedMap.sortValues(false, false); 
     48        // sort ascending 
     49        sortedMap.sortValues(false, true); 
    5150        this.originalMap = new LinkedHashMap(sortedMap); 
    5251    } 
     
    5857    @SuppressWarnings("unchecked") 
    5958    public void calculate(Double max) { 
    60         MathContext mc = new MathContext(10, RoundingMode.HALF_EVEN); 
     59        adjustedMap = new HashMap(); 
    6160 
    62         adjustedMap = new HashMap(); 
    63         BigDecimal adjustedP = new BigDecimal(0); 
    6461        int index = 0; 
     62        BigDecimal lastValue = new BigDecimal(-1); 
    6563 
    6664        for (Map.Entry<String, BigDecimal> entry : originalMap.entrySet()) { 
     
    6866            String label = entry.getKey(); 
    6967            BigDecimal p = entry.getValue(); 
     68            BigDecimal adjustedP = p; 
     69             
     70            /** 
     71             * equivalent p-values should have the same adjusted p-value. 
     72             * 
     73             * only increase the index if this value is different from the one we saw on the 
     74             * previous line 
     75             */ 
     76            if (!p.equals(lastValue)) { 
     77                // new value, so increase index 
     78                index++; 
     79            } 
    7080 
    7181            // largest value is not adjusted 
    72             if (index == 0) { 
    73                 adjustedP = p; 
    74             } else { 
     82            if (index < numberOfTests - 1) { 
    7583                // p-value * (n/ n - index) 
    7684                BigDecimal n = new BigDecimal(numberOfTests); 
    7785                BigDecimal divisor = n.subtract(new BigDecimal(index)); 
    78                 BigDecimal m = n.divide(divisor, mc); 
     86                BigDecimal m = n.divide(divisor, MathContext.DECIMAL128); 
    7987                adjustedP = p.multiply(m); 
    8088            } 
    8189 
    8290            if (adjustedP.doubleValue() < max.doubleValue()) { 
     91                // TODO we want to put all values in the map and let the javascript display or not 
    8392                adjustedMap.put(label, adjustedP); 
    8493            } 
    85             index++
     94            lastValue = p
    8695        } 
    8796    } 
  • trunk/intermine/web/main/src/org/intermine/web/logic/widget/Bonferroni.java

    r20637 r20788  
    1111 */ 
    1212 
     13import java.math.BigDecimal; 
    1314import java.util.HashMap; 
    14 import java.util.Iterator; 
    15  
    16 import java.math.BigDecimal; 
     15import java.util.Map; 
    1716 
    1817 
    1918/** 
    2019 * See online documentation for an in depth description of error correction and bonferroni. 
    21  * Briefly, the p-values are adjusted (multiple hypothesis test correction) by multiplying 
    22  * the original value by the number of tests performed. 
     20 * Briefly, the p-values are adjusted (multiple hypothesis test correction) by adding the 
     21 * alpha divided by the total number of tests to the original number. 
     22 *  
     23 * For example, given 100 tests and an alpha value of .05, we would expect 5 false positives.   
     24 *  
    2325 * @author Julie Sullivan 
    2426 */ 
     
    2830    private HashMap<String, BigDecimal> adjustedMap = new HashMap<String, BigDecimal>(); 
    2931    private BigDecimal numberOfTests; 
    30     private BigDecimal alpha = new BigDecimal(0.05); 
    31     private BigDecimal alphaPerTest; 
    32  
    3332 
    3433    /** 
     
    3837        this.originalMap = originalMap; 
    3938        numberOfTests = new BigDecimal(originalMap.size()); 
    40         alphaPerTest = alpha.divide(numberOfTests); 
    4139    } 
    4240 
     
    4745    public void calculate(Double max) { 
    4846 
    49         for (Iterator iter = originalMap.keySet().iterator(); iter.hasNext();) { 
     47        for (Map.Entry<String, BigDecimal> entry : originalMap.entrySet()) { 
    5048 
    5149            // get original values 
    52             String label = (String) iter.next(); 
    53             BigDecimal p = new BigDecimal("" + originalMap.get(label)); 
     50            String label = entry.getKey(); 
     51            BigDecimal p = entry.getValue(); 
    5452 
    55             // calc new value 
    56             // (alpha / number of tests) + p 
    57             BigDecimal adjustedP = p.add(alphaPerTest); 
     53            // calc new value - p * n 
     54            BigDecimal adjustedP = p.multiply(numberOfTests); 
    5855 
    5956            // don't store values >= maxValue 
  • trunk/intermine/webapp/main/resources/webapp/WEB-INF/global.web.properties

    r20699 r20788  
    8080# list of intermines 
    8181# used on the linkouts section of the list analysis page 
    82  
    83 #intermines.flymine.url=http://localhost:8080/preview 
    84 #intermines.flymine.name=FlyMine 
    85 #intermines.flymine.logo=flymine_logo_link.gif 
    86 #intermines.flymine.defaultOrganism=D. melanogaster 
    87 #intermines.flymine.defaultMapping=remote 
     82# intermines.MINE_NAME = this mine name should match the `project.title` in your properties file 
    8883 
    8984intermines.modmine.url=http://intermine.modencode.org/query 
     
    9489 
    9590intermines.flymine.url=http://preview.flymine.org/preview 
    96 intermines.flymine.name=FlyMine 
     91intermines.flymine.name=FlyMine Preview 
    9792intermines.flymine.logo=flymine_logo_link.gif 
    9893intermines.flymine.defaultOrganism=D. melanogaster