Changeset 6216


Ignore:
Timestamp:
Apr 16, 2021, 2:03:41 PM (13 months ago)
Author:
Nicklas Nordborg
Message:

References #1295: Registration of specimen handled by external lab

The SCAN-B report failed if the library doesn't have a protocol.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/pdf/ScanBReportWorker.java

    r6100 r6216  
    2626import net.sf.basedb.core.DbControl;
    2727import net.sf.basedb.core.Extract;
     28import net.sf.basedb.core.Protocol;
    2829import net.sf.basedb.core.RawBioAssay;
    2930import net.sf.basedb.core.Sample;
     
    219220    Map<Subtype, BioMaterial> parents = raw.findParentBioMaterial(dc, Subtype.PATIENT, Subtype.CASE, Subtype.SPECIMEN, Subtype.LYSATE, Subtype.RNA, Subtype.LIBRARY);
    220221    Extract lib = (Extract)parents.get(Subtype.LIBRARY);
     222    Protocol libProtocol = lib == null ? null : lib.getProtocol();
    221223    Extract rna = (Extract)parents.get(Subtype.RNA);
    222224    Extract lysate = (Extract)parents.get(Subtype.LYSATE);
     
    334336      header[1] = translations.get(Annotationtype.LATERALITY.getAnnotationValue(dc, specimen));
    335337      header[2] = lib == null ? null : DATE_FORMAT.convert(lib.getCreationEvent().getEventDate());
    336       header[3] = lib == null ? null : translations.get(lib.getProtocol().getName());
     338      header[3] = libProtocol == null ? null : translations.get(libProtocol.getName());
    337339      header[4] = count.format(dc, Annotationtype.FRAGMENT_SIZE_AVG, aligned) + "/" + count.format(dc, Annotationtype.FRAGMENT_SIZE_STDEV, aligned);
    338340      header[5] = translations.get(Annotationtype.PIPELINE.getAnnotationValue(dc, rba));
Note: See TracChangeset for help on using the changeset viewer.