dList = new ArrayList<>();
for(Character c:propertyList){
switch(c){
case '1':
diff --git a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/Constraints.java b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/Constraints.java
index f223eaca23..cecd981223 100644
--- a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/Constraints.java
+++ b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/Constraints.java
@@ -30,7 +30,7 @@
/**
* This class is used to support the implementation of properties stated in IPeptideProperties.
* It initializes several values that would be needed for the computation of properties such as
- *
+ *
* Molecular weight
* Instability index
* Hydropathy value
@@ -64,14 +64,14 @@ public class Constraints {
public static AminoAcidCompound Y = aaSet.getCompoundForString("Y");
public static AminoAcidCompound V = aaSet.getCompoundForString("V");
- public static Map aa2ExtinctionCoefficient = new HashMap();
- public static Map aa2MolecularWeight = new HashMap();
- public static Map aa2Hydrophathicity = new HashMap();
- public static Map aa2PKa = new HashMap();
- public static Map diAA2Instability = new HashMap();
+ public static Map aa2ExtinctionCoefficient = new HashMap<>();
+ public static Map aa2MolecularWeight = new HashMap<>();
+ public static Map aa2Hydrophathicity = new HashMap<>();
+ public static Map aa2PKa = new HashMap<>();
+ public static Map diAA2Instability = new HashMap<>();
- public static Map aa2NTerminalPka = new HashMap();
- public static Map aa2CTerminalPka = new HashMap();
+ public static Map aa2NTerminalPka = new HashMap<>();
+ public static Map aa2CTerminalPka = new HashMap<>();
static{
initMolecularWeight();
diff --git a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/IPeptideProperties.java b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/IPeptideProperties.java
index babe1e54d8..5342013b61 100644
--- a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/IPeptideProperties.java
+++ b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/IPeptideProperties.java
@@ -26,7 +26,7 @@
import org.biojava.nbio.core.sequence.ProteinSequence;
import org.biojava.nbio.core.sequence.compound.AminoAcidCompound;
-import javax.xml.bind.JAXBException;
+import jakarta.xml.bind.JAXBException;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Map;
@@ -35,7 +35,7 @@
/**
* An interface to generate some basic physico-chemical properties of protein sequences.
* The following properties could be generated:
- *
+ *
* Molecular weight
* Absorbance
* Extinction coefficient
@@ -258,7 +258,7 @@ public AminoAcidCompositionTable obtainAminoAcidCompositionTable(File elementMas
* Returns the net charge of sequence at pH 7. The sequence argument must be
* a protein sequence consisting of only non-ambiguous characters.
* The net charge will be computed using the approach stated in
- * here
*
* pKa values used will be either
* those used by Expasy which referenced "Electrophoresis 1994, 15, 529-539"
@@ -312,4 +312,14 @@ public AminoAcidCompositionTable obtainAminoAcidCompositionTable(File elementMas
* @see AminoAcidCompound
*/
public Map getAAComposition(ProteinSequence sequence);
+
+ /**
+ * Calculates the aromaticity value of a protein according to Lobry, 1994.
+ * It is simply the relative frequency of Phe+Trp+Tyr.
+ *
+ * @param sequence a protein sequence consisting of non-ambiguous characters only
+ * @return the aromaticity of a protein sequence
+ * @see ProteinSequence
+ */
+ public double getAromaticity(ProteinSequence sequence);
}
diff --git a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/PeptideProperties.java b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/PeptideProperties.java
index a46b857314..d14a4d906b 100644
--- a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/PeptideProperties.java
+++ b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/PeptideProperties.java
@@ -28,7 +28,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.xml.bind.JAXBException;
+import jakarta.xml.bind.JAXBException;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Arrays;
@@ -37,7 +37,6 @@
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
-import java.util.stream.Stream;
/**
* This is an adaptor class which enable the ease of generating protein properties.
@@ -533,7 +532,7 @@ public static final Map getAAComposition(String seque
*/
public static final Map getAACompositionString(String sequence){
Map aa2Composition = getAAComposition(sequence);
- Map aaString2Composition = new HashMap();
+ Map aaString2Composition = new HashMap<>();
aaString2Composition = aa2Composition.keySet().stream() .collect(Collectors.toMap(aaCompound -> aaCompound.getShortName(),aaCompound ->aa2Composition.get(aaCompound)));
return aaString2Composition;
}
@@ -551,7 +550,7 @@ public static final Map getAACompositionString(String sequence){
*/
public static final Map getAACompositionChar(String sequence){
Map aa2Composition = getAAComposition(sequence);
- Map aaChar2Composition = new HashMap();
+ Map aaChar2Composition = new HashMap<>();
for(AminoAcidCompound aaCompound:aa2Composition.keySet()){
aaChar2Composition.put(aaCompound.getShortName().charAt(0), aa2Composition.get(aaCompound));
}
@@ -590,4 +589,28 @@ public static final int[] getPolarityOfAminoAcids(String sequence) {
}
return polarity;
}
+
+ /**
+ * An adaptor method to return the aromaticity value of sequence. The sequence argument
+ * must be a protein sequence consisting of only non-ambiguous characters.
+ *
+ * Calculates the aromaticity value of a protein according to Lobry, 1994.
+ * It is simply the relative frequency of Phe+Trp+Tyr.
+ * *
+ *
+ * @param sequence a protein sequence consisting of non-ambiguous characters only
+ * @return the aromaticity value of sequence
+ */
+ public static final double getAromaticity(String sequence) {
+ sequence = Utils.checkSequence(sequence);
+ ProteinSequence pSequence = null;
+ try {
+ pSequence = new ProteinSequence(sequence);
+ } catch (CompoundNotFoundException e) {
+ // the sequence was checked with Utils.checkSequence, this shouldn't happen
+ logger.error("The protein sequence contains invalid characters ({}), this should not happen. This is most likely a bug in Utils.checkSequence()", e.getMessage());
+ }
+ IPeptideProperties pp = new PeptidePropertiesImpl();
+ return pp.getAromaticity(pSequence);
+ }
}
diff --git a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/PeptidePropertiesImpl.java b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/PeptidePropertiesImpl.java
index 98e14c6a83..ceb0b234ed 100644
--- a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/PeptidePropertiesImpl.java
+++ b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/PeptidePropertiesImpl.java
@@ -29,9 +29,9 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
+import jakarta.xml.bind.JAXBContext;
+import jakarta.xml.bind.JAXBException;
+import jakarta.xml.bind.Unmarshaller;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
@@ -210,7 +210,7 @@ private Map getExtinctAACount(ProteinSequence sequen
}
}
AminoAcidCompoundSet aaSet = new AminoAcidCompoundSet();
- Map extinctAA2Count = new HashMap();
+ Map extinctAA2Count = new HashMap<>();
//Ignore Case is always true
extinctAA2Count.put(aaSet.getCompoundForString("W"), numW + smallW);
extinctAA2Count.put(aaSet.getCompoundForString("C"), (int) (numC + smallC));
@@ -532,7 +532,7 @@ private Map getChargedAACount(ProteinSequence sequen
}
}
AminoAcidCompoundSet aaSet = new AminoAcidCompoundSet();
- Map chargedAA2Count = new HashMap();
+ Map chargedAA2Count = new HashMap<>();
chargedAA2Count.put(aaSet.getCompoundForString("K"), numK);
chargedAA2Count.put(aaSet.getCompoundForString("R"), numR);
chargedAA2Count.put(aaSet.getCompoundForString("H"), numH);
@@ -558,7 +558,7 @@ public double getEnrichment(ProteinSequence sequence, AminoAcidCompound aminoAci
@Override
public Map getAAComposition(ProteinSequence sequence) {
int validLength = 0;
- Map aa2Composition = new HashMap();
+ Map aa2Composition = new HashMap<>();
AminoAcidCompoundSet aaSet = new AminoAcidCompoundSet();
for(AminoAcidCompound aa:aaSet.getAllCompounds()){
aa2Composition.put(aa, 0.0);
@@ -582,4 +582,41 @@ public Map getAAComposition(ProteinSequence sequence)
}
return aa2Composition;
}
+
+
+ @Override
+ public double getAromaticity(ProteinSequence sequence) {
+ int validLength = sequence.getSequenceAsString().length();
+
+ if (validLength == 0) {
+ logger.warn("Valid length of sequence is 0, can't divide by 0 to calculate aromaticity: setting aromaticity to 0");
+ return 0.0;
+ }
+
+ //Phe - Phenylalanine
+ int totalF = 0;
+ //Tyr - Tyrosine
+ int totalY = 0;
+ //Trp - Tryptophan
+ int totalW = 0;
+
+ char[] seq = this.getSequence(sequence.toString(), true);
+ for (char aa : seq) {
+ char amino = Character.toUpperCase(aa);
+ switch (amino) {
+ case 'F':
+ totalF++;
+ break;
+ case 'Y':
+ totalY++;
+ break;
+ case 'W':
+ totalW++;
+ break;
+ }
+ }
+
+ return (totalF + totalY + totalW) / (double) (validLength);
+ }
}
+
diff --git a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/Utils.java b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/Utils.java
index b66e879d7a..298ad61330 100644
--- a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/Utils.java
+++ b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/Utils.java
@@ -106,7 +106,7 @@ public final static int getNumberOfInvalidChar(String sequence, Set
* a new sequence with all invalid characters being replaced by '-'.
*/
public final static String cleanSequence(String sequence, Set cSet){
- Set invalidCharSet = new HashSet();
+ Set invalidCharSet = new HashSet<>();
StringBuilder cleanSeq = new StringBuilder();
if(cSet == null) cSet = PeptideProperties.standardAASet;
for(char c:sequence.toCharArray()){
diff --git a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/IProfeatProperties.java b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/IProfeatProperties.java
index 0fab96f94a..7f39fff79e 100644
--- a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/IProfeatProperties.java
+++ b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/IProfeatProperties.java
@@ -28,7 +28,7 @@ public interface IProfeatProperties {
/**
* Based on Table 2 of http://nar.oxfordjournals.org/content/34/suppl_2/W32.full.pdf
* An interface class to generate the properties of a protein sequence based on its converted attributes.
- * The seven different attributes are
+ * The seven different attributes are
* Hydrophobicity (Polar, Neutral, Hydrophobicity)
* Normalized van der Waals volume (Range 0 - 2.78, 2.95 - 4.0, 4.03 - 8.08)
* Polarity (Value 4.9 - 6.2, 8.0 - 9.2, 10.4 - 13.0)
@@ -103,8 +103,8 @@ public enum DISTRIBUTION {FIRST, FIRST25, FIRST50, FIRST75, ALL};
* Computes and return the position with respect to the sequence where the given distribution of the grouping can be found.
* Example: "1111122222"
* For the above example,
- * position of the GROUPING.GROUP1 && DISTRIBUTION.FIRST = 0/10 (because the first occurrence of '1' is at position 0)
- * position of the GROUPING.GROUP1 && DISTRIBUTION.ALL = 4/10 (because all occurrences of '1' happens on and before position 4)
+ * position of the GROUPING.GROUP1 & DISTRIBUTION.FIRST = 0/10 (because the first occurrence of '1' is at position 0)
+ * position of the GROUPING.GROUP1 & DISTRIBUTION.ALL = 4/10 (because all occurrences of '1' happens on and before position 4)
*
* @param sequence
* a protein sequence consisting of non-ambiguous characters only
diff --git a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/ProfeatProperties.java b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/ProfeatProperties.java
index d8844476f4..dd0d310439 100644
--- a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/ProfeatProperties.java
+++ b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/ProfeatProperties.java
@@ -119,8 +119,8 @@ public static Map> getTransition(String seque
* An adaptor method which computes and return the position with respect to the sequence where the given distribution of the grouping can be found.
* Example: "1111122222"
* For the above example,
- * position of the GROUPING.GROUP1 && DISTRIBUTION.FIRST = 0/10 (because the first occurrence of '1' is at position 0)
- * position of the GROUPING.GROUP1 && DISTRIBUTION.ALL = 4/10 (because all occurrences of '1' happens on and before position 4)
+ * position of the GROUPING.GROUP1 & DISTRIBUTION.FIRST = 0/10 (because the first occurrence of '1' is at position 0)
+ * position of the GROUPING.GROUP1 & DISTRIBUTION.ALL = 4/10 (because all occurrences of '1' happens on and before position 4)
*
* @param sequence
* a protein sequence consisting of non-ambiguous characters only
diff --git a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/ProfeatPropertiesImpl.java b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/ProfeatPropertiesImpl.java
index 75b0ff3064..18b63a468b 100644
--- a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/ProfeatPropertiesImpl.java
+++ b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/ProfeatPropertiesImpl.java
@@ -125,35 +125,35 @@ private Convertor getConvertor(ATTRIBUTE attribute) throws Exception{
@Override
public Map getComposition(ProteinSequence sequence, ATTRIBUTE attribute) throws Exception {
- Map grouping2Composition = new HashMap();
+ Map grouping2Composition = new HashMap<>();
for(GROUPING group:GROUPING.values()) grouping2Composition.put(group, getComposition(sequence, attribute, group));
return grouping2Composition;
}
@Override
public Map> getComposition(ProteinSequence sequence) throws Exception {
- Map> attribute2Grouping2Composition = new HashMap>();
+ Map> attribute2Grouping2Composition = new HashMap<>();
for(ATTRIBUTE attribute:ATTRIBUTE.values()) attribute2Grouping2Composition.put(attribute, getComposition(sequence, attribute));
return attribute2Grouping2Composition;
}
@Override
public Map getTransition(ProteinSequence sequence, ATTRIBUTE attribute) throws Exception {
- Map transition2Double = new HashMap();
+ Map transition2Double = new HashMap<>();
for(TRANSITION transition:TRANSITION.values()) transition2Double.put(transition, getTransition(sequence, attribute, transition));
return transition2Double;
}
@Override
public Map> getTransition(ProteinSequence sequence) throws Exception {
- Map> attribute2Transition2Double = new HashMap>();
+ Map> attribute2Transition2Double = new HashMap<>();
for(ATTRIBUTE attribute:ATTRIBUTE.values()) attribute2Transition2Double.put(attribute, getTransition(sequence, attribute));
return attribute2Transition2Double;
}
@Override
public Map getDistributionPosition(ProteinSequence sequence, ATTRIBUTE attribute, GROUPING group) throws Exception {
- Map distribution2Double = new HashMap();
+ Map distribution2Double = new HashMap<>();
for(DISTRIBUTION distribution:DISTRIBUTION.values())
distribution2Double.put(distribution, getDistributionPosition(sequence, attribute, group, distribution));
return distribution2Double;
@@ -161,7 +161,7 @@ public Map getDistributionPosition(ProteinSequence sequenc
@Override
public Map> getDistributionPosition(ProteinSequence sequence, ATTRIBUTE attribute) throws Exception {
- Map> grouping2Distribution2Double = new HashMap>();
+ Map> grouping2Distribution2Double = new HashMap<>();
for(GROUPING group:GROUPING.values())
grouping2Distribution2Double.put(group, getDistributionPosition(sequence, attribute, group));
return grouping2Distribution2Double;
@@ -170,7 +170,7 @@ public Map> getDistributionPosition(ProteinS
@Override
public Map>> getDistributionPosition(ProteinSequence sequence) throws Exception {
Map>> attribute2Grouping2Distribution2Double =
- new HashMap>>();
+ new HashMap<>();
for(ATTRIBUTE attribute:ATTRIBUTE.values())
attribute2Grouping2Distribution2Double.put(attribute, getDistributionPosition(sequence, attribute));
return attribute2Grouping2Distribution2Double;
diff --git a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/convertor/Convertor.java b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/convertor/Convertor.java
index a88d93add3..e298ab2520 100644
--- a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/convertor/Convertor.java
+++ b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/convertor/Convertor.java
@@ -28,7 +28,7 @@ public abstract class Convertor {
/**
* Based on Table 2 of http://nar.oxfordjournals.org/content/34/suppl_2/W32.full.pdf
* An abstract class to convert a protein sequence into representation of different attribute with each attribute having 3 groups.
- * The seven different attributes are
+ * The seven different attributes are
* Hydrophobicity (Polar, Neutral, Hydrophobicity)
* Normalized van der Waals volume (Range 0 - 2.78, 2.95 - 4.0, 4.03 - 8.08)
* Polarity (Value 4.9 - 6.2, 8.0 - 9.2, 10.4 - 13.0)
diff --git a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/convertor/package-info.java b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/convertor/package-info.java
index 22143b53cb..a28076aa41 100644
--- a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/convertor/package-info.java
+++ b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/convertor/package-info.java
@@ -20,7 +20,7 @@
*/
/**
* Set of classes that enable the conversion protein sequences into various attributes.
- * The seven different attributes are
+ * The seven different attributes are
* Hydrophobicity (Polar, Neutral, Hydrophobicity)
* Normalized van der Waals volume (Range 0 - 2.78, 2.95 - 4.0, 4.03 - 8.08)
* Polarity (Value 4.9 - 6.2, 8.0 - 9.2, 10.4 - 13.0)
diff --git a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/AminoAcidComposition.java b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/AminoAcidComposition.java
index 9004426ff5..034df5fb12 100644
--- a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/AminoAcidComposition.java
+++ b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/AminoAcidComposition.java
@@ -20,7 +20,7 @@
*/
package org.biojava.nbio.aaproperties.xml;
-import javax.xml.bind.annotation.*;
+import jakarta.xml.bind.annotation.*;
import java.util.List;
@XmlRootElement(name = "compoundcomposition", namespace ="http://biojava.org")
diff --git a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/AminoAcidCompositionTable.java b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/AminoAcidCompositionTable.java
index 4731e90453..b209859600 100644
--- a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/AminoAcidCompositionTable.java
+++ b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/AminoAcidCompositionTable.java
@@ -20,10 +20,10 @@
*/
package org.biojava.nbio.aaproperties.xml;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlElement;
+import jakarta.xml.bind.annotation.XmlRootElement;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -83,7 +83,7 @@ private void generatesAminoAcidCompoundSet(){
* Stores the mass of elements and isotopes
*/
public void computeMolecularWeight(ElementTable eTable){
- this.aaSymbol2MolecularWeight = new HashMap();
+ this.aaSymbol2MolecularWeight = new HashMap<>();
for(AminoAcidComposition a:aminoacid){
//Check to ensure that the symbol is of single character
if(a.getSymbol().length() != 1){
@@ -132,7 +132,7 @@ public void computeMolecularWeight(ElementTable eTable){
* @throws NullPointerException
* thrown if AminoAcidCompositionTable.computeMolecularWeight(ElementTable) is not called before this method
*/
- public double getMolecularWeight(Character aaSymbol) throws NullPointerException{
+ public double getMolecularWeight(Character aaSymbol) {
if(this.aaSymbol2MolecularWeight == null){
throw new NullPointerException("Please call AminoAcidCompositionTable.computeMolecularWeight(ElementTable) before this method");
}
diff --git a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/CaseFreeAminoAcidCompoundSet.java b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/CaseFreeAminoAcidCompoundSet.java
index 9b211ab305..7a436d32cd 100644
--- a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/CaseFreeAminoAcidCompoundSet.java
+++ b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/CaseFreeAminoAcidCompoundSet.java
@@ -39,9 +39,9 @@
*/
public class CaseFreeAminoAcidCompoundSet implements CompoundSet {
- private final Map aminoAcidCompoundCache = new HashMap();
+ private final Map aminoAcidCompoundCache = new HashMap<>();
private final Map> equivalentsCache =
- new HashMap>();
+ new HashMap<>();
public CaseFreeAminoAcidCompoundSet() {
aminoAcidCompoundCache.put("A", new AminoAcidCompound(null, "A", "Ala", "Alanine", 71.0788f));
@@ -83,7 +83,7 @@ public CaseFreeAminoAcidCompoundSet() {
//which then does the actual conversion to Pyl.
aminoAcidCompoundCache.put("O", new AminoAcidCompound(null, "O", "Pyl", "Pyrrolysine", 255.3172f));
- Map lowerCaseSet = new HashMap();
+ Map lowerCaseSet = new HashMap<>();
for(String s:this.aminoAcidCompoundCache.keySet()){
lowerCaseSet.put(s.toLowerCase(), this.aminoAcidCompoundCache.get(s));
}
@@ -144,7 +144,7 @@ public Set getEquivalentCompounds(AminoAcidCompound compound)
addAmbiguousEquivalents("I", "L", "J");
// ambiguous gaps
AminoAcidCompound gap1, gap2, gap3;
- Set gaps = new HashSet();
+ Set gaps = new HashSet<>();
gaps.add(gap1 = aminoAcidCompoundCache.get("-"));
gaps.add(gap2 = aminoAcidCompoundCache.get("."));
gaps.add(gap3 = aminoAcidCompoundCache.get("_"));
@@ -162,18 +162,18 @@ private void addAmbiguousEquivalents(String one, String two, String either) {
Set equivalents;
AminoAcidCompound cOne, cTwo, cEither;
- equivalents = new HashSet();
+ equivalents = new HashSet<>();
equivalents.add(cOne = aminoAcidCompoundCache.get(one));
equivalents.add(cTwo = aminoAcidCompoundCache.get(two));
equivalents.add(cEither = aminoAcidCompoundCache.get(either));
equivalentsCache.put(cEither, equivalents);
- equivalents = new HashSet();
+ equivalents = new HashSet<>();
equivalents.add(cOne);
equivalents.add(cEither);
equivalentsCache.put(cOne, equivalents);
- equivalents = new HashSet();
+ equivalents = new HashSet<>();
equivalents.add(cTwo);
equivalents.add(cEither);
equivalentsCache.put(cTwo, equivalents);
@@ -186,7 +186,7 @@ public boolean hasCompound(AminoAcidCompound compound) {
@Override
public List getAllCompounds() {
- return new ArrayList(aminoAcidCompoundCache.values());
+ return new ArrayList<>(aminoAcidCompoundCache.values());
}
diff --git a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/Element.java b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/Element.java
index b03d15d1ac..c7b9a425fc 100644
--- a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/Element.java
+++ b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/Element.java
@@ -20,10 +20,10 @@
*/
package org.biojava.nbio.aaproperties.xml;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlAttribute;
+import jakarta.xml.bind.annotation.XmlElement;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -120,7 +120,7 @@ public List getIsotopes() {
public void setIsotopes(List isotopes) {
this.isotope = isotopes;
- this.name2Isotope = new HashMap();
+ this.name2Isotope = new HashMap<>();
if(isotopes != null){
for(Isotope i:isotopes){
name2Isotope.put(i.getName(), i);
diff --git a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/ElementTable.java b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/ElementTable.java
index efac678f23..e2b30c6211 100644
--- a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/ElementTable.java
+++ b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/ElementTable.java
@@ -20,7 +20,7 @@
*/
package org.biojava.nbio.aaproperties.xml;
-import javax.xml.bind.annotation.XmlRootElement;
+import jakarta.xml.bind.annotation.XmlRootElement;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -58,8 +58,8 @@ public void setElement(List eList){
* Populate the Maps for quick retrieval
*/
public void populateMaps(){
- this.elementName2Element = new HashMap();
- this.isotopeName2Isotope = new HashMap();
+ this.elementName2Element = new HashMap<>();
+ this.isotopeName2Isotope = new HashMap<>();
if(this.element != null){
for(Element e:this.element){
this.elementName2Element.put(e.getName(), e);
diff --git a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/Isotope.java b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/Isotope.java
index 493bf938a3..cc0682f084 100644
--- a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/Isotope.java
+++ b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/Isotope.java
@@ -20,10 +20,10 @@
*/
package org.biojava.nbio.aaproperties.xml;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlAttribute;
+import jakarta.xml.bind.annotation.XmlType;
@XmlType(name = "Iostope", propOrder = {"name","neutronsNum","mass"})
diff --git a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/ModifiedAminoAcidCompoundSet.java b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/ModifiedAminoAcidCompoundSet.java
index d9c11c7e66..b1c63e9655 100644
--- a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/ModifiedAminoAcidCompoundSet.java
+++ b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/ModifiedAminoAcidCompoundSet.java
@@ -28,7 +28,7 @@
public class ModifiedAminoAcidCompoundSet implements CompoundSet {
- private final Map aminoAcidCompoundCache = new HashMap();
+ private final Map aminoAcidCompoundCache = new HashMap<>();
public ModifiedAminoAcidCompoundSet(List aaList, Map aaSymbol2MolecularWeight) {
this.aminoAcidCompoundCache.put("-", new AminoAcidCompound(null, "-", "", "", 0.0f));
@@ -84,7 +84,7 @@ public boolean hasCompound(AminoAcidCompound compound) {
@Override
public List getAllCompounds() {
- return new ArrayList(aminoAcidCompoundCache.values());
+ return new ArrayList<>(aminoAcidCompoundCache.values());
}
@Override
diff --git a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/MyValidationEventHandler.java b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/MyValidationEventHandler.java
index 2f49bb5c18..9430090436 100644
--- a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/MyValidationEventHandler.java
+++ b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/MyValidationEventHandler.java
@@ -23,9 +23,9 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.xml.bind.ValidationEvent;
-import javax.xml.bind.ValidationEventHandler;
-import javax.xml.bind.ValidationEventLocator;
+import jakarta.xml.bind.ValidationEvent;
+import jakarta.xml.bind.ValidationEventHandler;
+import jakarta.xml.bind.ValidationEventLocator;
public class MyValidationEventHandler implements ValidationEventHandler{
diff --git a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/Name2Count.java b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/Name2Count.java
index 431cc3e48c..b30e4c6dd2 100644
--- a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/Name2Count.java
+++ b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/Name2Count.java
@@ -20,9 +20,9 @@
*/
package org.biojava.nbio.aaproperties.xml;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlAttribute;
@XmlAccessorType(XmlAccessType.FIELD)
public class Name2Count{
diff --git a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/SchemaGenerator.java b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/SchemaGenerator.java
index 8005bf3bac..5ca2b550ed 100644
--- a/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/SchemaGenerator.java
+++ b/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/xml/SchemaGenerator.java
@@ -20,7 +20,7 @@
*/
package org.biojava.nbio.aaproperties.xml;
-import javax.xml.bind.SchemaOutputResolver;
+import jakarta.xml.bind.SchemaOutputResolver;
import javax.xml.transform.Result;
import javax.xml.transform.stream.StreamResult;
import java.io.File;
diff --git a/biojava-aa-prop/src/test/java/org/biojava/nbio/aaproperties/CookBookTest.java b/biojava-aa-prop/src/test/java/org/biojava/nbio/aaproperties/CookBookTest.java
index 25ebf3abed..bbde2c1e30 100644
--- a/biojava-aa-prop/src/test/java/org/biojava/nbio/aaproperties/CookBookTest.java
+++ b/biojava-aa-prop/src/test/java/org/biojava/nbio/aaproperties/CookBookTest.java
@@ -20,13 +20,12 @@
*/
package org.biojava.nbio.aaproperties;
-import org.biojava.nbio.aaproperties.PeptideProperties;
import org.biojava.nbio.aaproperties.xml.AminoAcidCompositionTable;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.xml.bind.JAXBException;
+import jakarta.xml.bind.JAXBException;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Map;
diff --git a/biojava-aa-prop/src/test/java/org/biojava/nbio/aaproperties/PeptidePropertiesImplTest.java b/biojava-aa-prop/src/test/java/org/biojava/nbio/aaproperties/PeptidePropertiesImplTest.java
index 6220ea0b28..8c79e3b078 100644
--- a/biojava-aa-prop/src/test/java/org/biojava/nbio/aaproperties/PeptidePropertiesImplTest.java
+++ b/biojava-aa-prop/src/test/java/org/biojava/nbio/aaproperties/PeptidePropertiesImplTest.java
@@ -20,14 +20,12 @@
*/
package org.biojava.nbio.aaproperties;
-import org.biojava.nbio.aaproperties.PeptideProperties;
-import org.biojava.nbio.aaproperties.Utils;
import org.biojava.nbio.aaproperties.xml.AminoAcidCompositionTable;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.xml.bind.JAXBException;
+import jakarta.xml.bind.JAXBException;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Map;
@@ -358,4 +356,12 @@ public void testNetCharge(){
public void testNetChargeNull(){
assertEquals(8.6, PeptideProperties.getNetCharge(null), delta);
}
+
+ @Test
+ public void testAromaticity() {
+ assertEquals(1, PeptideProperties.getAromaticity("WWWYYYYFFFWWWYYYYFFF"), 0.001);
+ assertEquals(0.5, PeptideProperties.getAromaticity("WWWYYYYFFFAAAAAAAAAA"), 0.001);
+ assertEquals(0.08, PeptideProperties.getAromaticity(sequence), 0.001);
+ assertEquals(0.0, PeptideProperties.getAromaticity(fullInvalidSequence), 0.001);
+ }
}
diff --git a/biojava-aa-prop/src/test/java/org/biojava/nbio/aaproperties/ProfeatPropertiesImplTest.java b/biojava-aa-prop/src/test/java/org/biojava/nbio/aaproperties/ProfeatPropertiesImplTest.java
deleted file mode 100644
index d1edcef5a9..0000000000
--- a/biojava-aa-prop/src/test/java/org/biojava/nbio/aaproperties/ProfeatPropertiesImplTest.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * BioJava development code
- *
- * This code may be freely distributed and modified under the
- * terms of the GNU Lesser General Public Licence. This should
- * be distributed with the code. If you do not have a copy,
- * see:
- *
- * http://www.gnu.org/copyleft/lesser.html
- *
- * Copyright for this code is held jointly by the individual
- * authors. These should be listed in @author doc comments.
- *
- * For more information on the BioJava project and its aims,
- * or to join the biojava-l mailing list, visit the home page
- * at:
- *
- * http://www.biojava.org/
- *
- */
-package org.biojava.nbio.aaproperties;
-
-public class ProfeatPropertiesImplTest {
-
-}
diff --git a/biojava-aa-prop/src/test/java/org/biojava/nbio/aaproperties/xml/AminoAcidTest.java b/biojava-aa-prop/src/test/java/org/biojava/nbio/aaproperties/xml/AminoAcidTest.java
index 528192dcb4..49947c1f50 100644
--- a/biojava-aa-prop/src/test/java/org/biojava/nbio/aaproperties/xml/AminoAcidTest.java
+++ b/biojava-aa-prop/src/test/java/org/biojava/nbio/aaproperties/xml/AminoAcidTest.java
@@ -23,10 +23,10 @@
import org.biojava.nbio.aaproperties.PeptideProperties;
import org.junit.Test;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
+import jakarta.xml.bind.JAXBContext;
+import jakarta.xml.bind.JAXBException;
+import jakarta.xml.bind.Marshaller;
+import jakarta.xml.bind.Unmarshaller;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
diff --git a/biojava-aa-prop/src/test/java/org/biojava/nbio/aaproperties/xml/ElementTest.java b/biojava-aa-prop/src/test/java/org/biojava/nbio/aaproperties/xml/ElementTest.java
index 37376b6bd0..26de47bf03 100644
--- a/biojava-aa-prop/src/test/java/org/biojava/nbio/aaproperties/xml/ElementTest.java
+++ b/biojava-aa-prop/src/test/java/org/biojava/nbio/aaproperties/xml/ElementTest.java
@@ -20,18 +20,14 @@
*/
package org.biojava.nbio.aaproperties.xml;
-import org.biojava.nbio.aaproperties.xml.Element;
-import org.biojava.nbio.aaproperties.xml.ElementTable;
-import org.biojava.nbio.aaproperties.xml.Isotope;
-import org.biojava.nbio.aaproperties.xml.SchemaGenerator;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
+import jakarta.xml.bind.JAXBContext;
+import jakarta.xml.bind.JAXBException;
+import jakarta.xml.bind.Marshaller;
+import jakarta.xml.bind.Unmarshaller;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
diff --git a/biojava-alignment/pom.xml b/biojava-alignment/pom.xml
index f342cebeef..fe75c181c7 100644
--- a/biojava-alignment/pom.xml
+++ b/biojava-alignment/pom.xml
@@ -4,7 +4,7 @@
biojava
org.biojava
- 5.4.0
+ 7.2.3-SNAPSHOT
biojava-alignment
biojava-alignment
@@ -47,7 +47,7 @@
org.biojava
biojava-core
- 5.4.0
+ 7.2.3-SNAPSHOT
compile
@@ -63,7 +63,7 @@
org.apache.logging.log4j
- log4j-slf4j-impl
+ log4j-slf4j2-impl
org.apache.logging.log4j
diff --git a/biojava-alignment/src/main/java/demo/CookbookMSA.java b/biojava-alignment/src/main/java/demo/CookbookMSA.java
index d2952bbeac..c617745539 100644
--- a/biojava-alignment/src/main/java/demo/CookbookMSA.java
+++ b/biojava-alignment/src/main/java/demo/CookbookMSA.java
@@ -43,7 +43,7 @@ public static void main(String[] args) throws Exception {
}
private static void multipleSequenceAlignment(String[] ids) throws Exception {
- List lst = new ArrayList();
+ List lst = new ArrayList<>();
for (String id : ids) {
lst.add(getSequenceForId(id));
}
diff --git a/biojava-alignment/src/main/java/demo/DemoDistanceTree.java b/biojava-alignment/src/main/java/demo/DemoDistanceTree.java
index c9f82d39f7..9215fa43dc 100644
--- a/biojava-alignment/src/main/java/demo/DemoDistanceTree.java
+++ b/biojava-alignment/src/main/java/demo/DemoDistanceTree.java
@@ -22,6 +22,7 @@
import java.io.InputStream;
import java.util.LinkedHashMap;
+import java.util.Map;
import org.biojava.nbio.core.alignment.matrices.SubstitutionMatrixHelper;
import org.biojava.nbio.core.alignment.template.SubstitutionMatrix;
@@ -58,19 +59,19 @@ public static void main(String[] args) throws Exception {
.getResourceAsStream("/PF00104_small.fasta");
FastaReader fastaReader =
- new FastaReader(
+ new FastaReader<>(
inStream,
new GenericFastaHeaderParser(),
new ProteinSequenceCreator(AminoAcidCompoundSet
.getAminoAcidCompoundSet()));
- LinkedHashMap proteinSequences =
+ Map proteinSequences =
fastaReader.process();
inStream.close();
MultipleSequenceAlignment msa =
- new MultipleSequenceAlignment();
+ new MultipleSequenceAlignment<>();
for (ProteinSequence proteinSequence : proteinSequences.values()) {
msa.addAlignedSequence(proteinSequence);
diff --git a/biojava-alignment/src/main/java/org/biojava/nbio/alignment/Alignments.java b/biojava-alignment/src/main/java/org/biojava/nbio/alignment/Alignments.java
index 4ed72d0979..b389504826 100644
--- a/biojava-alignment/src/main/java/org/biojava/nbio/alignment/Alignments.java
+++ b/biojava-alignment/src/main/java/org/biojava/nbio/alignment/Alignments.java
@@ -122,7 +122,7 @@ private Alignments() { }
* {@link ConcurrencyTools} utility.
*
* @param each {@link Sequence} of an alignment pair is of type S
- * @param each element of an {@link AlignedSequence} is a {@link Compound} of type C
+ * @param each element of a sequence is a {@link Compound} of type C
* @param sequences the {@link List} of {@link Sequence}s to align
* @param type chosen type from list of pairwise sequence alignment routines
* @param gapPenalty the gap penalties used during alignment
@@ -189,7 +189,7 @@ public static , C extends Compound> Profile getMulti
runPairwiseScorers(scorers);
// stage 2: hierarchical clustering into a guide tree
- GuideTree tree = new GuideTree(sequences, scorers);
+ GuideTree tree = new GuideTree<>(sequences, scorers);
scorers = null;
// stage 3: progressive alignment
@@ -203,7 +203,7 @@ public static , C extends Compound> Profile getMulti
* Factory method which computes a sequence alignment for the given {@link Sequence} pair.
*
* @param each {@link Sequence} of the pair is of type S
- * @param each element of an {@link AlignedSequence} is a {@link Compound} of type C
+ * @param each element of a sequence is a {@link Compound} of type C
* @param query the first {@link Sequence}s to align
* @param target the second {@link Sequence}s to align
* @param type chosen type from list of pairwise sequence alignment routines
@@ -223,7 +223,7 @@ public static , C extends Compound> SequencePair get
* Factory method which sets up a sequence alignment for all {@link Sequence} pairs in the given {@link List}.
*
* @param each {@link Sequence} of an alignment pair is of type S
- * @param each element of an {@link AlignedSequence} is a {@link Compound} of type C
+ * @param each element of a sequence is a {@link Compound} of type C
* @param sequences the {@link List} of {@link Sequence}s to align
* @param type chosen type from list of pairwise sequence alignment routines
* @param gapPenalty the gap penalties used during alignment
@@ -233,7 +233,7 @@ public static , C extends Compound> SequencePair get
static , C extends Compound> List> getAllPairsAligners(
List sequences, PairwiseSequenceAlignerType type, GapPenalty gapPenalty,
SubstitutionMatrix subMatrix) {
- List> allPairs = new ArrayList>();
+ List> allPairs = new ArrayList<>();
for (int i = 0; i < sequences.size(); i++) {
for (int j = i+1; j < sequences.size(); j++) {
allPairs.add(getPairwiseAligner(sequences.get(i), sequences.get(j), type, gapPenalty, subMatrix));
@@ -256,7 +256,7 @@ static , C extends Compound> List, C extends Compound> List> getAllPairsScorers(
List sequences, PairwiseSequenceScorerType type, GapPenalty gapPenalty,
SubstitutionMatrix subMatrix) {
- List> allPairs = new ArrayList>();
+ List> allPairs = new ArrayList<>();
for (int i = 0; i < sequences.size(); i++) {
for (int j = i+1; j < sequences.size(); j++) {
allPairs.add(getPairwiseScorer(sequences.get(i), sequences.get(j), type, gapPenalty, subMatrix));
@@ -291,7 +291,7 @@ public static , C extends Compound> double[] getAllPairsSc
* @return calculated elements
*/
static List getListFromFutures(List> futures) {
- List list = new ArrayList();
+ List list = new ArrayList<>();
for (Future f : futures) {
// TODO when added to ConcurrencyTools, log completions and exceptions instead of printing stack traces
try {
@@ -309,7 +309,7 @@ static List getListFromFutures(List> futures) {
* Factory method which constructs a pairwise sequence aligner.
*
* @param each {@link Sequence} of an alignment pair is of type S
- * @param each element of an {@link AlignedSequence} is a {@link Compound} of type C
+ * @param each element of a sequence is a {@link Compound} of type C
* @param query the first {@link Sequence} to align
* @param target the second {@link Sequence} to align
* @param type chosen type from list of pairwise sequence alignment routines
@@ -326,9 +326,9 @@ public static , C extends Compound> PairwiseSequenceAligne
switch (type) {
default:
case GLOBAL:
- return new NeedlemanWunsch(query, target, gapPenalty, subMatrix);
+ return new NeedlemanWunsch<>(query, target, gapPenalty, subMatrix);
case LOCAL:
- return new SmithWaterman(query, target, gapPenalty, subMatrix);
+ return new SmithWaterman<>(query, target, gapPenalty, subMatrix);
case GLOBAL_LINEAR_SPACE:
case LOCAL_LINEAR_SPACE:
// TODO other alignment options (Myers-Miller, Thompson)
@@ -374,18 +374,18 @@ static , C extends Compound> PairwiseSequenceScorer
case GLOBAL:
return getPairwiseAligner(query, target, PairwiseSequenceAlignerType.GLOBAL, gapPenalty, subMatrix);
case GLOBAL_IDENTITIES:
- return new FractionalIdentityScorer(getPairwiseAligner(query, target,
+ return new FractionalIdentityScorer<>(getPairwiseAligner(query, target,
PairwiseSequenceAlignerType.GLOBAL, gapPenalty, subMatrix));
case GLOBAL_SIMILARITIES:
- return new FractionalSimilarityScorer(getPairwiseAligner(query, target,
+ return new FractionalSimilarityScorer<>(getPairwiseAligner(query, target,
PairwiseSequenceAlignerType.GLOBAL, gapPenalty, subMatrix));
case LOCAL:
return getPairwiseAligner(query, target, PairwiseSequenceAlignerType.LOCAL, gapPenalty, subMatrix);
case LOCAL_IDENTITIES:
- return new FractionalIdentityScorer(getPairwiseAligner(query, target,
+ return new FractionalIdentityScorer<>(getPairwiseAligner(query, target,
PairwiseSequenceAlignerType.LOCAL, gapPenalty, subMatrix));
case LOCAL_SIMILARITIES:
- return new FractionalSimilarityScorer(getPairwiseAligner(query, target,
+ return new FractionalSimilarityScorer<>(getPairwiseAligner(query, target,
PairwiseSequenceAlignerType.LOCAL, gapPenalty, subMatrix));
case KMERS:
case WU_MANBER:
@@ -399,7 +399,7 @@ static , C extends Compound> PairwiseSequenceScorer
* Factory method which constructs a profile-profile aligner.
*
* @param each {@link Sequence} of an alignment profile is of type S
- * @param each element of an {@link AlignedSequence} is a {@link Compound} of type C
+ * @param each element of a sequence is a {@link Compound} of type C
* @param profile1 the first {@link Profile} to align
* @param profile2 the second {@link Profile} to align
* @param type chosen type from list of profile-profile alignment routines
@@ -413,7 +413,7 @@ static , C extends Compound> ProfileProfileAligner g
switch (type) {
default:
case GLOBAL:
- return new SimpleProfileProfileAligner(profile1, profile2, gapPenalty, subMatrix);
+ return new SimpleProfileProfileAligner<>(profile1, profile2, gapPenalty, subMatrix);
case GLOBAL_LINEAR_SPACE:
case GLOBAL_CONSENSUS:
case LOCAL:
@@ -429,7 +429,7 @@ static , C extends Compound> ProfileProfileAligner g
* Factory method which constructs a profile-profile aligner.
*
* @param each {@link Sequence} of an alignment profile is of type S
- * @param each element of an {@link AlignedSequence} is a {@link Compound} of type C
+ * @param each element of a sequence is a {@link Compound} of type C
* @param profile1 the first {@link Profile} to align
* @param profile2 the second {@link Profile} to align
* @param type chosen type from list of profile-profile alignment routines
@@ -443,7 +443,7 @@ static , C extends Compound> ProfileProfileAligner g
switch (type) {
default:
case GLOBAL:
- return new SimpleProfileProfileAligner(profile1, profile2, gapPenalty, subMatrix);
+ return new SimpleProfileProfileAligner<>(profile1, profile2, gapPenalty, subMatrix);
case GLOBAL_LINEAR_SPACE:
case GLOBAL_CONSENSUS:
case LOCAL:
@@ -459,7 +459,7 @@ static , C extends Compound> ProfileProfileAligner g
* Factory method which constructs a profile-profile aligner.
*
* @param each {@link Sequence} of an alignment profile is of type S
- * @param each element of an {@link AlignedSequence} is a {@link Compound} of type C
+ * @param each element of a sequence is a {@link Compound} of type C
* @param profile1 the first {@link Profile} to align
* @param profile2 the second {@link Profile} to align
* @param type chosen type from list of profile-profile alignment routines
@@ -473,7 +473,7 @@ static , C extends Compound> ProfileProfileAligner g
switch (type) {
default:
case GLOBAL:
- return new SimpleProfileProfileAligner(profile1, profile2, gapPenalty, subMatrix);
+ return new SimpleProfileProfileAligner<>(profile1, profile2, gapPenalty, subMatrix);
case GLOBAL_LINEAR_SPACE:
case GLOBAL_CONSENSUS:
case LOCAL:
@@ -489,7 +489,7 @@ static , C extends Compound> ProfileProfileAligner g
* Factory method which constructs a profile-profile aligner.
*
* @param each {@link Sequence} of an alignment profile is of type S
- * @param each element of an {@link AlignedSequence} is a {@link Compound} of type C
+ * @param each element of a sequence is a {@link Compound} of type C
* @param profile1 the first {@link Profile} to align
* @param profile2 the second {@link Profile} to align
* @param type chosen type from list of profile-profile alignment routines
@@ -503,7 +503,7 @@ static , C extends Compound> ProfileProfileAligner