Changeset 5798


Ignore:
Timestamp:
Dec 18, 2019, 11:34:55 AM (2 years ago)
Author:
Nicklas Nordborg
Message:

References #1209: Add support for storing TMA specimen

Added SampleOwner annotation and added this to the TMASpecimenImporter as a job parameter. All TMA samples in a given import will get the same value.

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

Legend:

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

    r5793 r5798  
    429429  public static final Annotationtype TMA_BLOCK_POS =
    430430    new Annotationtype("TMABlockPos", Type.STRING, false, Item.SAMPLE);
     431 
     432  /**
     433    Annotation to be used on samples/extracts that are
     434    "owned" by an external partner. First use case is
     435    TMA specimen, but could be used for other external
     436    items as well.
     437    @since 4.25
     438  */
     439  public static final Annotationtype SAMPLE_OWNER =
     440    new Annotationtype("SampleOwner", Type.STRING, false, Item.SAMPLE, Item.EXTRACT);
    431441 
    432442  /**
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/plugins/TMASpecimenImporter.java

    r5781 r5798  
    237237        storeValue(wrapper, request, ri.getParameter(Parameters.LOGFILE_PARAMETER));
    238238        storeValue(wrapper, request, excelSheetParameter);
     239        storeValue(wrapper, request, ri.getParameter("sampleOwner"));
    239240        storeValue(wrapper, request, ri.getParameter("idMethod"));
    240241
     
    283284  private Mapper commentMapper;
    284285  private String lastTMA_XId;
     286  private String sampleOwner;
    285287 
    286288  private boolean dryRun;
     
    294296    this.dryRun = job.getJob().isDryRun();
    295297    this.idMethod = getIdMethod(job.getValue("idMethod"));
     298    this.sampleOwner = job.getValue("sampleOwner");
    296299    this.caseQuery = Sample.getQuery();
    297300    Subtype.CASE.addFilter(dc, caseQuery);
     
    355358    Annotationtype.TMA_BLOCK_POS.setAnnotationValue(dc, tmaSpecimen, tmaBlockPosMapper.getString(data));
    356359    Annotationtype.PAD.setAnnotationValue(dc, tmaSpecimen, padMapper.getString(data));
     360    Annotationtype.SAMPLE_OWNER.setAnnotationValue(dc, tmaSpecimen, sampleOwner);
    357361   
    358362    numCreated++;
     
    410414        parameters.add(Parameters.logFileParameter(null, null, null));
    411415        parameters.add(Parameters.dryRunParameter(null, null, null));
     416       
     417        parameters.add(new PluginParameter<>("sampleOwner", "Sample owner",
     418          "Name of PI or other external entity that is the owner of TMA samples.",
     419          new StringParameterType(255, null, true)));
    412420       
    413421        Enumeration<String, String> idMethods = new Enumeration<String, String>();
     
    420428          "The method to use for finding existing cases. The plug-in can use either the " +
    421429          "SCAN-B ID or the Release ID.",
    422           new StringParameterType(null, null, true, 1, 0, 0, idMethods)
     430          new StringParameterType(255, null, true, 1, 0, 0, idMethods)
    423431        );
    424432        parameters.add(idMethodParameter);
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/InstallServlet.java

    r5792 r5798  
    442442        jsonChecks.add(checkAnnotationType(dc, Annotationtype.TMA_BLOCK, 1, null, createIfMissing, effectivePermissionsUse));
    443443        jsonChecks.add(checkAnnotationType(dc, Annotationtype.TMA_BLOCK_POS, 1, null, createIfMissing, effectivePermissionsUse));
     444        jsonChecks.add(checkAnnotationType(dc, Annotationtype.SAMPLE_OWNER, 1, null, createIfMissing, effectivePermissionsUse));
    444445
    445446        jsonChecks.add(checkAnnotationType(dc, Annotationtype.RLT_PLUS, 1, null, createIfMissing, effectivePermissionsUse));
     
    784785        jsonChecks.add(checkAnnotationTypeCategory(dc, Subtype.TMA_SPECIMEN, createIfMissing,
    785786            Annotationtype.TMA_BLOCK, Annotationtype.TMA_BLOCK_POS,
    786             Annotationtype.PAD
     787            Annotationtype.PAD, Annotationtype.SAMPLE_OWNER
    787788            ));
    788789       
Note: See TracChangeset for help on using the changeset viewer.