Skip to content

Commit 59096b7

Browse files
Code cleanup - generics and warnings (#924)
1 parent 65d4743 commit 59096b7

7 files changed

Lines changed: 9 additions & 16 deletions

File tree

ms2/src/org/labkey/ms2/PeptideProphetGraphs.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public static void renderObservedVsPPScore(HttpServletResponse response, Contain
182182

183183
if (count == increment)
184184
{
185-
negative += negative * ratioRandom; // add back random positives
185+
negative += (int)(negative * ratioRandom); // add back random positives
186186
if (negative > count)
187187
negative = count;
188188
score /= (float) count; // mean score

ms2/src/org/labkey/ms2/pipeline/FastaCheckTask.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public Factory()
5555
}
5656

5757
@Override
58-
public PipelineJob.Task createTask(PipelineJob job)
58+
public FastaCheckTask createTask(PipelineJob job)
5959
{
6060
return new FastaCheckTask(this, job);
6161
}

ms2/src/org/labkey/ms2/pipeline/comet/CometSearchProtocol.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import org.labkey.api.data.Container;
2020
import org.labkey.api.pipeline.PipeRoot;
2121
import org.labkey.api.pipeline.PipelineValidationException;
22-
import org.labkey.api.pipeline.file.AbstractFileAnalysisProtocolFactory;
2322
import org.labkey.api.util.FileUtil;
2423
import org.labkey.api.view.ViewBackgroundInfo;
2524
import org.labkey.ms2.pipeline.AbstractMS2SearchProtocol;
@@ -42,7 +41,7 @@ public CometSearchProtocol(String name, String description, String xml, Containe
4241
}
4342

4443
@Override
45-
public AbstractFileAnalysisProtocolFactory getFactory()
44+
public CometSearchProtocolFactory getFactory()
4645
{
4746
return CometSearchProtocolFactory.get();
4847
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import org.jetbrains.annotations.Nullable;
1919
import org.labkey.api.data.Container;
2020
import org.labkey.api.pipeline.PipeRoot;
21-
import org.labkey.api.pipeline.file.AbstractFileAnalysisProtocolFactory;
2221
import org.labkey.api.view.ViewBackgroundInfo;
2322
import org.labkey.ms2.pipeline.AbstractMS2SearchProtocol;
2423

@@ -39,7 +38,7 @@ public MascotSearchProtocol(String name, String description, String xml, Contain
3938
}
4039

4140
@Override
42-
public AbstractFileAnalysisProtocolFactory getFactory()
41+
public MascotSearchProtocolFactory getFactory()
4342
{
4443
return MascotSearchProtocolFactory.get();
4544
}

ms2/src/org/labkey/ms2/pipeline/sequest/SequestSearchProtocol.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import org.labkey.api.data.Container;
2121
import org.labkey.api.pipeline.PipeRoot;
2222
import org.labkey.api.pipeline.PipelineValidationException;
23-
import org.labkey.api.pipeline.file.AbstractFileAnalysisProtocolFactory;
23+
import org.labkey.api.util.FileUtil;
2424
import org.labkey.api.view.ViewBackgroundInfo;
2525
import org.labkey.ms2.pipeline.AbstractMS2SearchProtocol;
2626

@@ -43,7 +43,7 @@ public SequestSearchProtocol(String name, String description, String xml, Contai
4343
}
4444

4545
@Override
46-
public AbstractFileAnalysisProtocolFactory getFactory()
46+
public SequestSearchProtocolFactory getFactory()
4747
{
4848
return SequestSearchProtocolFactory.get();
4949
}
@@ -65,7 +65,7 @@ public void validate(PipeRoot root) throws PipelineValidationException
6565
if(dbNames.isEmpty())
6666
throw new IllegalArgumentException("A sequence database must be selected.");
6767

68-
File fileSequenceDB = new File(getDirSeqRoot(), dbNames.get(0));
68+
File fileSequenceDB = FileUtil.appendPath(getDirSeqRoot(), org.labkey.api.util.Path.parse(dbNames.get(0)));
6969
if (!fileSequenceDB.exists())
7070
throw new IllegalArgumentException("Sequence database '" + dbNames.get(0) + "' is not found in local FASTA root.");
7171

ms2/src/org/labkey/ms2/pipeline/tandem/XTandemSearchProtocol.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,9 @@
1515
*/
1616
package org.labkey.ms2.pipeline.tandem;
1717

18-
import org.apache.logging.log4j.Logger;
19-
import org.apache.logging.log4j.LogManager;
2018
import org.jetbrains.annotations.Nullable;
2119
import org.labkey.api.data.Container;
2220
import org.labkey.api.pipeline.PipeRoot;
23-
import org.labkey.api.pipeline.file.AbstractFileAnalysisProtocolFactory;
2421
import org.labkey.api.view.ViewBackgroundInfo;
2522
import org.labkey.ms2.pipeline.AbstractMS2SearchProtocol;
2623

@@ -38,15 +35,13 @@
3835
*/
3936
public class XTandemSearchProtocol extends AbstractMS2SearchProtocol<XTandemPipelineJob>
4037
{
41-
private static final Logger _log = LogManager.getLogger(XTandemSearchProtocol.class);
42-
4338
public XTandemSearchProtocol(String name, String description, String xml, Container container)
4439
{
4540
super(name, description, xml, container);
4641
}
4742

4843
@Override
49-
public AbstractFileAnalysisProtocolFactory getFactory()
44+
public XTandemSearchProtocolFactory getFactory()
5045
{
5146
return XTandemSearchProtocolFactory.get();
5247
}

ms2/src/org/labkey/ms2/reader/MascotDatLoader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public class MascotDatLoader extends MS2Loader implements AutoCloseable
149149
// once URL decoded, the value looks like this:
150150
// CAexample_mini.0110.0110.1
151151

152-
public static final Pattern QUERY_TITLE_SCAN_REGEX = Pattern.compile("\\.??(\\d{1,6})\\.(\\d{1,6})\\.(\\d)\\.??[a-zA-z0-9_]*?$");
152+
public static final Pattern QUERY_TITLE_SCAN_REGEX = Pattern.compile("\\.??(\\d{1,6})\\.(\\d{1,6})\\.(\\d)\\.??[a-zA-Z0-9_]*?$");
153153
// the title line may also look like this:
154154
// title=Spectrum270258%20scans%3a6721%2c
155155
// decoded to:

0 commit comments

Comments
 (0)