-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ticket 48872: Unable to customize columns in PTM reports or use locat…
…ion and amino acid separately
- Loading branch information
1 parent
a8284cb
commit 9d2247e
Showing
8 changed files
with
177 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
src/org/labkey/targetedms/query/PTMPercentsCustomizer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package org.labkey.targetedms.query; | ||
|
||
import org.apache.commons.collections4.MultiValuedMap; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
import org.labkey.api.collections.CaseInsensitiveHashMap; | ||
import org.labkey.api.data.ColumnInfo; | ||
import org.labkey.api.data.CompareType; | ||
import org.labkey.api.data.ConditionalFormat; | ||
import org.labkey.api.data.DataColumn; | ||
import org.labkey.api.data.DisplayColumn; | ||
import org.labkey.api.data.DisplayColumnFactory; | ||
import org.labkey.api.data.MutableColumnInfo; | ||
import org.labkey.api.data.RenderContext; | ||
import org.labkey.api.data.SQLFragment; | ||
import org.labkey.api.data.SimpleFilter; | ||
import org.labkey.api.data.SqlSelector; | ||
import org.labkey.api.data.TableCustomizer; | ||
import org.labkey.api.data.TableInfo; | ||
import org.labkey.api.query.FieldKey; | ||
import org.labkey.api.util.Pair; | ||
import org.labkey.targetedms.TargetedMSManager; | ||
import org.labkey.targetedms.parser.Protein; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Collections; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.Optional; | ||
import java.util.Set; | ||
|
||
/** | ||
* Customizes the set of columns available on a pivot query that operates on samples, hiding all of the pivot values | ||
* that aren't part of the run that's being filtered on. This lets you view a single document's worth of data | ||
* without seeing empty columns for all of the other samples in the same container. | ||
*/ | ||
public class PTMPercentsCustomizer implements TableCustomizer | ||
{ | ||
|
||
/** Referenced from query XML metadata */ | ||
@SuppressWarnings("unused") | ||
public PTMPercentsCustomizer(MultiValuedMap<String, String> props) | ||
{ | ||
|
||
} | ||
|
||
@Override | ||
public void customize(TableInfo tableInfo) | ||
{ | ||
List<FieldKey> defaultCols = new ArrayList<>(tableInfo.getDefaultVisibleColumns()); | ||
defaultCols.remove(FieldKey.fromParts("AminoAcid")); | ||
defaultCols.remove(FieldKey.fromParts("Location")); | ||
tableInfo.setDefaultVisibleColumns(defaultCols); | ||
} | ||
} |
Oops, something went wrong.