Changeset 5791


Ignore:
Timestamp:
Dec 16, 2019, 8:32:07 AM (3 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1217: DoNotUse? flags and comments should be copied to new child items

Should be implemented in all places now.

Location:
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/dao/ReggieItem.java

    r5790 r5791  
    333333  }
    334334 
    335   // TODO - remove once we have found all places that create child items
    336   @Deprecated
    337335  protected String getNextChildItemName(DbControl dc, ItemQuery<? extends Nameable> childQuery, String suffix, boolean releaseIfTransactionFails)
    338336  {
     
    365363    @since 4.19
    366364  */
    367   // TODO - remove once we have found all places that create child items
    368   @Deprecated
    369365  public static String getNextChildItemName(DbControl dc, String parentName, ItemQuery<? extends Nameable> childQuery, String suffix, boolean releaseIfTransactionFails)
    370366  {
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/grid/DemuxJobCreator.java

    r5786 r5791  
    3838import net.sf.basedb.reggie.Reggie;
    3939import net.sf.basedb.reggie.dao.Annotationtype;
     40import net.sf.basedb.reggie.dao.DoNotUse;
    4041import net.sf.basedb.reggie.dao.FlowCell;
    4142import net.sf.basedb.reggie.dao.Library;
     
    267268    merged.setProtocol(mergeProtocol);
    268269    merged.setExtract(lib.getExtract());
    269    
     270    DoNotUse.copyDoNotUseAnnotations(dc, lib.getExtract(), merged, false);
    270271    boolean isExternal = Reggie.isExternalItem(mergeName);
    271272    String rootName = isExternal ? lib.getTopExtractOrSample(dc).getName() : null;
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/grid/HisatAlignJobCreator.java

    r5618 r5791  
    4545import net.sf.basedb.reggie.dao.BiomaterialList;
    4646import net.sf.basedb.reggie.dao.Datafiletype;
     47import net.sf.basedb.reggie.dao.DoNotUse;
    4748import net.sf.basedb.reggie.dao.Fileserver;
    4849import net.sf.basedb.reggie.dao.FlowCell;
     
    264265      masked.setProtocol(maskingProtocol);
    265266      masked.addParent(merged);
     267      DoNotUse.copyDoNotUseAnnotations(dc, merged, masked, false);
    266268      dc.saveItem(masked);
    267269     
     
    276278      aligned.setProtocol(alignProtocol);
    277279      aligned.addParent(masked);
     280      DoNotUse.copyDoNotUseAnnotations(dc, merged, aligned, false);
    278281      dc.saveItem(aligned);
    279282     
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/ExtractionServlet.java

    r5785 r5791  
    4444import net.sf.basedb.reggie.dao.BioplateType;
    4545import net.sf.basedb.reggie.dao.Dna;
     46import net.sf.basedb.reggie.dao.DoNotUse;
    4647import net.sf.basedb.reggie.dao.Lysate;
    4748import net.sf.basedb.reggie.dao.ReactionPlate;
     
    671672          dnaEvent.setProtocol(dnaProtocol);
    672673          dnaEvent.setSource(lysate).setUsedQuantity(lysateProcessedQuantity / 3);
     674          DoNotUse.copyDoNotUseAnnotations(dc, lysate, dna, false);
    673675          float dnaVolume = ((Number)jsonDna.get("volume")).floatValue();
    674676          float dnaNdConc = ((Number)jsonDna.get("ndConc")).floatValue();
     
    720722          rnaEvent.setProtocol(rnaProtocol);
    721723          rnaEvent.setSource(lysate).setUsedQuantity(lysateProcessedQuantity / 3);
     724          DoNotUse.copyDoNotUseAnnotations(dc, lysate, rna, false);
    722725          float rnaVolume = ((Number)jsonRna.get("volume")).floatValue();
    723726          float rnaNdConc = ((Number)jsonRna.get("ndConc")).floatValue();
     
    773776          ftEvent.setProtocol(ftProtocol);
    774777          ftEvent.setSource(lysate).setUsedQuantity(lysateProcessedQuantity / 3);
     778          DoNotUse.copyDoNotUseAnnotations(dc, lysate, ft, false);
    775779          ft.setOriginalQuantity(((Number)jsonFt.get("volume")).floatValue());
    776780          ft.setBioWell(StoragePlate.getChildBioWell(dc, lysateWell, "Lys", "FT"));
     
    904908            normalizedRna.setOriginalQuantity(usedQuantity.floatValue());
    905909            BioMaterialEventSource evtSrc = creationEvent.setSource(parentRna);
     910            DoNotUse.copyDoNotUseAnnotations(dc, parentRna, normalizedRna, false);
    906911            evtSrc.setUsedQuantity(usedQuantity.floatValue());
    907912           
     
    10051010            normalizedDna.setOriginalQuantity(usedQuantity.floatValue());
    10061011            BioMaterialEventSource evtSrc = creationEvent.setSource(parentDna);
     1012            DoNotUse.copyDoNotUseAnnotations(dc, parentDna, normalizedDna, false);
    10071013            evtSrc.setUsedQuantity(usedQuantity.floatValue());
    10081014           
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/HistologyServlet.java

    r5784 r5791  
    6161import net.sf.basedb.reggie.dao.BiomaterialList;
    6262import net.sf.basedb.reggie.dao.BioplateType;
     63import net.sf.basedb.reggie.dao.DoNotUse;
    6364import net.sf.basedb.reggie.dao.HeGlass;
    6465import net.sf.basedb.reggie.dao.Histology;
     
    748749                BioMaterialEvent creationEvent = stained.getCreationEvent();
    749750                creationEvent.setSource(histology);
     751                DoNotUse.copyDoNotUseAnnotations(dc, histology, stained, false);
    750752                creationEvent.setEventDate(stainDate);
    751753                creationEvent.setProtocol(protocol);
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/LibPrepServlet.java

    r5553 r5791  
    6969import net.sf.basedb.reggie.dao.BioplateType;
    7070import net.sf.basedb.reggie.dao.CDna;
     71import net.sf.basedb.reggie.dao.DoNotUse;
    7172import net.sf.basedb.reggie.dao.Library;
    7273import net.sf.basedb.reggie.dao.Pipeline;
     
    480481          lib.setTag(Tag.getById(dc, ((Number)jsonBarcode.get("id")).intValue()));
    481482          BioMaterialEventSource evtSrc = lib.getCreationEvent().setSource(c);
     483          DoNotUse.copyDoNotUseAnnotations(dc, c, lib, false);
    482484          lib.setBioWell(libPlate.getBioWell(c.getBioWell().getPlateCoordinate()));
    483485          dc.saveItem(lib);
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/MRnaServlet.java

    r5553 r5791  
    5454import net.sf.basedb.reggie.dao.BioplateType;
    5555import net.sf.basedb.reggie.dao.CDna;
     56import net.sf.basedb.reggie.dao.DoNotUse;
    5657import net.sf.basedb.reggie.dao.MRna;
    5758import net.sf.basedb.reggie.dao.Pipeline;
     
    539540          childExtract.setName(childName);
    540541          BioMaterialEventSource evtSrc = childExtract.getCreationEvent().setSource(r);
     542          DoNotUse.copyDoNotUseAnnotations(dc, r, childExtract, false);
    541543          evtSrc.setUsedQuantity(usedQuantity.floatValue());
    542544         
     
    754756              cdna.setBioWell(cdnaPlate.getBioWell(well.getPlateCoordinate()));
    755757              cdna.getCreationEvent().setSource(mrna);
     758              DoNotUse.copyDoNotUseAnnotations(dc, mrna, cdna, false);
    756759              dc.saveItem(cdna);
    757760              numCdna++;
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/MipsServlet.java

    r5760 r5791  
    5454import net.sf.basedb.reggie.dao.BioplateType;
    5555import net.sf.basedb.reggie.dao.Dna;
     56import net.sf.basedb.reggie.dao.DoNotUse;
    5657import net.sf.basedb.reggie.dao.FlowCell;
    5758import net.sf.basedb.reggie.dao.Library;
     
    618619          Float remainingQuantityBefore = d.getRemainingQuantity();
    619620          BioMaterialEventSource evtSrc = childExtract.getCreationEvent().setSource(d);
     621          DoNotUse.copyDoNotUseAnnotations(dc, d, childExtract, false);
    620622          if (remainingQuantityBefore != null)
    621623          {
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/PartitionRegistrationServlet.java

    r5421 r5791  
    3030import net.sf.basedb.reggie.counter.CounterService;
    3131import net.sf.basedb.reggie.dao.Annotationtype;
     32import net.sf.basedb.reggie.dao.DoNotUse;
    3233import net.sf.basedb.reggie.dao.ReggieRole;
    3334import net.sf.basedb.reggie.dao.SpecimenTube;
     
    270271              {
    271272                Extract lysExtract = specimen.newExtract(apWeight.floatValue());
     273                DoNotUse.copyDoNotUseAnnotations(dc, specimen, lysExtract, false);
    272274                lysExtract.setItemSubtype(lysateType);
    273275                lysExtract.setName(tube.getNextLysateName(dc));
     
    320322                BioMaterialEvent creationEvent = hisSample.getCreationEvent();
    321323                creationEvent.addSource(specimen).setUsedQuantity(hisWeight.floatValue());
     324                DoNotUse.copyDoNotUseAnnotations(dc, specimen, hisSample, false);
    322325               
    323326                Annotationtype.PARTITION_DATE.setAnnotationValue(dc, hisSample, partitionDate);
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/RnaQcServlet.java

    r5421 r5791  
    4747import net.sf.basedb.reggie.dao.Annotationtype;
    4848import net.sf.basedb.reggie.dao.BioplateType;
     49import net.sf.basedb.reggie.dao.DoNotUse;
    4950import net.sf.basedb.reggie.dao.Lysate;
    5051import net.sf.basedb.reggie.dao.ReactionPlate;
     
    389390          rnaQc.setName(ReggieItem.ensureNonExistingItem(dc, Subtype.RNAQC, (String)jsonRnaQc.get("name")));
    390391          BioMaterialEventSource evtSrc = rnaQc.getCreationEvent().setSource(parentRna);
     392          DoNotUse.copyDoNotUseAnnotations(dc, parentRna, rnaQc, false);
    391393          if (volume != null)
    392394          {
Note: See TracChangeset for help on using the changeset viewer.