Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions resources/queries/protein/Sequences.query.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<query xmlns="http://labkey.org/data/xml/query">
<metadata>
<tables xmlns="http://labkey.org/data/xml">
<table tableName="Sequences" tableDbType="TABLE">
<columns>
<column columnName="ProtSequence">
<displayWidth>200</displayWidth>
</column>
</columns>
</table>
</tables>
</metadata>
</query>
16 changes: 16 additions & 0 deletions resources/queries/targetedms/Protein/.qview.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<customView xmlns="http://labkey.org/data/xml/queryCustomView" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
label="Proteins" canOverride="true">
<columns>
<column name="Label" />
<column name="Description" />
<column name="Accession" />
<column name="PreferredName" />
<column name="Gene" />
<column name="Species" />

<column name="SequenceId/ProtSequence" />
<column name="Note" />

</columns>

</customView>
2 changes: 1 addition & 1 deletion resources/schemas/targetedms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
<column columnName="DocumentGUID"/>
<column columnName="PeptideGroupCount">
<formatString>#,###</formatString>
<url>/targetedms-showPrecursorList.view?id=${Id}</url>
<url>/targetedms-showProteinList.view?id=${Id}</url>
</column>
<column columnName="PeptideCount">
<formatString>#,###</formatString>
Expand Down
47 changes: 47 additions & 0 deletions src/org/labkey/targetedms/TargetedMSController.java
Original file line number Diff line number Diff line change
Expand Up @@ -4534,6 +4534,53 @@ public String getDataRegionNameSmallMolecule()
}
}

@RequiresPermission(ReadPermission.class)
public class ShowProteinListAction extends SimpleViewAction<RunDetailsForm>
{
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);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A file can have both proteins and small molecules. If so, we need to show both, like we do in other actions. I suggest making this action a subclass of ShowRunSplitDetailsAction and following the pattern from other subclasses.

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<GroupComparisonView>
{
Expand Down
5 changes: 4 additions & 1 deletion src/org/labkey/targetedms/view/runSummaryView.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down Expand Up @@ -94,7 +97,7 @@
</div>
&nbsp;
<div>
<a href="<%= h(precursorListAction) %>"><%= h(StringUtilsLabKey.pluralize(run.getPeptideGroupCount(), peptideGroupLabel))%></a>,
<a href="<%= h(proteinListAction) %>"><%= h(StringUtilsLabKey.pluralize(run.getPeptideGroupCount(), peptideGroupLabel))%></a>,
<% if (run.getPeptideCount() > 0) { %><a href="<%= h(precursorListAction) %>"><%= h(StringUtilsLabKey.pluralize(run.getPeptideCount(), "peptide"))%></a>,<% } %>
<% if (run.getSmallMoleculeCount() > 0) { %><a href="<%= h(precursorListAction + "#Small Molecule Precursor List") %>"><%= h(StringUtilsLabKey.pluralize(run.getSmallMoleculeCount(), "small molecule"))%></a>,<% } %>
<a href="<%= h(precursorListAction) %>"><%= h(StringUtilsLabKey.pluralize(run.getPrecursorCount(), "precursor"))%></a>,
Expand Down
Loading