|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.biojava3.aaproperties.Utils
public class Utils
This is a utility class that contains utility methods which will facilitates the coding of other methods
| Constructor Summary | |
|---|---|
Utils()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
checkSequence(java.lang.String sequence)
Checks if the sequence contains invalid characters. |
static java.lang.String |
checkSequence(java.lang.String sequence,
java.util.Set<java.lang.Character> cSet)
Checks if the sequence contains invalid characters. |
static java.lang.String |
cleanSequence(java.lang.String sequence,
java.util.Set<java.lang.Character> cSet)
Returns a new sequence with all invalid characters being replaced by '-'. |
static boolean |
doesSequenceContainInvalidChar(java.lang.String sequence,
java.util.Set<java.lang.Character> cSet)
Checks if given sequence contains invalid characters. |
static int |
getNumberOfInvalidChar(java.lang.String sequence,
java.util.Set<java.lang.Character> cSet,
boolean ignoreCase)
Return the number of invalid characters in sequence. |
static double |
roundToDecimals(double d,
int c)
Returns a value with the desired number of decimal places. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Utils()
| Method Detail |
|---|
public static final double roundToDecimals(double d,
int c)
d - value to roundc - number of decimal places desired.
Must be greater or equal to zero, otherwise, the given value d would be returned without any modification.
public static final boolean doesSequenceContainInvalidChar(java.lang.String sequence,
java.util.Set<java.lang.Character> cSet)
sequence - protein sequence to be check.cSet - the set of characters that are deemed valid.
public static final int getNumberOfInvalidChar(java.lang.String sequence,
java.util.Set<java.lang.Character> cSet,
boolean ignoreCase)
sequence - protein sequence to count for invalid characters.cSet - the set of characters that are deemed valid.ignoreCase - indicates if cases should be ignored
public static final java.lang.String cleanSequence(java.lang.String sequence,
java.util.Set<java.lang.Character> cSet)
sequence - protein sequence to be cleancSet - user defined characters that are valid. Can be null. If null, then 20 standard protein amino acid codes will be considered as valid.
public static final java.lang.String checkSequence(java.lang.String sequence)
sequence - protein sequence to be check for invalid characters.
public static final java.lang.String checkSequence(java.lang.String sequence,
java.util.Set<java.lang.Character> cSet)
sequence - protein sequence to be check for invalid characters.cSet - character set which define the valid characters.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||