Changeset 5999


Ignore:
Timestamp:
Sep 9, 2020, 3:29:02 PM (13 months ago)
Author:
Nicklas Nordborg
Message:

References #1265: Export more information in the release exporter

Added DemuxSoftware to the export.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/branches/4.27-stable/src/net/sf/basedb/reggie/plugins/release/MergedWriter.java

    r5861 r5999  
    8383      List<PooledLibrary> poolsWithLib = item.getPools(lib);
    8484     
     85      Set<String> demuxSoftware = getDemuxSoftwareNames(item, demuxedSequences);
    8586      Set<String> readStrings = getReadStrings(item, demuxedSequences);
    8687      Set<String> poolNames = getSequencedPoolNames(item, demuxedSequences, poolsWithLib);
    8788      Set<String> sequencers = getSequencerSerials(item, sequencingRuns);
    8889     
     90      jsonAnnotations.add(item.createAnnotationJSON("DemuxSoftware", Values.getString(demuxSoftware, ";", true)));
    8991      jsonAnnotations.add(item.createAnnotationJSON("ReadString", Values.getString(readStrings, ";", true)));
    9092      jsonAnnotations.add(item.createAnnotationJSON("SequencerSerial", Values.getString(sequencers, ";", true)));
     
    139141     
    140142      Set<String> readStrings = getReadStrings(item, demuxedSequences);
     143      Set<String> demuxSoftware = getDemuxSoftwareNames(item, demuxedSequences);
    141144      Set<String> poolNames = getSequencedPoolNames(item, demuxedSequences, poolsWithLib);
    142145      Set<String> sequencers = getSequencerSerials(item, sequencingRuns);
    143146     
     147      jsonAnnotations.add(item.createAnnotationJSON("DemuxSoftware", Values.getString(demuxSoftware, ";", true)));
    144148      jsonAnnotations.add(item.createAnnotationJSON("ReadString", Values.getString(readStrings, ";", true)));
    145149      jsonAnnotations.add(item.createAnnotationJSON("SequencerSerial", Values.getString(sequencers, ";", true)));
     
    199203 
    200204  /**
     205    Get the name of the software used in demuxing. A merged item **should**
     206    have the same software for all DemuxedSequences. We do not check this
     207    but return all names that we find.
     208    @since 4.27.4
     209  */
     210  private Set<String> getDemuxSoftwareNames(CohortItem item, List<DemuxedSequences> demuxedSequences)
     211  {
     212    Set<String> softwareNames = new TreeSet<>();
     213    for (DemuxedSequences dx : demuxedSequences)
     214    {
     215      String software = getName(dx.getItem().getSoftware());
     216      if (software != null) softwareNames.add(software);
     217    }
     218    return softwareNames;
     219  }
     220 
     221  /**
    201222    Get the pool names that overlap between the given list of pools (expected to be pools from
    202223    the same library) and the pools that was sequenced in the given sequencing runs.
     
    239260    mergedFactory.createFileType(Datafiletype.FASTQ);
    240261   
     262    mergedFactory.createAnnotationType("DemuxSoftware", Type.STRING);
    241263    mergedFactory.createAnnotationType("PoolName", Type.STRING);
    242264    mergedFactory.createAnnotationType("SequencerSerial", Type.STRING);
Note: See TracChangeset for help on using the changeset viewer.