Changeset 3492


Ignore:
Timestamp:
Sep 18, 2015, 9:01:00 AM (8 years ago)
Author:
Nicklas Nordborg
Message:

References #812: Pilot report wizard

Added a pilot wizard stub. The report is more more or less a copy of the current gene report but without the validation cohort reference. The GUI and servlet is using the same code as the gene report. The plug-in is currently an independent class, but I think it is possible to refactor this code as well to make a common "Report" plug-in with multiple configurations.

Location:
extensions/net.sf.basedb.reggie/trunk
Files:
5 added
3 deleted
6 edited

Legend:

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

    r3491 r3492  
    112112    </settings>
    113113  </plugin-definition>
     114  <plugin-definition id="PilotReportPlugin">
     115    <about>
     116      <name>Pilot report</name>
     117      <description>
     118        Plug-in for generating the pilot report in PDF format.
     119      </description>
     120    </about>
     121    <plugin-class>net.sf.basedb.reggie.plugins.PilotReportPlugin</plugin-class>
     122    <settings>
     123      <property name="everyone-use">0</property>
     124      <property name="immediate-execution">1</property>
     125    </settings>
     126  </plugin-definition>
    114127  <plugin-definition id="GeneReportsCombinerPlugin">
    115128    <about>
  • extensions/net.sf.basedb.reggie/trunk/META-INF/servlets.xml

    r3488 r3492  
    126126  </servlet>
    127127  <servlet>
    128     <servlet-name>GeneReport</servlet-name>
    129     <servlet-class>net.sf.basedb.reggie.servlet.GeneReportServlet</servlet-class>
     128    <servlet-name>Report</servlet-name>
     129    <servlet-class>net.sf.basedb.reggie.servlet.ReportServlet</servlet-class>
    130130  </servlet>
    131131  <servlet>
  • extensions/net.sf.basedb.reggie/trunk/config/reggie-config.xml

    r3487 r3492  
    2323      <pdf-name>genereport.pdf</pdf-name>
    2424    </gene-report>
     25   
     26    <!-- options for the 'pilot report' script -->
     27    <pilot-report>
     28      <!-- full path to the R script -->
     29      <path>/path/to/pilot-report.R</path>
     30      <!-- full path to directory with SCAN-B reference data -->
     31      <!-- default is same directory as the R script -->
     32      <ref-dir-scanb></ref-dir-scanb>
     33      <!-- full path to the PDF template -->
     34      <!-- default is 'template.pdf' in the same directory as the R script -->
     35      <template></template>
     36      <!-- file name in BASE for storing the generated report  -->
     37      <pdf-name>pilotreport.pdf</pdf-name>
     38    </pilot-report>
     39   
    2540  </rscript>
    2641
  • extensions/net.sf.basedb.reggie/trunk/resources/index.jsp

    r3484 r3492  
    784784          <dd>
    785785            <ul>
    786             <li><span class="require-permission" data-role="SecondaryAnalysis" data-link="analysis/gene_report.jsp?ID=<%=ID%>"
     786            <li><span class="require-permission" data-role="SecondaryAnalysis" data-link="analysis/report.jsp?ID=<%=ID%>&report=GeneReport"
    787787              >Gene report</span>
    788788            <span class="counter" data-counter="rawbioassys-without-genereport"
    789789                title="Number of rawbioassays without a Gene report PDF">∙</span>
     790            <li><span class="require-permission" data-role="SecondaryAnalysis" data-link="analysis/report.jsp?ID=<%=ID%>&report=PilotReport"
     791              >Pilot report</span>
     792            <span class="counter" data-counter="rawbioassys-without-pilotreport"
     793                title="Number of rawbioassays without a Pilot report PDF">∙</span>
    790794            </ul>
    791795          </dd>
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/counter/CounterService.java

    r3424 r3492  
    3838import net.sf.basedb.reggie.query.AnyToAnyRestriction;
    3939import net.sf.basedb.reggie.r.GeneReport;
     40import net.sf.basedb.reggie.r.PilotReport;
    4041import net.sf.basedb.util.extensions.Extension;
    4142
     
    988989  private void countRawBioAssays(DbControl dc, JSONObject json)
    989990  {
    990     String pdfName = Reggie.getConfig().getConfig("rscript/gene-report/pdf-name", null, GeneReport.DEFAULT_PDF_NAME);
     991    String geneReportPdfName = Reggie.getConfig().getConfig("rscript/gene-report/pdf-name", null, GeneReport.DEFAULT_PDF_NAME);
     992    String pilotReportPdfName = Reggie.getConfig().getConfig("rscript/pilot-report/pdf-name", null, PilotReport.DEFAULT_PDF_NAME);
    991993
    992994    // Raw bioassays not confirmed
     
    10191021    query.restrict(Restrictions.eq(Hql.alias("ar"), Expressions.string(Rawbioassay.FEATURE_EXTRACTION_SUCCESSFUL)));
    10201022    // Must not have 'genereport.pdf' already (no filter on FILE! since it may be in progress if linked to JOB)
    1021     query.restrict(AnyToAnyRestriction.missing(pdfName, null));
     1023    query.restrict(AnyToAnyRestriction.missing(geneReportPdfName, null));
    10221024    query.setCacheResult(true);
    10231025    json.put("rawbioassys-without-genereport", query.count(dc));
     1026    // ---
     1027   
     1028    // Raw bioassays without pilot report
     1029    query = RawBioAssay.getQuery();
     1030    query.setIncludes(Reggie.INCLUDE_IN_CURRENT_PROJECT);
     1031    query.restrict(Restrictions.eq(Hql.property("variant.externalId"), Expressions.string(PlatformVariant.SEQUENCING_EXPRESSION)));
     1032    // Must have a ANALYSIS_RESULT=Successful annotation
     1033    query.join(Annotations.leftJoin(null, Annotationtype.ANALYSIS_RESULT.load(dc), "ar"));
     1034    query.restrict(Restrictions.eq(Hql.alias("ar"), Expressions.string(Rawbioassay.FEATURE_EXTRACTION_SUCCESSFUL)));
     1035    // Must not have 'pilotreport.pdf' already (no filter on FILE! since it may be in progress if linked to JOB)
     1036    query.restrict(AnyToAnyRestriction.missing(pilotReportPdfName, null));
     1037    query.setCacheResult(true);
     1038    json.put("rawbioassys-without-pilotreport", query.count(dc));
    10241039    // ---
    10251040   
     
    10291044    query.restrict(Restrictions.eq(Hql.property("variant.externalId"), Expressions.string(PlatformVariant.SEQUENCING_EXPRESSION)));
    10301045    // Must have 'genereport.pdf' FILE already
    1031     query.restrict(AnyToAnyRestriction.exists(pdfName, Item.FILE));
     1046    query.restrict(AnyToAnyRestriction.exists(geneReportPdfName, Item.FILE));
    10321047    query.setCacheResult(true);
    10331048    json.put("rawbioassys-all-with-genereport", query.count(dc));
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/InstallServlet.java

    r3484 r3492  
    8484import net.sf.basedb.reggie.plugins.FlowCellSampleSheetExporter;
    8585import net.sf.basedb.reggie.plugins.GeneReportPlugin;
     86import net.sf.basedb.reggie.plugins.PilotReportPlugin;
    8687import net.sf.basedb.reggie.plugins.QubitSampleNameExporter;
    8788import net.sf.basedb.util.EqualsHelper;
     
    749750
    750751        jsonChecks.add(checkPlugin(dc, GeneReportPlugin.class.getName(), secondaryAnalysisUse, createIfMissing));
     752        jsonChecks.add(checkPlugin(dc, PilotReportPlugin.class.getName(), secondaryAnalysisUse, createIfMissing));
    751753        jsonChecks.add(checkPlugin(dc, GeneReportsCombinerPlugin.class.getName(), effectivePermissionsUse, createIfMissing));
    752754       
Note: See TracChangeset for help on using the changeset viewer.