Changeset 2133


Ignore:
Timestamp:
Mar 30, 2006, 3:49:24 PM (18 years ago)
Author:
Johan Enell
Message:

corrected the counter

Location:
trunk/src/core/net/sf/basedb/plugins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/plugins/LowessNormalization.java

    r2132 r2133  
    210210       
    211211        batcher = childBioAssaySet.getSpotBatcher();
    212        
    213         int numSpots = bioAssaySet.getNumSpots();
    214         int normalizedSpots = 0;
    215         progress.display(normalizedSpots / numSpots * 100, normalizedSpots + " spots normalized");
    216        
     212
    217213        float delta = (Float) job.getValue(deltaParameter.getName());
    218214        float fitFraction = (Float) job.getValue(fitFractionParameter.getName());
     
    237233        DynamicSpotQuery query;
    238234        DynamicResultIterator resultIter;
     235        query = bioAssaySet.getSpotData();
     236        query.restrict(intensityRestriction);
     237        int numSpots = query.count(dc);
     238        int normalizedSpots = 0;
     239        progress.display(normalizedSpots / numSpots * 100, normalizedSpots + " spots normalized");
     240       
    239241        List<BioAssay> assays = bioAssaySet.getBioAssays().list(dc);
    240242        for (BioAssay assay : assays)
  • trunk/src/core/net/sf/basedb/plugins/MedianRatioNormalization.java

    r2132 r2133  
    8080  private static final About about = new AboutImpl
    8181  (
    82     "Normalization: pin-based median ratio",
     82    "Normalization: Median ratio",
    8383    "This normalizer scales the intensities in such a way that their geometric mean (sqrt(i1 * i2))" +
    8484    " is kept constant but the median of their ratios (i1/i2) is shifted to 1.\n" +
     
    197197        dc.saveItem(child);
    198198        batcher = child.getSpotBatcher();
    199 
    200         int numSpots = bioAssaySet.getNumSpots();
    201         int normalizedSpots = 0;
    202         progress.display(normalizedSpots / numSpots * 100, normalizedSpots + " spots normalized");
    203 
     199       
    204200        Select ratio = Selects.expression(Expressions.divide(Dynamic.column(VirtualColumn.channel(1)), Dynamic.column(VirtualColumn.channel(2))), "ratio");
    205201        Restriction intensityRestriction = Restrictions.and
     
    213209        DynamicSpotQuery query;
    214210        DynamicResultIterator resultIter;
     211        query = bioAssaySet.getSpotData();
     212        query.restrict(intensityRestriction);
     213        int numSpots = query.count(dc);
     214        int normalizedSpots = 0;
     215        progress.display(normalizedSpots / numSpots * 100, normalizedSpots + " spots normalized");
     216
    215217        List<BioAssay> assays = bioAssaySet.getBioAssays().list(dc);
    216218        for (BioAssay assay : assays)
     
    248250            int lowCount = (int) Math.floor(count * lowExclude / 100);
    249251            int highCount = (int) Math.floor(count * highExclude / 100);
    250             numSpots -= assay.getNumSpots() - count;
    251             progress.display((normalizedSpots * 100) / numSpots, (assay.getNumSpots() - count) + " spots removed from assay " + assay.getName());
    252252
    253253            // check count > 0
Note: See TracChangeset for help on using the changeset viewer.