Changeset 4358


Ignore:
Timestamp:
Jul 1, 2008, 11:08:43 AM (15 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1075: Lowess normaliztion fails on trunk but works on latest 2.7-stable

Location:
trunk/src
Files:
5 edited

Legend:

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

    r4305 r4358  
    266266  public boolean isReadonly()
    267267  {
    268     return lastMainQuery != null;
     268    return super.isReadonly() || lastMainQuery != null;
    269269  }
    270270 
  • trunk/src/core/net/sf/basedb/core/AbstractQuery.java

    r4302 r4358  
    439439  }
    440440 
     441  public boolean isReadonly()
     442  {
     443    return hasAutoJoined;
     444  }
     445 
    441446  /**
    442447    Resets the query, allowing you to add more restrictions, joins, order objects
     
    818823    if (autoJoiners == null || hasAutoJoined) return;
    819824   
    820     hasAutoJoined = true;
    821825    Iterator<QueryElement> iterator = new NestedIterator<QueryElement>(
    822826      selects, permanentSelects, temporarySelects,
     
    844848      }
    845849    }
     850    hasAutoJoined = true;
    846851  }
    847852 
  • trunk/src/core/net/sf/basedb/core/DynamicQuery.java

    r3679 r4358  
    8383    return HibernateUtil.quote(rootTable.getAlias());
    8484  }
    85   public boolean isReadonly()
    86   {
    87     return false;
    88   }
    8985  // -------------------------------------------
    9086 
  • trunk/src/plugins/core/net/sf/basedb/plugins/LowessNormalization.java

    r4356 r4358  
    408408    // Count number of spots that is going to be normalized
    409409    DynamicSpotQuery query = source.getSpotData();
    410     query.restrict(intensityRestriction);
     410    query.restrictPermanent(intensityRestriction);
    411411    checkInterrupted();
    412412    long numSpots = query.count(dc);
    413    
     413    query.reset();
     414
    414415    long normalizedSpots = 0;
    415416    if (progress != null) progress.display((int)(normalizedSpots / numSpots * 100), normalizedSpots + " spots normalized");
     
    435436    query.restrict(bioAssayRestriction);
    436437    query.order(Orders.asc(block));
    437      
     438   
    438439    // Normalize one bioassay at a time
    439440    List<BioAssay> assays = source.getBioAssays().list(dc);
  • trunk/src/plugins/core/net/sf/basedb/plugins/MedianRatioNormalization.java

    r4356 r4358  
    442442    // Get the number of spots to be normalized
    443443    DynamicSpotQuery query = source.getSpotData();
    444     query.restrict(intensityRestriction);
     444    query.restrictPermanent(intensityRestriction);
    445445    long numSpots = query.count(dc);
     446    query.reset();
    446447    long normalizedSpots = 0;
    447448    if (progress != null)
     
    551552    // Count number of spots that is going to be normalized
    552553    DynamicSpotQuery query = source.getSpotData();
    553     query.restrict(intensityRestriction);
     554    query.restrictPermanent(intensityRestriction);
    554555    checkInterrupted();
    555556    long numSpots = query.count(dc);
     557    query.reset();
    556558    long normalizedSpots = 0;
    557559    if (progress != null) progress.display((int)(normalizedSpots / numSpots * 100), normalizedSpots + " spots normalized");
Note: See TracChangeset for help on using the changeset viewer.