Changeset 1573


Ignore:
Timestamp:
Mar 19, 2012, 8:52:09 AM (10 years ago)
Author:
Nicklas Nordborg
Message:

References #364: Put RNA aliquots on bioplate to be used by the Caliper machine

Display bioplate location in the list when selecting RNA extracts.

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

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/rnaqc_aliquot.jsp

    r1554 r1573  
    6868    {
    6969      var rna = rnaExtracts[i];
    70       var option = new Option(rna.name, rna.id);
     70      var name = rna.name;
     71      if (rna.bioWell)
     72      {
     73        name += ' -- ' + rna.bioWell.bioPlate.name + ' (' + WELL_ALPHA[rna.bioWell.row]+(rna.bioWell.column+1)+')';
     74      }
     75      var option = new Option(name, rna.id);
    7176      option.rna = rna;
    7277      rnaList.options[rnaList.length] = option;
     
    153158  }
    154159 
     160  var rna = response.rna;
     161  var name = rna.name;
     162  if (rna.bioWell)
     163  {
     164    name += ' -- ' + rna.bioWell.bioPlate.name + ' (' + WELL_ALPHA[rna.bioWell.row]+(rna.bioWell.column+1)+')';
     165  }
     166
    155167  var option = new Option(name, id, true, true);
    156   option.rna = response.rna;
     168  option.rna = rna;
    157169  rnaList[rnaList.length] = option;
    158170}
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/dao/Rna.java

    r1560 r1573  
    44import java.util.List;
    55
     6import org.json.simple.JSONObject;
     7
     8import net.sf.basedb.core.BioPlate;
     9import net.sf.basedb.core.BioWell;
    610import net.sf.basedb.core.DbControl;
    711import net.sf.basedb.core.Extract;
     
    7175  }
    7276 
     77 
     78  private JSONObject jsonWell;
     79 
    7380  private Rna(Extract extract)
    7481  {
     
    8491  {
    8592    return getItem();
     93  }
     94
     95  @SuppressWarnings("unchecked")
     96  @Override
     97  protected void initJSON(JSONObject json)
     98  {
     99    super.initJSON(json);
     100    if (jsonWell != null) json.put("bioWell", jsonWell);
     101   
    86102  }
    87103
     
    104120  }
    105121 
     122  /**
     123    Load information about the plate and location the current RNA
     124    is located on.
     125  */
     126  @SuppressWarnings("unchecked")
     127  public JSONObject loadBioPlateLocation()
     128  {
     129    if (jsonWell != null) return jsonWell;
     130
     131    Extract rna = getItem();
     132    BioWell well = rna.getBioWell();
     133
     134    if (well != null)
     135    {
     136      jsonWell = new JSONObject();
     137      jsonWell.put("id", well.getId());
     138      jsonWell.put("row", well.getRow());
     139      jsonWell.put("column", well.getColumn());
     140      jsonWell.put("canAdd", well.canAddBioMaterial());
     141      jsonWell.put("canRemove", well.canClearBioMaterial());
     142     
     143      BioPlate plate = well.getPlate();
     144      JSONObject jsonPlate = new JSONObject();
     145      jsonPlate.put("id", plate.getId());
     146      jsonPlate.put("name", plate.getName());
     147      jsonPlate.put("barcode", plate.getBarcode());
     148   
     149      jsonWell.put("bioPlate", jsonPlate);
     150    }
     151
     152    return jsonWell;
     153  }
     154 
    106155}
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/RnaQcServlet.java

    r1566 r1573  
    115115        for (Rna r : rna)
    116116        {
     117          r.loadBioPlateLocation();
    117118          r.setAnnotation("nextRnaQcName", r.getName()+".qc");
    118119          r.loadAnnotations(dc, "NDConc", Reggie.ANNOTATION_ND_CONC, null);
     
    133134        Rna rna = Rna.getById(dc, rnaId);
    134135       
     136        rna.loadBioPlateLocation();
    135137        rna.setAnnotation("nextRnaQcName", rna.getNextRnaQcName(dc));
    136138        rna.loadAnnotations(dc, "NDConc", Reggie.ANNOTATION_ND_CONC, null);
Note: See TracChangeset for help on using the changeset viewer.