Changeset 6000


Ignore:
Timestamp:
Sep 10, 2020, 9:56:02 AM (12 months ago)
Author:
Nicklas Nordborg
Message:

References #1265: Export more information in the release exporter

Added Model annotation to Hardware items of subtype Sequencer and export that as SequencerModel in the release export.

Location:
extensions/net.sf.basedb.reggie/branches/4.27-stable/src/net/sf/basedb/reggie
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/branches/4.27-stable/src/net/sf/basedb/reggie/dao/Annotationtype.java

    r5968 r6000  
    17181718
    17191719  /**
     1720    The "Model" annotation, used for hardware items.
     1721    It is a string annotation containing the generic name of
     1722    the model of the hardware.
     1723    @since 4.27.4
     1724  */
     1725  public static final Annotationtype HARDWARE_MODEL =
     1726    new Annotationtype("Model", Type.STRING, false, Item.HARDWARE);
     1727
     1728 
     1729  /**
    17201730    The "ParameterSet" annotation, used for software items.
    17211731    It is a string annotation containing a named set of alternate
  • extensions/net.sf.basedb.reggie/branches/4.27-stable/src/net/sf/basedb/reggie/plugins/release/MergedWriter.java

    r5999 r6000  
    8686      Set<String> readStrings = getReadStrings(item, demuxedSequences);
    8787      Set<String> poolNames = getSequencedPoolNames(item, demuxedSequences, poolsWithLib);
    88       Set<String> sequencers = getSequencerSerials(item, sequencingRuns);
     88      Set<String> sequencerSerials = getSequencerSerials(item, sequencingRuns);
     89      Set<String> sequencerModels = getSequencerModels(item, sequencingRuns);
    8990     
    9091      jsonAnnotations.add(item.createAnnotationJSON("DemuxSoftware", Values.getString(demuxSoftware, ";", true)));
    9192      jsonAnnotations.add(item.createAnnotationJSON("ReadString", Values.getString(readStrings, ";", true)));
    92       jsonAnnotations.add(item.createAnnotationJSON("SequencerSerial", Values.getString(sequencers, ";", true)));
     93      jsonAnnotations.add(item.createAnnotationJSON("SequencerSerial", Values.getString(sequencerSerials, ";", true)));
     94      jsonAnnotations.add(item.createAnnotationJSON("SequencerModel", Values.getString(sequencerModels, ";", true)));
    9395      jsonAnnotations.add(item.createAnnotationJSON("PoolName", Values.getString(poolNames, ";", true)));
    9496     
     
    143145      Set<String> demuxSoftware = getDemuxSoftwareNames(item, demuxedSequences);
    144146      Set<String> poolNames = getSequencedPoolNames(item, demuxedSequences, poolsWithLib);
    145       Set<String> sequencers = getSequencerSerials(item, sequencingRuns);
     147      Set<String> sequencerSerials = getSequencerSerials(item, sequencingRuns);
     148      Set<String> sequencerModels = getSequencerModels(item, sequencingRuns);
    146149     
    147150      jsonAnnotations.add(item.createAnnotationJSON("DemuxSoftware", Values.getString(demuxSoftware, ";", true)));
    148151      jsonAnnotations.add(item.createAnnotationJSON("ReadString", Values.getString(readStrings, ";", true)));
    149       jsonAnnotations.add(item.createAnnotationJSON("SequencerSerial", Values.getString(sequencers, ";", true)));
     152      jsonAnnotations.add(item.createAnnotationJSON("SequencerSerial", Values.getString(sequencerSerials, ";", true)));
     153      jsonAnnotations.add(item.createAnnotationJSON("SequencerModel", Values.getString(sequencerModels, ";", true)));
    150154      jsonAnnotations.add(item.createAnnotationJSON("PoolName", Values.getString(poolNames, ";", true)));
    151155     
     
    187191 
    188192  /**
     193    Get the model of the sequencers that have been involved in
     194    creating the merged sequences. Typically it is a single sequencer,
     195    but there are cases where data comes from multiple sequencing
     196    runs on different sequencers.
     197    @since 4.27.4
     198  */
     199  private Set<String> getSequencerModels(CohortItem item, List<SequencingRun> sequencingRuns)
     200  {
     201    Set<String> models = new TreeSet<>();
     202    for (SequencingRun sr : sequencingRuns)
     203    {
     204      String m = (String)item.getAnnotationValue(Annotationtype.HARDWARE_MODEL, sr.getItem().getHardware());
     205      if (m != null) models.add(m);
     206    }
     207    return models;
     208  }
     209
     210 
     211  /**
    189212    Get the read strings used to demux the data in the given demuxed sequences.
    190213    Typically the same read string is used for all data, but there are cases
     
    262285    mergedFactory.createAnnotationType("DemuxSoftware", Type.STRING);
    263286    mergedFactory.createAnnotationType("PoolName", Type.STRING);
     287    mergedFactory.createAnnotationType("SequencerModel", Type.STRING); // Annotationtype.HARDWARE_MODEL
    264288    mergedFactory.createAnnotationType("SequencerSerial", Type.STRING);
    265289    mergedFactory.createAnnotationType("ReadString", Type.STRING);
  • extensions/net.sf.basedb.reggie/branches/4.27-stable/src/net/sf/basedb/reggie/servlet/InstallServlet.java

    r5968 r6000  
    676676        jsonChecks.add(checkAnnotationType(dc, Annotationtype.BARCODE_SEQUENCE_2, 1, null, createIfMissing, effectivePermissionsUse));
    677677        jsonChecks.add(checkAnnotationType(dc, Annotationtype.SERIAL_NUMBER, 1, null, createIfMissing, effectivePermissionsUse));
     678        jsonChecks.add(checkAnnotationType(dc, Annotationtype.HARDWARE_MODEL, 1, null, createIfMissing, effectivePermissionsUse));
    678679       
    679680        jsonChecks.add(checkAnnotationType(dc, Annotationtype.PARAMETER_SET, 1, null, createIfMissing, secondaryAnalysisUse));
     
    10501051       
    10511052        jsonChecks.add(checkAnnotationTypeCategory(dc, Subtype.SEQUENCER, createIfMissing,
    1052           Annotationtype.SERIAL_NUMBER, Annotationtype.FLOWCELL_TYPE
     1053          Annotationtype.SERIAL_NUMBER, Annotationtype.HARDWARE_MODEL, Annotationtype.FLOWCELL_TYPE
    10531054        ));
    10541055       
Note: See TracChangeset for help on using the changeset viewer.