Changeset 3526


Ignore:
Timestamp:
Oct 5, 2015, 8:57:32 AM (7 years ago)
Author:
olle
Message:

Refs #801. Refs #816. Case summary updated to present information on fpa and fpb DNA aliquots in a separate section (initially the "Library" section will be used), instead of the "DNA" section:

  1. JSP file case_summary.jsp in resources/reports/ updated with "Library" section (previously commented out), after the "DNA" section.
  2. Javascript file case_summary.js in resources/reports/ updated in function caseInfoLoaded(response) to obtain information on fpa and fpb DNA aliquots from the CaseSummaryServlet response, and insert it in appropriate fields in the "Library" section of the case summary form. Code for barcode name updated to display "NA", if not defined.
  3. Java servlet class/file CaseSummaryServlet.java in src/net/sf/basedb/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetCaseInfo" to send information on fpa and fpb DNA aliquots in new JSON object with key "lib". The barcode string is constructed based on the well location on the library plate.
Location:
extensions/net.sf.basedb.meludi/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.meludi/trunk/resources/reports/case_summary.js

    r3434 r3526  
    240240      Doc.hide('cdna-details');
    241241    }
    242    
     242*/   
    243243    var lib = response.lib;
    244244    if (lib && lib.length > 0)
     
    247247      for (var i = 0; i < lib.length; i++)
    248248      {
    249         var r = lib[i];
    250         cs.addColumn('lib.name', cs.asLink('EXTRACT', r));
    251         cs.addColumn('lib.registrationDate', cs.asDate(r.registrationDate));
    252         cs.addColumn('lib.storageBox', cs.asBioPlateLocation(r.bioWell));
    253         cs.addColumn('lib.result', (r.result && r.result != 'Successful') ? cs.asFailInfo(r.result, 'error.png') : null);
    254         cs.addColumn('lib.cleanupDate', cs.asDate(r.cleanupDate)+cs.asLabEnvLink('http://givare2.onk.lu.se/', r.cleanupDate, 'Library cleanup: ' + r.name, 'thermometer.png'));
    255         cs.addColumn('lib.remainingQuantity', cs.asQuantity(r.remainingQuantity, ' ng', 0.001));
    256         cs.addColumn('lib.originalQuantity', cs.asQuantity(r.originalQuantity, ' ng', 0.001));
    257         cs.addColumn('lib.barcode.name', r.barcode.name);
    258         cs.addColumn('lib.ca_size', cs.asQuantity(r.ca_size, ''));
    259         cs.addColumn('lib.molarity', cs.asQuantity(r.library_molarity_est, ' nM'));
    260         cs.addColumn('lib.adapterFrac', cs.asPercent(r.library_frac_adpt));
    261         cs.addColumn('lib.qubitconc', cs.asQuantity(r.qubitconc, ' ng/µl'));
    262         cs.addColumn('lib.description', cs.truncate(r.description, truncateAt));
     249        var d = lib[i];
     250        var barcodeName = 'NA';
     251        if (d.barcode != null)
     252        {
     253          barcodeName = d.barcode.name;
     254        }
     255        cs.addColumn('lib.name', cs.asLink('EXTRACT', d));
     256        cs.addColumn('lib.registrationDate', cs.asDate(d.registrationDate));
     257        cs.addColumn('lib.storageBox', cs.asBioPlateLocation(d.bioWell));
     258        cs.addColumn('lib.result', (d.result && d.result != 'Successful') ? cs.asFailInfo(d.result, 'error.png') : null);
     259        cs.addColumn('lib.cleanupDate', cs.asDate(d.cleanupDate)+cs.asLabEnvLink('http://givare2.onk.lu.se/', d.cleanupDate, 'Library cleanup: ' + d.name, 'thermometer.png'));
     260        cs.addColumn('lib.remainingQuantity', cs.asQuantity(d.remainingQuantity, ' ng', 0.001));
     261        cs.addColumn('lib.originalQuantity', cs.asQuantity(d.originalQuantity, ' ng', 0.001));
     262        cs.addColumn('lib.barcode.name', barcodeName);
     263        cs.addColumn('lib.ca_size', cs.asQuantity(d.ca_size, ''));
     264        cs.addColumn('lib.molarity', cs.asQuantity(d.library_molarity_est, ' nM'));
     265        cs.addColumn('lib.adapterFrac', cs.asPercent(d.library_frac_adpt));
     266        cs.addColumn('lib.qubitconc', cs.asQuantity(d.qubitconc, ' ng/µl'));
     267        cs.addColumn('lib.description', cs.truncate(d.description, truncateAt));
    263268      }
    264269    }
     
    268273      Doc.hide('lib-details');
    269274    }
    270 
     275/*
    271276    var pooledLib = response.pooledlib;
    272277    if (pooledLib && pooledLib.length > 0)
  • extensions/net.sf.basedb.meludi/trunk/resources/reports/case_summary.jsp

    r3434 r3526  
    487487          </div>
    488488        </div>
    489        
     489-->
    490490        <div class="info-section" id="lib-info">
    491491          <div>
     
    537537          </div>
    538538        </div>
    539        
     539<!--       
    540540        <div class="info-section" id="pooledlib-info">
    541541          <div>
  • extensions/net.sf.basedb.meludi/trunk/src/net/sf/basedb/meludi/servlet/CaseSummaryServlet.java

    r3434 r3526  
    223223        {
    224224          JSONArray jsonDna = new JSONArray();
     225          JSONArray jsonLib = new JSONArray();
    225226          for (Dna d : dna)
    226227          {
     
    237238              }
    238239            }
    239             jsonDna.add(jsonD);
     240            if (d.getName().endsWith(".d"))
     241            {
     242              jsonDna.add(jsonD);
     243            }
     244            else if (d.getName().endsWith(".fpa") || d.getName().endsWith(".fpb"))
     245            {
     246              // Get BioWell row and column (0-based)
     247              JSONObject jsonWell = new JSONObject();
     248              JSONObject jsonDnaTmp = (JSONObject) d.asJSONObject();
     249              jsonWell = (JSONObject) jsonDnaTmp.get("bioWell");
     250              Integer row = null;
     251              Integer col = null;
     252              if (jsonWell != null)
     253              {
     254                row = (Integer) jsonWell.get("row");
     255                col = (Integer) jsonWell.get("column");
     256              }
     257              // Add barcode name
     258              JSONObject jsonBarcode = new JSONObject();
     259              if (row != null && col != null)
     260              {
     261                String rowStr = "50" + (row + 1);
     262                String colStr = "70" + (col + 1);
     263                if (col > 8)
     264                {
     265                  colStr = "7" + (col + 1);
     266                }
     267                jsonBarcode.put("name", rowStr + "," + colStr);
     268              }
     269              jsonD.put("barcode", jsonBarcode);
     270              jsonLib.add(jsonD);
     271            }
    240272          }
    241273          jsonSections.add(loadSectionInfo(sc, "dna"));
    242274          json.put("dna", jsonDna);
     275          jsonSections.add(loadSectionInfo(sc, "lib"));
     276          json.put("lib", jsonLib);
    243277        }
    244278
Note: See TracChangeset for help on using the changeset viewer.