Changeset 4982


Ignore:
Timestamp:
Sep 26, 2018, 9:10:59 AM (4 years ago)
Author:
Nicklas Nordborg
Message:

References #1054: Even more functionality in the Flagged alignment wizard

Added PreNormalizedRNA as an option for the DoNotUse annotation. The options is of course only available if the alignment has a pre-normalied RNA item in the parent chain.

A minor complication is present when filtering on a QiaCube. It is possible that alignments from both a pre-normalized and a regular RNA exists and that there is a mixup that only affects the pre-normalized RNA. But the "Resolve" options are grouped by QiaCube positions so there is only one set of options for the two alignments. If the PreNormalizedRNA option is selected, only the pre-normalized RNA is marked as DoNotUse and we rely on the auto-unflag option to fix the regular RNA as if the Ok checkbox had been selected.

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

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/flaggedalignment/search.js

    r4981 r4982  
    444444      // Note! "mode-resolve" columns here to get the same order for grouping
    445445      html += '<th class="mode-resolve dottedleft">Ok</th>';
    446       html += '<th class="mode-resolve">DoNotUse</th>';
    447       html += '<th class="mode-resolve">FutureGT</th>';
     446      html += '<th class="mode-resolve" colspan="2">DoNotUse<span style="float:right;">FutureGT</span></th>';
    448447      html += '<th class="mode-resolve comment-col">Comment</th>';
    449448
     
    11351134          if (okToUse.value == 'ok-rna')
    11361135          {
    1137             item = {'type': 'EXTRACT', 'id': aligned.rna.id, 'okToUse': true, 'sort': 5 };
     1136            item = {'type': 'EXTRACT', 'id': aligned.rna.id, 'okToUse': true, 'sort': 6 };
    11381137          }
    11391138          else if (okToUse.value == 'ok-library')
    11401139          {
    1141             item = {'type': 'EXTRACT', 'id': aligned.lib.id, 'okToUse': true, 'sort': 6 };
     1140            item = {'type': 'EXTRACT', 'id': aligned.lib.id, 'okToUse': true, 'sort': 7 };
    11421141          }
    11431142        }
     
    11541153          item = {'type': 'EXTRACT', 'id': aligned.rna.id, 'doNotUse': 'RNA', 'sort': 3 };
    11551154        }
     1155        else if (doNotUse.value == 'prenormalized')
     1156        {
     1157          item = {'type': 'EXTRACT', 'id': aligned.preNormalizedRna.id, 'doNotUse': 'PreNormalizedRNA', 'sort': 4 };
     1158        }
    11561159        else if (doNotUse.value == 'library')
    11571160        {
    1158           item = {'type': 'EXTRACT', 'id': aligned.lib.id, 'doNotUse': 'Library', 'sort': 4 };
     1161          item = {'type': 'EXTRACT', 'id': aligned.lib.id, 'doNotUse': 'Library', 'sort': 5 };
    11591162        }
    11601163        else if (aligned.flagged && doNotUse.classList.contains('required'))
     
    13231326    var posA = a.rna.QIACUBE_POSITION;
    13241327    var posB = b.rna.QIACUBE_POSITION;
    1325     return posA < posB ? -1 : 1;
     1328    if (posA != posB) return posA < posB ? -1 : 1;
     1329   
     1330    // Critical, sort pre-normalized RNA before regular RNA to
     1331    // enable the 'PreNormalizedRNA' option in the 'DoNotUse' selection list
     1332    if (a.preNormalizedRna && !b.preNormalizedRna) return -1;
     1333    if (b.preNormalizedRna && !a.preNormalizedRna) return 1;
     1334   
     1335    return sort.sortByName(a, b);
    13261336  }
    13271337 
     
    15991609        html += '<option value="library">Library';
    16001610      }
     1611      if (aligned.preNormalizedRna)
     1612      {
     1613        html += '<option value="prenormalized">PreNormalizedRNA';
     1614      }
    16011615      html += '<option value="rna">RNA';
    16021616      html += '<option value="lysate">Lysate';
  • extensions/net.sf.basedb.reggie/trunk/resources/flaggedalignment/search.jsp

    r4980 r4982  
    117117#itemTable .comment-col input
    118118{
    119   width: 15em;
     119  width: calc(100% - 12px);
    120120}
    121121
     
    223223  border-right-width: 8px;
    224224  border-right-color: #2288AA;
     225}
     226
     227select.donotuse-options
     228{
     229    width: calc(100% - 10px);
    225230}
    226231
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/GenotypeServlet.java

    r4981 r4982  
    504504        ItemSubtype lysateType = Subtype.LYSATE.get(dc);
    505505        ItemSubtype rnaType = Subtype.RNA.get(dc);
     506        ItemSubtype preNormalizedType = Subtype.RNA_NORMALIZED_ALIQUOT.get(dc);
    506507        ItemSubtype libraryType = Subtype.LIBRARY.get(dc);
    507508        ItemList flaggedAlignments = BiomaterialList.FLAGGED_ALIGNMENT.get(dc);
     
    526527        int numLysate = 0;
    527528        int numRna = 0;
     529        int numPreNormalizedRna = 0;
    528530        int numLibrary = 0;
    529531       
     
    614616                else if (lysateType.equals(subtype)) numLysate++;
    615617                else if (rnaType.equals(subtype)) numRna++;
     618                else if (preNormalizedType.equals(subtype)) numPreNormalizedRna++;
    616619                else if (libraryType.equals(subtype)) numLibrary++;
    617620              }
     
    716719            msg.append(countMessage(numRna, "RNA", "RNA"));
    717720          }
     721          if (numPreNormalizedRna > 0)
     722          {
     723            if (msg.length() > 0) msg.append(", ");
     724            msg.append(countMessage(numPreNormalizedRna, "pre-normalized RNA", "pre-normalized RNA"));
     725          }
    718726          if (numLibrary > 0)
    719727          {
     
    953961      as.setAnnotation("flagged", checker.isFlagged(as.getItem()));
    954962      Library lib = as.getLibrary(dc);
    955       Rna rna = lib.getRna(dc, false);
     963      Rna rna = lib.getRna(dc, true);
     964      Rna prenormalizedRna = null;
     965      if (rna != null && rna.isPreNormalized(dc))
     966      {
     967        prenormalizedRna = rna;
     968        rna = Rna.get((Extract)rna.getExtract().getParent());
     969      }
    956970      Lysate lys = rna != null ? rna.getLysate() : null;
    957971      SpecimenTube sp = lys != null ? lys.getSpecimen() : null;
     
    975989     
    976990      if (lib != null) as.setAnnotation("lib", lib.asJSONObject());
     991      if (prenormalizedRna != null) as.setAnnotation("preNormalizedRna", prenormalizedRna.asJSONObject());
    977992      if (rna != null) as.setAnnotation("rna", rna.asJSONObject());
    978993      if (lys != null) as.setAnnotation("lysate", lys.asJSONObject());
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/InstallServlet.java

    r4972 r4982  
    588588       
    589589        jsonChecks.add(checkAnnotationType(dc, Annotationtype.DO_NOT_USE, 1,
    590             new ValueOptions("Specimen", "Lysate", "RNA", "Library"),
     590            new ValueOptions("Specimen", "Lysate", "RNA", "PreNormalizedRNA", "Library"),
    591591            createIfMissing, effectivePermissionsUse));
    592592        jsonChecks.add(checkAnnotationType(dc, Annotationtype.DO_NOT_USE_COMMENT, 1, null, createIfMissing, effectivePermissionsUse));
Note: See TracChangeset for help on using the changeset viewer.