diff --git a/resources/queries/protein/Sequences.query.xml b/resources/queries/protein/Sequences.query.xml new file mode 100644 index 000000000..92a99ef3a --- /dev/null +++ b/resources/queries/protein/Sequences.query.xml @@ -0,0 +1,13 @@ + + + + + + + 200 + + +
+
+
+
diff --git a/resources/queries/targetedms/Protein/.qview.xml b/resources/queries/targetedms/Protein/.qview.xml new file mode 100644 index 000000000..3a83e3054 --- /dev/null +++ b/resources/queries/targetedms/Protein/.qview.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/schemas/targetedms.xml b/resources/schemas/targetedms.xml index 8fddaf6bf..2bba67291 100644 --- a/resources/schemas/targetedms.xml +++ b/resources/schemas/targetedms.xml @@ -179,7 +179,7 @@ #,### - /targetedms-showPrecursorList.view?id=${Id} + /targetedms-showProteinList.view?id=${Id} #,### diff --git a/src/org/labkey/targetedms/TargetedMSController.java b/src/org/labkey/targetedms/TargetedMSController.java index 6acf8c302..ea4f4eca0 100644 --- a/src/org/labkey/targetedms/TargetedMSController.java +++ b/src/org/labkey/targetedms/TargetedMSController.java @@ -4534,6 +4534,53 @@ public String getDataRegionNameSmallMolecule() } } + @RequiresPermission(ReadPermission.class) + public class ShowProteinListAction extends SimpleViewAction + { + private static final String DATA_REGION_NAME = "ProteinList"; + + @Override + public ModelAndView getView(RunDetailsForm form, BindException errors) + { + if (!form.hasRunId()) + throw new RedirectException(new ActionURL(ShowListAction.class, getContainer())); + + TargetedMSRun run = validateRun(form.getId()); + + TargetedMSSchema schema = new TargetedMSSchema(getUser(), getContainer()); + QuerySettings settings; + String title; + + if (run.getPeptideCount() > 0) + { + settings = new QuerySettings(getViewContext(), DATA_REGION_NAME, TargetedMSSchema.TABLE_PROTEIN); + settings.setBaseFilter(new SimpleFilter(FieldKey.fromParts("PeptideGroupId", "RunId"), form.getId())); + title = "Proteins"; + } + else + { + settings = new QuerySettings(getViewContext(), DATA_REGION_NAME, TargetedMSSchema.TABLE_PEPTIDE_GROUP); + settings.setBaseFilter(new SimpleFilter(FieldKey.fromParts("RunId"), form.getId())); + title = "Molecule Lists"; + } + + settings.setContainerFilterName(null); + QueryView view = schema.createView(getViewContext(), settings, errors); + view.setAllowableContainerFilterTypes(); + view.setShowDetailsColumn(false); + view.setShowFilterDescription(false); + view.setFrame(WebPartView.FrameType.PORTAL); + view.setTitle(title); + return view; + } + + @Override + public void addNavTrail(NavTree root) + { + root.addChild("Targeted MS Runs", getShowListURL(getContainer())); + } + } + @RequiresPermission(ReadPermission.class) public class ShowGroupComparisonAction extends ShowRunSplitDetailsAction { diff --git a/src/org/labkey/targetedms/view/runSummaryView.jsp b/src/org/labkey/targetedms/view/runSummaryView.jsp index ba61ad3b5..9bc377563 100644 --- a/src/org/labkey/targetedms/view/runSummaryView.jsp +++ b/src/org/labkey/targetedms/view/runSummaryView.jsp @@ -52,6 +52,9 @@ ActionURL precursorListAction = new ActionURL(TargetedMSController.ShowPrecursorListAction.class, getContainer()); precursorListAction.addParameter("id", run.getId()); + ActionURL proteinListAction = new ActionURL(TargetedMSController.ShowProteinListAction.class, getContainer()); + proteinListAction.addParameter("id", run.getId()); + ActionURL ptmReportAction = new ActionURL(TargetedMSController.ShowPTMReportAction.class, getContainer()); ptmReportAction.addParameter("id", run.getId()); @@ -94,7 +97,7 @@  
- <%= h(StringUtilsLabKey.pluralize(run.getPeptideGroupCount(), peptideGroupLabel))%>, + <%= h(StringUtilsLabKey.pluralize(run.getPeptideGroupCount(), peptideGroupLabel))%>, <% if (run.getPeptideCount() > 0) { %><%= h(StringUtilsLabKey.pluralize(run.getPeptideCount(), "peptide"))%>,<% } %> <% if (run.getSmallMoleculeCount() > 0) { %>"><%= h(StringUtilsLabKey.pluralize(run.getSmallMoleculeCount(), "small molecule"))%>,<% } %> <%= h(StringUtilsLabKey.pluralize(run.getPrecursorCount(), "precursor"))%>,