Changeset 5790


Ignore:
Timestamp:
Dec 13, 2019, 2:26:35 PM (3 years ago)
Author:
Nicklas Nordborg
Message:

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

Moved the helper method from ReggieItem.copyDoNotUseAnnotations() to a separate utility class DoNotUse since it easier to use two regular BASE items instead of one ReggieItem and one BASE item.

Fixed the implementation in the Cufflinks, StringTie and VariantCalling pipelines.

Location:
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie
Files:
1 added
4 edited

Legend:

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

    r5789 r5790  
    249249 
    250250  /**
    251     Helper method to copy all DoNotUse-related annotations from this item to the other.
    252     @param force TRUE to overwrite existing annotations, FALSE to not
    253     @return TRUE if any of the information was changed, FALSE if not
    254     @since 4.25
    255   */
    256   public boolean copyDoNotUseAnnotations(DbControl dc, Annotatable to, boolean force)
    257   {
    258     boolean copiedFlag = Annotationtype.DO_NOT_USE.copyAnnotationValues(dc, item, to, force);
    259     boolean copiedComment = Annotationtype.DO_NOT_USE_COMMENT.copyAnnotationValues(dc, item, to, force);
    260     return copiedFlag || copiedComment;
    261   }
    262 
    263  
    264   /**
    265251    Utility method for finding parent biomaterial of the specified subtypes
    266252    by following the chain of parent items up to biosource.
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/grid/CufflinksJobCreator.java

    r5705 r5790  
    4848import net.sf.basedb.reggie.dao.Datafiletype;
    4949import net.sf.basedb.reggie.dao.DemuxedSequences;
     50import net.sf.basedb.reggie.dao.DoNotUse;
    5051import net.sf.basedb.reggie.dao.Fileserver;
    5152import net.sf.basedb.reggie.dao.Library;
     
    315316      masked.setProtocol(maskingProtocol);
    316317      masked.addParent(merged);
     318      DoNotUse.copyDoNotUseAnnotations(dc, merged, masked, false);
    317319      dc.saveItem(masked);
    318320     
     
    327329      aligned.setProtocol(alignProtocol);
    328330      aligned.addParent(masked);
     331      DoNotUse.copyDoNotUseAnnotations(dc, merged, aligned, false);
    329332      dc.saveItem(aligned);
    330333
     
    340343      raw.setProtocol(protocol);
    341344      raw.setParentBioAssay(aligned);
     345      DoNotUse.copyDoNotUseAnnotations(dc, merged, raw, false);
    342346      dc.saveItem(raw);
    343347     
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/grid/StringTieJobCreator.java

    r5705 r5790  
    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.Library;
     
    227228      raw.setProtocol(protocol);
    228229      raw.setParentBioAssay(aligned);
     230      DoNotUse.copyDoNotUseAnnotations(dc, aligned, raw, false);
    229231      dc.saveItem(raw);
    230232
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/grid/VariantCallingJobCreator.java

    r5775 r5790  
    4747import net.sf.basedb.reggie.dao.BiomaterialList;
    4848import net.sf.basedb.reggie.dao.Datafiletype;
     49import net.sf.basedb.reggie.dao.DoNotUse;
    4950import net.sf.basedb.reggie.dao.Fileserver;
    5051import net.sf.basedb.reggie.dao.Library;
     
    280281        raw.setArrayDesign(null); // To prevent the default hg38
    281282        raw.setParentBioAssay(aligned);
     283        DoNotUse.copyDoNotUseAnnotations(dc, aligned, raw, false);
    282284        dc.saveItem(raw);
    283285       
Note: See TracChangeset for help on using the changeset viewer.