@@ -75,7 +75,7 @@ public double getMolecularWeight(ProteinSequence sequence) {
7575 AminoAcidCompoundSet aaSet = new AminoAcidCompoundSet ();
7676 char [] seq = getSequence (sequence .toString (), true );//ignore case
7777 for (char aa :seq ){
78- AminoAcidCompound c = aaSet .getCompoundForString (aa + "" );
78+ AminoAcidCompound c = aaSet .getCompoundForString (String . valueOf ( aa ) );
7979 if (Constraints .aa2MolecularWeight .containsKey (c )){
8080 value += Constraints .aa2MolecularWeight .get (c );
8181 }
@@ -263,7 +263,7 @@ public double getAvgHydropathy(ProteinSequence sequence) {
263263 AminoAcidCompoundSet aaSet = new AminoAcidCompoundSet ();
264264 char [] seq = this .getSequence (sequence .toString (), true );
265265 for (char aa :seq ){
266- AminoAcidCompound c = aaSet .getCompoundForString (aa + "" );
266+ AminoAcidCompound c = aaSet .getCompoundForString (String . valueOf ( aa ) );
267267 if (Constraints .aa2Hydrophathicity .containsKey (c )){
268268 total += Constraints .aa2Hydrophathicity .get (c );
269269 validLength ++;
@@ -477,13 +477,13 @@ private double getNetChargeInnovagen(Map<AminoAcidCompound, Integer> chargedAA2C
477477 AminoAcidCompoundSet aaSet = new AminoAcidCompoundSet ();
478478
479479 double nTerminalCharge = 0.0 ;
480- AminoAcidCompound nTermCompound = aaSet .getCompoundForString (nTerminalChar + "" );
480+ AminoAcidCompound nTermCompound = aaSet .getCompoundForString (String . valueOf ( nTerminalChar ) );
481481 if (Constraints .aa2NTerminalPka .containsKey (nTermCompound )){
482482 nTerminalCharge = this .getPosCharge (Constraints .aa2NTerminalPka .get (nTermCompound ), ph );
483483 }
484484
485485 double cTerminalCharge = 0.0 ;
486- AminoAcidCompound cTermCompound = aaSet .getCompoundForString (cTerminalChar + "" );
486+ AminoAcidCompound cTermCompound = aaSet .getCompoundForString (String . valueOf ( cTerminalChar ) );
487487 if (Constraints .aa2CTerminalPka .containsKey (cTermCompound )){
488488 cTerminalCharge = this .getNegCharge (Constraints .aa2CTerminalPka .get (cTermCompound ), ph );
489489 }
@@ -548,7 +548,7 @@ public double getEnrichment(ProteinSequence sequence, AminoAcidCompound aminoAci
548548 double counter = 0.0 ;
549549 char [] seq = this .getSequence (sequence .getSequenceAsString (), true );
550550 for (char aa :seq ){
551- if (aminoAcidCode .getShortName ().equals (aa + "" )){
551+ if (aminoAcidCode .getShortName ().equals (String . valueOf ( aa ) )){
552552 counter ++;
553553 }
554554 }
@@ -566,7 +566,7 @@ public Map<AminoAcidCompound, Double> getAAComposition(ProteinSequence sequence)
566566 char [] seq = this .getSequence (sequence .toString (), true );
567567 for (char aa :seq ){
568568 if (PeptideProperties .standardAASet .contains (aa )){
569- AminoAcidCompound compound = aaSet .getCompoundForString (aa + "" );
569+ AminoAcidCompound compound = aaSet .getCompoundForString (String . valueOf ( aa ) );
570570 aa2Composition .put (compound , aa2Composition .get (compound ) + 1.0 );
571571 validLength ++;
572572 }
0 commit comments