Changeset 2267


Ignore:
Timestamp:
Mar 5, 2014, 12:58:14 PM (9 years ago)
Author:
Nicklas Nordborg
Message:

References #547: Start Demux and Merge

First prototype of the 'start demux and merge' wizard. It allows the user to select one or more SequencingRun items and configure (some) parameters for the demux. The final registration creates DemuxedSequences (1 per selected sequencing run) and MergedSequences (1 per unique library) items.

Final output is a list of shell commands to run, and these are also recorded as Job items. Don't know how useful this is at the moment. I guess we need to know more about how the result of the demux/merge is supposed to get back to BASE is needed.

Location:
extensions/net.sf.basedb.reggie/trunk
Files:
8 edited
2 copied

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/META-INF/servlets.xml

    r2266 r2267  
    5454  </servlet>
    5555  <servlet>
     56    <servlet-name>Software</servlet-name>
     57    <servlet-class>net.sf.basedb.reggie.servlet.SoftwareServlet</servlet-class>
     58  </servlet>
     59  <servlet>
    5660    <servlet-name>SampleReport</servlet-name>
    5761    <servlet-class>net.sf.basedb.reggie.servlet.SampleReportServlet</servlet-class>
     
    8690  </servlet>
    8791  <servlet>
     92    <servlet-name>DemuxMerge</servlet-name>
     93    <servlet-class>net.sf.basedb.reggie.servlet.DemuxMergeServlet</servlet-class>
     94  </servlet>
     95  <servlet>
    8896    <servlet-name>CaseSummary</servlet-name>
    8997    <servlet-class>net.sf.basedb.reggie.servlet.CaseSummaryServlet</servlet-class>
  • extensions/net.sf.basedb.reggie/trunk/resources/index.jsp

    r2266 r2267  
    229229    else if (what == 'unconfirmed-sequencing-runs')
    230230    {
    231       url = 'SequencingRun.servlet?ID=<%=ID%>&cmd=CountUncomfirmedSequencingRuns';
     231      url = 'SequencingRun.servlet?ID=<%=ID%>&cmd=CountUnconfirmedSequencingRuns';
     232    }
     233    else if (what == 'confirmed-sequencing-runs-for-demux')
     234    {
     235      url = 'DemuxMerge.servlet?ID=<%=ID%>&cmd=CountConfirmedSequencingRuns';
    232236    }
    233237   
     
    404408      var count = error ? -1 : response.count;
    405409      setCount('count.unconfirmed-sequencing-run', count, 'sequencing runs', msg);
     410      startCounting('confirmed-sequencing-runs-for-demux');
     411    }
     412    else if (currentCount == 'confirmed-sequencing-runs-for-demux')
     413    {
     414      var msg = error || 'Number of confirmed sequencing runs waiting to be demuxed';
     415      var count = error ? -1 : response.count;
     416      setCount('count.confirmed-sequencing-run', count, 'sequencing runs', msg);
    406417    }
    407418   
     
    704715              >Confirm sequencing completed</span> <span class="counter" id="count.unconfirmed-sequencing-run" title="Counting..."><img src="images/loading-small.gif"></span>
    705716           
    706             <li><span class="require-permission not-implemented" data-role="SecondaryAnalysis" data-link="analysis/demux_start.jsp?ID=<%=ID%>"
    707               >Start demux and merge</span>
     717            <li><span class="require-permission" data-role="SecondaryAnalysis" data-link="analysis/demux_start.jsp?ID=<%=ID%>"
     718              >Start demux and merge</span> <span class="counter" id="count.confirmed-sequencing-run" title="Counting..."><img src="images/loading-small.gif"></span>
    708719            <li><span class="require-permission not-implemented" data-role="SecondaryAnalysis" data-link="analysis/demux_end.jsp?ID=<%=ID%>"
    709720              >Register demux and merge completed</span>
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/dao/Library.java

    r2266 r2267  
    99import net.sf.basedb.core.BioWell;
    1010import net.sf.basedb.core.DbControl;
     11import net.sf.basedb.core.DerivedBioAssay;
    1112import net.sf.basedb.core.Extract;
     13import net.sf.basedb.core.Include;
    1214import net.sf.basedb.core.ItemQuery;
    1315import net.sf.basedb.core.Tag;
     
    146148    return jsonWell;
    147149  }
     150 
     151  /**
     152    Find the next name to give a "MergedSequences" child item. This assumes that
     153    all child items are using the naming convention. foo.g, foo.g2, and
     154    so on. NOTE! The first child item have no number!
     155    @return The next unused name
     156  */
     157  public String getNextMergedSequencesName(DbControl dc)
     158  {
     159    Extract lib = getItem();
     160   
     161    ItemQuery<DerivedBioAssay> query = DerivedBioAssay.getQuery();
     162    Subtype.MERGED_SEQUENCES.addFilter(dc, query);
     163    query.setIncludes(Include.ALL);
     164    query.restrict(Restrictions.eq(Hql.property("extract"), Hql.entity(lib)));
     165    long count = query.count(dc);
     166    return lib.getName() + ".g" + (count == 0 ? "" : count+1);
     167  }
     168
    148169}
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/dao/SequencingRun.java

    r2266 r2267  
    1010import net.sf.basedb.core.DerivedBioAssay;
    1111import net.sf.basedb.core.Extract;
     12import net.sf.basedb.core.Include;
    1213import net.sf.basedb.core.ItemQuery;
    1314import net.sf.basedb.core.Type;
     
    169170    super.initJSON(json);
    170171  }
     172 
     173  /**
     174    Find the next name to give a "DemuxedSequences" child item. This assumes that
     175    all child items are using the naming convention. foo.dx, foo.dx2, and
     176    so on. NOTE! The first child item have no number!
     177    @return The next unused name
     178  */
     179  public String getNextDemuxedSequencesName(DbControl dc)
     180  {
     181    DerivedBioAssay seqRun = getItem();
     182   
     183    ItemQuery<DerivedBioAssay> query = seqRun.getChildren();
     184    Subtype.DEMUXED_SEQUENCES.addFilter(dc, query);
     185    query.setIncludes(Include.ALL);
     186    long count = query.count(dc);
     187    return seqRun.getName() + ".dx" + (count == 0 ? "" : count+1);
     188  }
    171189
    172190
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/dao/Subtype.java

    r2266 r2267  
    195195  */
    196196  public static final Subtype SEQUENCING_RUN = new Subtype("SequencingRun", Item.DERIVEDBIOASSAY, false);
     197
     198  /**
     199    The definition of the "DemuxedSequences" derived bioassay subtype.
     200    @since 2.16
     201  */
     202  public static final Subtype DEMUXED_SEQUENCES = new Subtype("DemuxedSequences", Item.DERIVEDBIOASSAY, false);
     203
     204  /**
     205    The definition of the "MergedSequences" derived bioassay subtype.
     206    @since 2.16
     207  */
     208  public static final Subtype MERGED_SEQUENCES = new Subtype("MergedSequences", Item.DERIVEDBIOASSAY, false);
    197209 
    198210  /**
     
    257269  public static final Subtype SEQUENCING_PROTOCOL = new Subtype("Sequencing", Item.PROTOCOL, false);
    258270
    259  
     271  /**
     272    The definition of the "Demuxing" protocol subtype.
     273    @since 2.16
     274  */
     275  public static final Subtype DEMUX_PROTOCOL = new Subtype("Demuxing", Item.PROTOCOL, false);
     276
     277  /**
     278    The definition of the "Demuxing" software subtype.
     279    @since 2.16
     280  */
     281  public static final Subtype DEMUX_SOFTWARE = new Subtype("Demuxing", Item.SOFTWARE, false);
     282
     283  /**
     284    The definition of the "Merging" protocol subtype.
     285    @since 2.16
     286  */
     287  public static final Subtype MERGE_PROTOCOL = new Subtype("Merging", Item.PROTOCOL, false);
     288 
     289  /**
     290    The definition of the "Merging" software subtype.
     291    @since 2.16
     292  */
     293  public static final Subtype MERGE_SOFTWARE = new Subtype("Merging", Item.SOFTWARE, false);
     294     
    260295  /**
    261296    File subtype for BioAnalyzer PDF reports.
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/plugins/FlowCellSampleSheetExporter.java

    r2266 r2267  
    654654  }
    655655 
    656   private String sequencingCycles2ReadString(String sequencingCycles)
     656  public static String sequencingCycles2ReadString(String sequencingCycles)
    657657  {
    658658    StringBuilder readString = new StringBuilder();
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/DemuxMergeServlet.java

    r2265 r2267  
    298298        jsonCmds.put("merge", jsonMergeCmds);
    299299        json.put("cmds", jsonCmds);
    300         //dc.commit();
     300        dc.commit();
    301301      }
    302302     
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/InstallServlet.java

    r2266 r2267  
    202202        jsonChecks.add(checkSubtype(dc, Subtype.SEQUENCING_PROTOCOL, createIfMissing));
    203203        jsonChecks.add(checkSubtype(dc, Subtype.SEQUENCING_RUN, createIfMissing, Subtype.FLOW_CELL, Subtype.SEQUENCER, Subtype.SEQUENCING_PROTOCOL));
     204        jsonChecks.add(checkSubtype(dc, Subtype.DEMUX_PROTOCOL, createIfMissing));
     205        jsonChecks.add(checkSubtype(dc, Subtype.DEMUX_SOFTWARE, createIfMissing));
     206        jsonChecks.add(checkSubtype(dc, Subtype.DEMUXED_SEQUENCES, createIfMissing, Subtype.SEQUENCING_RUN, Subtype.DEMUX_PROTOCOL, Subtype.DEMUX_SOFTWARE));
     207        jsonChecks.add(checkSubtype(dc, Subtype.MERGE_PROTOCOL, createIfMissing));
     208        jsonChecks.add(checkSubtype(dc, Subtype.MERGE_SOFTWARE, createIfMissing));
     209        jsonChecks.add(checkSubtype(dc, Subtype.MERGED_SEQUENCES, createIfMissing, Subtype.DEMUXED_SEQUENCES, Subtype.MERGE_PROTOCOL, Subtype.MERGE_SOFTWARE));
    204210
    205211        // Plate geometries
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/SequencingRunServlet.java

    r2266 r2267  
    136136        json.put("sequencingRuns", jsonRuns);
    137137      }
    138       else if ("CountUncomfirmedSequencingRuns".equals(cmd))
     138      else if ("CountUnconfirmedSequencingRuns".equals(cmd))
    139139      {
    140140        dc = sc.newDbControl();
Note: See TracChangeset for help on using the changeset viewer.