Skip to content

Commit ad34a73

Browse files
authored
Hold GUID instead of Container (#899)
1 parent af77997 commit ad34a73

6 files changed

Lines changed: 10 additions & 27 deletions

File tree

ms2/src/org/labkey/ms2/MS2Run.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@
1818

1919
import org.apache.logging.log4j.Logger;
2020
import org.labkey.api.data.Container;
21+
import org.labkey.api.data.ContainerManager;
2122
import org.labkey.api.data.SQLFragment;
2223
import org.labkey.api.data.SqlSelector;
2324
import org.labkey.api.protein.MassType;
2425
import org.labkey.api.query.FieldKey;
26+
import org.labkey.api.util.GUID;
2527
import org.labkey.api.util.MemTracker;
2628
import org.labkey.api.util.logging.LogHelper;
2729
import org.labkey.api.view.ViewContext;
@@ -41,7 +43,7 @@ public abstract class MS2Run implements Serializable
4143
protected final static String[] EMPTY_STRING_ARRAY = new String[0];
4244

4345
protected int run;
44-
protected Container container;
46+
protected GUID containerId;
4547
protected String description;
4648
protected String path;
4749
protected String fileName;
@@ -252,13 +254,13 @@ public void setRun(int run)
252254

253255
public Container getContainer()
254256
{
255-
return container;
257+
return ContainerManager.getForId(containerId);
256258
}
257259

258260

259261
public void setContainer(Container container)
260262
{
261-
this.container = container;
263+
this.containerId = container.getEntityId();
262264
}
263265

264266

ms2/src/org/labkey/ms2/pipeline/mascot/MascotRun.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ public class MascotRun extends MS2Run
4848
public void adjustScores(Map<String, String> map)
4949
{
5050
// Mascot exported pepXML can exclude "homologyscore"
51-
if (null == map.get("homologyscore"))
52-
map.put("homologyscore", "-1");
51+
map.putIfAbsent("homologyscore", "-1");
5352
// Issue 30322 - ProteomeDiscoverer pep.xml files use a different name for the score value
5453
if (null == map.get("ionscore") && map.containsKey("Ions Score"))
5554
map.put("ionscore", map.get("Ions Score"));

nab/src/org/labkey/nab/NabAssayController.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,6 @@ private DilutionAssayRun _getNabAssayRun(ExpRun run, StatsService.CurveFitType f
331331
return assay;
332332
}
333333

334-
private static final String LAST_NAB_RUN_KEY = NabAssayController.class.getName() + "/LastNAbRun";
335-
336334
@RequiresPermission(ReadPermission.class)
337335
@ContextualRoles(RunDatasetContextualRoles.class)
338336
public class DetailsAction extends RunDetailsAction<RenderAssayBean>
@@ -504,12 +502,6 @@ protected DilutionAssayRun getAssayRun(ExpRun run, StatsService.CurveFitType fit
504502
{
505503
return _getNabAssayRun(run, fit, user);
506504
}
507-
508-
@Override
509-
public void addNavTrail(NavTree root)
510-
{
511-
throw new UnsupportedOperationException();
512-
}
513505
}
514506

515507
public static class SampleSpreadsheetForm

nab/src/org/labkey/nab/NabAssayRun.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,6 @@
4242
import java.util.Map;
4343
import java.util.Set;
4444

45-
/*
46-
* User: brittp
47-
* Date: Dec 9, 2008
48-
* Time: 5:43:01 PM
49-
*/
50-
5145
public abstract class NabAssayRun extends DilutionAssayRun
5246
{
5347
public NabAssayRun(DilutionAssayProvider<?> provider, ExpRun run,
@@ -119,7 +113,7 @@ else if (null != dataWithHandlerType)
119113
if (null == outputObject)
120114
throw new IllegalStateException("Expected a single data file output for this NAb run, but none matching the expected datatype found. Found a total of " + outputDatas.size());
121115

122-
AssayProtocolSchema schema = _provider.createProtocolSchema(_user, _run.getContainer(), _protocol, null);
116+
AssayProtocolSchema schema = _provider.createProtocolSchema(getUser(), _run.getContainer(), _protocol, null);
123117
TableInfo virusTable = schema.createTable(DilutionManager.VIRUS_TABLE_NAME, null);
124118

125119
Map<String, Map<PropertyDescriptor, Object>> samplePropertiesMap = getSampleProperties();

nab/src/org/labkey/nab/NabDataHandler.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@
5555
import java.util.List;
5656
import java.util.Map;
5757

58-
/**
59-
* User: klum
60-
* Date: May 15, 2009
61-
*/
6258
public abstract class NabDataHandler extends DilutionDataHandler
6359
{
6460
public static final Logger LOG = LogManager.getLogger(NabDataHandler.class);
@@ -146,7 +142,7 @@ public void recalculateDilutionStats(ExpData data, ExpRun run, ExpProtocol proto
146142
* Calculates cutoff and AUC information from the passed in raw data and optionally saves the data to the
147143
* specific tables.
148144
*
149-
* @param commitData true to persist dilution and well level data
145+
* @param commitData true to persist dilution and well-level data
150146
* @param specimenRows if commitData is false, then specimen data will be returned in this collection
151147
* @param cutoffRows if commitData is false, then cutoff data will be returned in this collection
152148
*/
@@ -268,7 +264,7 @@ public void beforeDeleteData(List<ExpData> datas, User user) throws ExperimentEx
268264
{
269265
NabManager.get().deleteRunData(datas);
270266
}
271-
catch(SQLException e)
267+
catch (SQLException e)
272268
{
273269
throw new ExperimentException(e);
274270
}

nab/src/org/labkey/nab/SinglePlateNabAssayRun.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ protected String getVirusName(String virusWellGroupName)
323323
if (!outputDatas.isEmpty())
324324
{
325325
Lsid virusLsid = DilutionDataHandler.createVirusWellGroupLsid(outputDatas.get(0), virusWellGroupName);
326-
AssayProtocolSchema schema = _provider.createProtocolSchema(_user, _run.getContainer(), _protocol, null);
326+
AssayProtocolSchema schema = _provider.createProtocolSchema(getUser(), _run.getContainer(), _protocol, null);
327327
TableInfo virusTable = schema.createTable(DilutionManager.VIRUS_TABLE_NAME, null);
328328
if (null != virusTable)
329329
{

0 commit comments

Comments
 (0)