diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e5aa5b3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+.idea
+*.iml
+target
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 5d5ea82..f129f1f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -105,26 +105,7 @@
-
-
- org.jacoco
- jacoco-maven-plugin
- 0.5.7.201204190339
-
-
-
- prepare-agent
-
-
-
- report
- prepare-package
-
- report
-
-
-
-
+
diff --git a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/AminoAcidInterface.java b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/AminoAcidInterface.java
index 451ac82..9764629 100644
--- a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/AminoAcidInterface.java
+++ b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/AminoAcidInterface.java
@@ -15,7 +15,7 @@ public interface AminoAcidInterface {
/**
* fetches the amino acids from the proteome discoverer database
- * @param iConnection connection to a msf file
+ * @param msfFile the proteome discoverer file to retrieve the amino acids for
* @return a List containing all the amino acids stored in the msf file
* @throws java.sql.SQLException if something went wrong with the retrieving
*/
diff --git a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/CustomDataInterface.java b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/CustomDataInterface.java
index 1d16740..2e40b22 100644
--- a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/CustomDataInterface.java
+++ b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/CustomDataInterface.java
@@ -15,7 +15,7 @@ public interface CustomDataInterface {
/**
*
- * @param iConnection a connection to the msf file
+ * @param msfFile the proteome discoverer file to retrieve the custom data from
* @return a hashmap containing the custom fields key: fieldid in the db
* value: displayname given in the db
*/
@@ -27,9 +27,8 @@ public interface CustomDataInterface {
/**
*
- * @param msfFileConnection connection to the msf file
+ * @param msfFile the proteome discoverer file to retrieve the custom spectrum data from
* @return an List with the custom spectra data
- * @throws SQLException
*/
public List getCustomSpectraData(Map iCustomDataFieldsMap, MsfFile msfFile);
diff --git a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/ModificationInterface.java b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/ModificationInterface.java
index 8a39ab9..a4af9cb 100644
--- a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/ModificationInterface.java
+++ b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/ModificationInterface.java
@@ -37,7 +37,7 @@ public interface ModificationInterface {
/**
creates a hashmap containing the modifications stored in the msf file
- @param iConnection: a connection to the SQLite database
+ @param msfFile the proteome discoverer file to retrieve the modifications from
@return hashmap containing the modifications
@throws SQLException if something went wrong with the retrieving
*/
@@ -46,8 +46,8 @@ public interface ModificationInterface {
/**
* fetch all the abbreviated names of the modifications used in the msf file
- *
- * @param aConnection a connection to the SQLite database
+ *
+ @param msfFile the proteome discoverer file to retrieve the modification names from
* @return a List containing all the names of the modifications used in the msf file
*/
diff --git a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/PeptideInterface.java b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/PeptideInterface.java
index 889e1f6..6ca6f4d 100644
--- a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/PeptideInterface.java
+++ b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/PeptideInterface.java
@@ -16,8 +16,7 @@ public interface PeptideInterface {
/**
@param protein: a Protein object
- @param iMsfVersion: enumeration object containing the version number of the current Msf file
- @param iAminoAcids a List containing the objects returned from the AminoAcid
+ @param msfFile the proteome discoverer file to retrieve from
@return a List containing all the peptides connected to the given Protein, empty if none are found
*/
@@ -25,9 +24,7 @@ public interface PeptideInterface {
/**
@param lProteinAccession: a string containing the accession of the protein
- @param msfFileConnection: a connection to the SQLite database
- @param iMsfVersion: enumeration object containing the version number of the current Msf file
- @param iAminoAcids a List containing the objects returned from the AminoAcid
+ @param msfFile the proteome discoverer file to retrieve from
@return a List containing all the peptides connected to the given protein accession, empty if none are found
*/
@@ -46,9 +43,7 @@ public interface PeptideInterface {
/**
*
* @param confidenceLevel the confidence level of the peptides wanted
- * @param msfFileConnection connection to the msf file
- * @param iMsfVersion the version with which the msf file is made
- * @param iAminoAcids vector with the amino acids fetched from the amino acid lowmem class
+ @param msfFile the proteome discoverer file to retrieve from
* @return a vector containing the peptides identified and the specified confidence level, empty if none are found
*/
public List getPeptidesWithConfidenceLevel(int confidenceLevel,MsfFile msfFile);
@@ -56,23 +51,21 @@ public interface PeptideInterface {
/**
* @param confidenceLevel the confidence level of the peptides wanted
- * @param aConnection connection to the msf file
+ @param msfFile the proteome discoverer file to retrieve from
*/
public int getNumberOfPeptidesForConfidenceLevel(int confidenceLevel,MsfFile msfFile);
/**
* @param proteinLowMemList a vector containing the protein objects we want to retrieve the peptides for
- * @param msfFileConnection a connection to the msf file
- * @param iAminoAcids a vector of the amino acids retrieved from the msf file
- * @param iMsfVersion the msf file version
+ @param msfFile the proteome discoverer file to retrieve from
* @param confidenceLevel the confidence level we want to retrieve the peptides at
*/
public void getPeptidesForProteinList(List proteinLowMemList,MsfFile msfFile,int confidenceLevel);
/**
- *
- * @param msfFileConnection connection to the msf file
+ *
+ @param msfFile the proteome discoverer file to retrieve from
*/
public int returnNumberOfPeptides(MsfFile msfFile);
diff --git a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/ProteinControllerInterface.java b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/ProteinControllerInterface.java
index abaf57f..1c2018d 100644
--- a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/ProteinControllerInterface.java
+++ b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/ProteinControllerInterface.java
@@ -18,21 +18,16 @@ public interface ProteinControllerInterface {
/**
a method to fetch all the proteins stored in the msf file
- @param iConnection connection to the msf file
+ @param msfFile the proteome discoverer file to retrieve from
@return an iterator containing all the proteins in Protein objects
- @throws SQLException if something went wrong with the retrieving
*/
public List getAllProteins(MsfFile msfFile);
/**
get a protein from an accession
-
- @return a Protein object
- @throws SQLException if something went wrong with the retrieving
-
* @param proteinAccession an accession
- * @param iConnection a connection to the msf file
+ @param msfFile the proteome discoverer file to retrieve from
*/
public ProteinLowMem getProteinFromAccession(String proteinAccession, MsfFile msfFile);
@@ -41,9 +36,8 @@ public interface ProteinControllerInterface {
get the accession from a protein
@param proteinID a protein id in the db
- @param iConnection a connection to the msf file
+ @param msfFile the proteome discoverer file to retrieve from
@return the accession for a given Protein object
- @throws SQLException if something went wrong with the retrieving
*/
public String getAccessionFromProteinID(int proteinID,MsfFile msfFile);
@@ -52,9 +46,8 @@ public interface ProteinControllerInterface {
* get the sequence stored in the db for a given ProteinID
*
* @param proteinID the ID of the protein in the SQLite DB
- * @param iConnection connection to the SQLite DB
+ @param msfFile the proteome discoverer file to retrieve from
* @return string containing the sequence stored in the DB
- * @throws SQLException if something went wrong with the retrieving
*/
public String getSequenceForProteinID(int proteinID,MsfFile msfFile);
@@ -63,9 +56,8 @@ public interface ProteinControllerInterface {
* method for retrieving all the proteins connected to a given peptide in the DB
*
* @param PeptideID peptideID stored in the SQLite DB
- * @param iConnection connection to the SQLite DB
+ @param msfFile the proteome discoverer file to retrieve from
* @return a vector containing all Protein objects connected to a given peptide
- * @throws SQLException if something went wrong with the retrieving
*/
public List getProteinsForPeptide(int PeptideID,MsfFile msfFile);
}
diff --git a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/RatioTypeInterface.java b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/RatioTypeInterface.java
index 2dc1f86..1319ed0 100644
--- a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/RatioTypeInterface.java
+++ b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/RatioTypeInterface.java
@@ -16,9 +16,8 @@ public interface RatioTypeInterface {
/**
*
- * @param aConnection connection to the SQLite db
+ @param msfFile the proteome discoverer file to retrieve from
* @return vector containing the ratio types
- * @throws java.sql.SQLException if something went wrong with the retrieving
*/
public List parseRatioTypes(MsfFile msfFile);
diff --git a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/RawFileInterface.java b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/RawFileInterface.java
index 0a950d3..8e8d80d 100644
--- a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/RawFileInterface.java
+++ b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/RawFileInterface.java
@@ -14,14 +14,14 @@ public interface RawFileInterface {
/**
*
* @param fileID the file id stored in the msf file
- * @param aConnection connection to the msf file
+ @param msfFile the proteome discoverer file to retrieve from
* @return hashmap connecting the file name entry to the fileID
*/
public Map getRawFileForFileID(int fileID, MsfFile msfFile);
/**
*
- * @param aConnection connection to the msf file
+ @param msfFile the proteome discoverer file to retrieve from
* @return a vector containing all the names of the stored raw files
*/
public List getRawFileNames(MsfFile msfFile);
@@ -29,8 +29,8 @@ public interface RawFileInterface {
/**
*
* @param fileID the file id stored in the msf file
- * @param aConnection connection to the msf file
+ @param msfFile the proteome discoverer file to retrieve from
* @return a processed filename (eg sample4_1.raw)
*/
- public String getRawFileNameForFileID(int FileID, MsfFile msfFile);
+ public String getRawFileNameForFileID(int fileID, MsfFile msfFile);
}
diff --git a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/ScoreTypeInterface.java b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/ScoreTypeInterface.java
index 51fcd80..7e7ee41 100644
--- a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/ScoreTypeInterface.java
+++ b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/interfaces/ScoreTypeInterface.java
@@ -21,7 +21,7 @@ public interface ScoreTypeInterface {
/**
method to fetch the score types stored in the msf file
- @param aConnection a connection to the msf file
+ @param msfFile the proteome discoverer file to retrieve from
@return a Hashmap containing the score types
* @throws java.sql.SQLException if something went wrong with the retrieving
*/
@@ -30,7 +30,7 @@ public interface ScoreTypeInterface {
/**
* @param peptideLowMemList a vector containing the peptides we want to retrieve the scores for
- * @param aConnection a connection to the msf file
+ @param msfFile the proteome discoverer file to retrieve from
*/
public void getScoresForPeptideList(ListpeptideLowMemList,MsfFile msfFile);
@@ -38,7 +38,7 @@ public interface ScoreTypeInterface {
/**
*
* @param peptide a peptide to which we want to add the scores
- * @param aConnection a connection to the msf file
+ @param msfFile the proteome discoverer file to retrieve from
*/
public void addScoresToPeptide (PeptideLowMem peptide, MsfFile msfFile);
@@ -46,7 +46,7 @@ public interface ScoreTypeInterface {
/**
*
* @param peptide a peptide to return the different score types for
- * @param aConnection a connection to the msf file
+ @param msfFile the proteome discoverer file to retrieve from
* @return a hashMap with key scoreID value: scoreValue
* @throws SQLException
*/
diff --git a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/AminoAcidLowMemController.java b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/AminoAcidLowMemController.java
index 45e9678..8b62803 100644
--- a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/AminoAcidLowMemController.java
+++ b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/AminoAcidLowMemController.java
@@ -17,7 +17,7 @@ public class AminoAcidLowMemController implements AminoAcidInterface {
/**
*
- * @param aConnection a connection to the msf file
+ * @param msfFile the proteome discoverer file to retrieve the amino acids from
* @return a vector containing all the amino acids in the database
* @throws SQLException
*/
diff --git a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/ChromatogramLowMemController.java b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/ChromatogramLowMemController.java
index 6619562..c2fccf9 100644
--- a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/ChromatogramLowMemController.java
+++ b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/ChromatogramLowMemController.java
@@ -24,7 +24,7 @@ public class ChromatogramLowMemController {
* returns the chromatogram for a given peptide ID in the SQLite db
*
* @param peptideID the id of the peptide
- * @param iConnection connection to the msf SQLite file
+ * @param msfFile the proteome discoverer file to retrieve the chromatograms from
* @return a vector containing the chromatogram files
*/
//TODO check of this returns one or multiple files
diff --git a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/CustomDataLowMemController.java b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/CustomDataLowMemController.java
index b18e4f8..eaca1ba 100644
--- a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/CustomDataLowMemController.java
+++ b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/CustomDataLowMemController.java
@@ -80,8 +80,8 @@ public List getCustomPeptideData(Map
/**
* adds the custom data of a protein to that protein object
*
- * @param protein the protein (low memory instance) object
- * @param iConnection connection to the msf file
+ * @param protein the {@link ProteinLowMem} to add the custom data to
+ * @param msfFile msf File to get the protein data from
* @throws SQLException
*/
@Override
diff --git a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/ModificationLowMemController.java b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/ModificationLowMemController.java
index 76ffae5..6444b2d 100644
--- a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/ModificationLowMemController.java
+++ b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/ModificationLowMemController.java
@@ -177,35 +177,15 @@ public List getAllModifications(MsfFile msfFile) {
return getModList(msfFile, true, true);
}
- /**
- *
- * @param msfFileConnection
- * @param msfVersion
- * @param returnFixed
- * @return
- */
+
public List getListOfFixedModificationNumbers(MsfFile msfFile) {
return getModList(msfFile, true, false);
}
- /**
- *
- * @param msfFileConnection
- * @param msfVersion
- * @return
- */
public List getListOfVariableModidifcationNumbers(MsfFile msfFile) {
return getModList(msfFile, false, true);
}
- /**
- *
- * @param msfFileConnection
- * @param msfVersion
- * @param getFixedModifications
- * @param getVariableModifications
- * @return
- */
private List getModList(MsfFile msfFile, boolean getFixedModifications, boolean getVariableModifications) {
StringBuilder modNumbersToFetch = new StringBuilder("(");
List modsToReturn = new ArrayList();
@@ -274,12 +254,7 @@ private List getModList(MsfFile msfFile, boolean getFixedModificat
return modsToReturn;
}
- /**
- *
- * @param modification
- * @param aminoAcids
- * @param msfFile
- */
+
private void addAminoAcidsToModification(Modification modification, List aminoAcids, MsfFile msfFile) {
try {
PreparedStatement stat = null;
diff --git a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/PeptideLowMemController.java b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/PeptideLowMemController.java
index c42fc62..c1eeb6c 100644
--- a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/PeptideLowMemController.java
+++ b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/PeptideLowMemController.java
@@ -14,7 +14,6 @@
import java.util.HashMap;
import java.util.Observable;
import java.util.List;
-import sun.reflect.generics.reflectiveObjects.NotImplementedException;
/**
* Created by IntelliJ IDEA. User: Davy Date: 10/1/12 Time: 10:30 AM To change
@@ -37,12 +36,8 @@ public List getPeptidesForProteinAtConfidenceLevel(ProteinLowMem
/**
*
* @param protein: a Protein object
- * @param iMsfVersion: enumeration object containing the version number of
- * the current Msf file
- * @param iAminoAcids a List containing the objects returned from the
- * AminoAcid
+ * @param msfFile the proteome discoverer file to retrieve from
* @return a vector containing all the peptides connected to the protein
- * @throws java.sql.SQLException
*/
@Override
public List getPeptidesForProtein(ProteinLowMem protein, MsfFile msfFile) {
@@ -146,7 +141,7 @@ public List getInformationForPeptide(int peptideID, MsfFile msfFile, boolean ful
ResultSet rs = null;
try {
if (fullInfo) {
- rs = stat.executeQuery("select Peptides.Sequence, SpectrumHeaders.FirstScan,SpectrumHeaders.LastScan,Peptides.Annotations,ProcessingNodes.FriendlyName from Peptides where ConfidenceLevel >= ");
+ rs = stat.executeQuery("select Peptides.Sequence, SpectrumHeaders.FirstScan,SpectrumHeaders.LastScan,Peptides.Annotations,ProcessingNodes.FriendlyName from Peptides where ConfidenceLevel >= 1 ");
} else {
rs = stat.executeQuery("");
}
@@ -352,15 +347,9 @@ public int returnNumberOfPeptides(MsfFile msfFile) {
}
return numberOfPeptides;
}
-/**
- *
- * @param protein
- * @param msfFile
- * @param processingNode
- * @return
- */
+
public List getPeptidesForProteinAndProcessingNode(ProteinLowMem protein, MsfFile msfFile, ProcessingNode processingNode) {
processingNode.getProcessingNodeId();
- throw new NotImplementedException();
+ throw new UnsupportedOperationException("not yet implemented");
}
}
\ No newline at end of file
diff --git a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/ProteinGroupLowMemController.java b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/ProteinGroupLowMemController.java
index 6813a9d..9db2e05 100644
--- a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/ProteinGroupLowMemController.java
+++ b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/ProteinGroupLowMemController.java
@@ -16,12 +16,7 @@ public class ProteinGroupLowMemController {
private static final Logger logger = Logger.getLogger(ProteinGroupLowMemController.class);
- /**
- *
- * @param proteinID
- * @param msfFile
- * @return
- */
+
public int getProteinGroupIDForProteinID(int proteinID, MsfFile msfFile) {
int proteinGroupID = 0;
try {
@@ -47,12 +42,7 @@ public int getProteinGroupIDForProteinID(int proteinID, MsfFile msfFile) {
return proteinGroupID;
}
- /**
- *
- * @param proteinID
- * @param msfFile
- * @return
- */
+
public ProteinGroupLowMem getProteinGroupForProteinID(int proteinID, MsfFile msfFile) {
return new ProteinGroupLowMem(getProteinGroupIDForProteinID(proteinID, msfFile));
diff --git a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/QuanResultLowMemController.java b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/QuanResultLowMemController.java
index 981e73c..79e6d61 100644
--- a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/QuanResultLowMemController.java
+++ b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/QuanResultLowMemController.java
@@ -21,7 +21,7 @@ public class QuanResultLowMemController {
/**
*
- * @param aConnection a connection to the msf file
+ * @param msfFile * @param msfFile the proteome discoverer file to retrieve the isotope patterns from
* @return a hashmap with key: the isotope pattern id and value: the
* isotopePattern
*/
diff --git a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/RatioTypeLowMemController.java b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/RatioTypeLowMemController.java
index 9fd3a8e..0b4b798 100644
--- a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/RatioTypeLowMemController.java
+++ b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/RatioTypeLowMemController.java
@@ -19,8 +19,8 @@
public class RatioTypeLowMemController implements RatioTypeInterface {
private static final Logger logger = Logger.getLogger(RatioTypeLowMemController.class);
- private List iComponents;
- private List iQuanChannelIds;
+ private List iComponents = new ArrayList();
+ private List iQuanChannelIds = new ArrayList();
private final Map quanChannelID = new HashMap();
@Override
diff --git a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/SpectrumLowMemController.java b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/SpectrumLowMemController.java
index f7373e2..94f091f 100644
--- a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/SpectrumLowMemController.java
+++ b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/SpectrumLowMemController.java
@@ -310,7 +310,7 @@ public SpectrumLowMem getSpectrumForSpectrumID(int spectrumOfInterestID, MsfFile
@Override
public String getSpectrumTitle(String rawFileName, SpectrumLowMem lspectrum) {
String spectrumTitle = rawFileName.substring(0, rawFileName.toLowerCase().lastIndexOf("."));
- return new StringBuilder().append(spectrumTitle).append("_").append(lspectrum.getSpectrumId()).append("_").append(lspectrum.getFirstScan()).append("_").append(lspectrum.getCharge()).toString();
+ return spectrumTitle + "_" + lspectrum.getSpectrumId() + "_" + lspectrum.getFirstScan() + "_" + lspectrum.getCharge();
}
//TODO redo this part properly
diff --git a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/model/ProteinLowMem.java b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/model/ProteinLowMem.java
index ef24427..6a960b9 100644
--- a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/model/ProteinLowMem.java
+++ b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/model/ProteinLowMem.java
@@ -27,7 +27,6 @@ public class ProteinLowMem implements ProteinModel {
* constructor for the ProteinLowMem object
*
* @param aAccession the protein accession
- * @param aConnection a connection to the SQLite database
* @param aProteinID the protein id in the SQLite database
*/
diff --git a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/model/ScoreTypeLowMem.java b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/model/ScoreTypeLowMem.java
index 78a2e1f..954f69d 100644
--- a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/model/ScoreTypeLowMem.java
+++ b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/model/ScoreTypeLowMem.java
@@ -39,17 +39,6 @@ public ScoreTypeLowMem(int aScoreID, String aScoreName, String aFriendlyName, St
this.iIsMainScore = isMainScore;
}
- /**
- *
- * @param iConnection a connection to the msf file
- * @return a vector containing all the scoretypes stored in the msf file
- * @throws SQLException
- */
- /**
- *
- * @return a vector containing all the scoretypes stored in the msf file
- * @throws SQLException
- */
public int getScoreTypeId() {
return iScoreTypeId;
}
diff --git a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/model/SpectrumLowMem.java b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/model/SpectrumLowMem.java
index ead2cbe..53fbfb2 100644
--- a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/model/SpectrumLowMem.java
+++ b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/lowmeminstance/model/SpectrumLowMem.java
@@ -258,16 +258,16 @@ public void setQuanResult(QuanResultLowMem lQuanResult) {
//TODO this looks wrong
public boolean isHighestScoring(PeptideLowMem iSelectedPeptide, List scoreTypes) {
Boolean lIsHighestScore = null;
- for (int l = 0; l < scoreTypes.size(); l++) {
- if (iSelectedPeptide.getScoreByScoreType(scoreTypes.get(l)) != null) {
- Double lScore = iSelectedPeptide.getScoreByScoreType(scoreTypes.get(l));
+ for (ScoreTypeLowMem scoreType : scoreTypes) {
+ if (iSelectedPeptide.getScoreByScoreType(scoreType) != null) {
+ Double lScore = iSelectedPeptide.getScoreByScoreType(scoreType);
if (lIsHighestScore == null) {
lIsHighestScore = true;
}
if (lScore != null) {
- for (int i = 0; i < iPeptides.size(); i++) {
- if (!iSelectedPeptide.getModifiedPeptideSequence().equalsIgnoreCase(iPeptides.get(i).getModifiedPeptideSequence())) {
- Double lCompareScore = iPeptides.get(i).getScoreByScoreType(scoreTypes.get(l));
+ for (PeptideLowMem iPeptide : iPeptides) {
+ if (!iSelectedPeptide.getModifiedPeptideSequence().equalsIgnoreCase(iPeptide.getModifiedPeptideSequence())) {
+ Double lCompareScore = iPeptide.getScoreByScoreType(scoreType);
if (lCompareScore != null) {
if (lScore < lCompareScore) {
lIsHighestScore = false;
@@ -287,9 +287,9 @@ public boolean isHighestScoring(PeptideLowMem iSelectedPeptide, List scoreTypes) {
Boolean lIsLowestScore = null;
- for (int i = 0; i < scoreTypes.size(); i++) {
- if (iSelectedPeptide.getScoreByScoreType(scoreTypes.get(i)) != null) {
- Double lScore = iSelectedPeptide.getScoreByScoreType(scoreTypes.get(i));
+ for (ScoreTypeLowMem scoreType : scoreTypes) {
+ if (iSelectedPeptide.getScoreByScoreType(scoreType) != null) {
+ Double lScore = iSelectedPeptide.getScoreByScoreType(scoreType);
if (lIsLowestScore == null) {
lIsLowestScore = true;
}
diff --git a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/proteinsorter/ProteinSorterByAccession.java b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/proteinsorter/ProteinSorterByAccession.java
index be38a11..14e4b19 100644
--- a/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/proteinsorter/ProteinSorterByAccession.java
+++ b/thermo_msf_parser_API/src/main/java/com/compomics/thermo_msf_parser_API/proteinsorter/ProteinSorterByAccession.java
@@ -21,6 +21,7 @@ public class ProteinSorterByAccession implements Comparator, Seria
public ProteinSorterByAccession(boolean lAtoZ){
this.iAtoZ = lAtoZ;
}
+
@Override
public int compare(ProteinModel o1, ProteinModel o2) {
int comparator;
diff --git a/thermo_msf_parser_API/src/test/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/version_1_2/ModificationLowMemControllerTest.java b/thermo_msf_parser_API/src/test/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/version_1_2/ModificationLowMemControllerTest.java
index 45081df..4c2bda4 100644
--- a/thermo_msf_parser_API/src/test/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/version_1_2/ModificationLowMemControllerTest.java
+++ b/thermo_msf_parser_API/src/test/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/version_1_2/ModificationLowMemControllerTest.java
@@ -20,9 +20,6 @@ public class ModificationLowMemControllerTest {
private static MsfFile msfFile;
- public ModificationLowMemControllerTest() {
- }
-
@BeforeClass
public static void setUpClass() throws ClassNotFoundException, SQLException {
msfFile = new MsfFile(new File(ModificationLowMemControllerTest.class.getClassLoader().getResource("test-msf-v-1.2.msf").getPath()));
diff --git a/thermo_msf_parser_API/src/test/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/version_1_2/ProteinLowMemControllerTest.java b/thermo_msf_parser_API/src/test/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/version_1_2/ProteinLowMemControllerTest.java
index 572e198..c5f7250 100644
--- a/thermo_msf_parser_API/src/test/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/version_1_2/ProteinLowMemControllerTest.java
+++ b/thermo_msf_parser_API/src/test/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/version_1_2/ProteinLowMemControllerTest.java
@@ -23,10 +23,6 @@ public class ProteinLowMemControllerTest {
static MsfFile msfFile;
- public ProteinLowMemControllerTest(MsfFile msfFile) {
- this.msfFile = msfFile;
- }
-
@BeforeClass
public static void setUpClass() throws ClassNotFoundException, SQLException {
msfFile = new MsfFile(new File(ProteinLowMemControllerTest.class.getClassLoader().getResource("test-msf-v-1.2.msf").getPath()));
diff --git a/thermo_msf_parser_API/src/test/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/version_1_2/SpectrumLowMemControllerTest.java b/thermo_msf_parser_API/src/test/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/version_1_2/SpectrumLowMemControllerTest.java
index 1355bef..e2ba60d 100644
--- a/thermo_msf_parser_API/src/test/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/version_1_2/SpectrumLowMemControllerTest.java
+++ b/thermo_msf_parser_API/src/test/java/com/compomics/thermo_msf_parser_API/lowmeminstance/controllers/version_1_2/SpectrumLowMemControllerTest.java
@@ -76,7 +76,8 @@ public void testCreateSpectrumXMLForSpectrum() throws Exception {
System.out.println("createSpectrumXMLForSpectrum");
SpectrumLowMemController instance = new SpectrumLowMemController();
instance.createSpectrumXMLForSpectrum(lSpectrum, msfFile);
- FileUtils.writeStringToFile(new File("C:\\Users\\Davy\\spectrumoutput"), lSpectrum.getSpectrumXML());
+ FileUtils.writeStringToFile(new File("/spectrumoutput"), lSpectrum.getSpectrumXML());
+ //TODO test this file
}
/**