org.biojava3.aaproperties.profeat
Class ProfeatPropertiesImpl

java.lang.Object
  extended by org.biojava3.aaproperties.profeat.ProfeatPropertiesImpl
All Implemented Interfaces:
IProfeatProperties

public class ProfeatPropertiesImpl
extends Object
implements IProfeatProperties


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.biojava3.aaproperties.profeat.IProfeatProperties
IProfeatProperties.ATTRIBUTE, IProfeatProperties.DISTRIBUTION, IProfeatProperties.GROUPING, IProfeatProperties.TRANSITION
 
Constructor Summary
ProfeatPropertiesImpl()
           
 
Method Summary
 Map<IProfeatProperties.ATTRIBUTE,Map<IProfeatProperties.GROUPING,Double>> getComposition(ProteinSequence sequence)
           
 Map<IProfeatProperties.GROUPING,Double> getComposition(ProteinSequence sequence, IProfeatProperties.ATTRIBUTE attribute)
           
 double getComposition(ProteinSequence sequence, IProfeatProperties.ATTRIBUTE attribute, IProfeatProperties.GROUPING group)
          Returns the composition of the specific grouping for the given attribute.
 Map<IProfeatProperties.ATTRIBUTE,Map<IProfeatProperties.GROUPING,Map<IProfeatProperties.DISTRIBUTION,Double>>> getDistributionPosition(ProteinSequence sequence)
           
 Map<IProfeatProperties.GROUPING,Map<IProfeatProperties.DISTRIBUTION,Double>> getDistributionPosition(ProteinSequence sequence, IProfeatProperties.ATTRIBUTE attribute)
           
 Map<IProfeatProperties.DISTRIBUTION,Double> getDistributionPosition(ProteinSequence sequence, IProfeatProperties.ATTRIBUTE attribute, IProfeatProperties.GROUPING group)
           
 double getDistributionPosition(ProteinSequence sequence, IProfeatProperties.ATTRIBUTE attribute, IProfeatProperties.GROUPING group, IProfeatProperties.DISTRIBUTION distribution)
          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)
 Map<IProfeatProperties.ATTRIBUTE,Map<IProfeatProperties.TRANSITION,Double>> getTransition(ProteinSequence sequence)
           
 Map<IProfeatProperties.TRANSITION,Double> getTransition(ProteinSequence sequence, IProfeatProperties.ATTRIBUTE attribute)
           
 double getTransition(ProteinSequence sequence, IProfeatProperties.ATTRIBUTE attribute, IProfeatProperties.TRANSITION transition)
          Returns the number of transition between the specified groups for the given attribute with respect to the length of sequence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProfeatPropertiesImpl

public ProfeatPropertiesImpl()
Method Detail

getComposition

public double getComposition(ProteinSequence sequence,
                             IProfeatProperties.ATTRIBUTE attribute,
                             IProfeatProperties.GROUPING group)
                      throws Exception
Description copied from interface: IProfeatProperties
Returns the composition of the specific grouping for the given attribute.

Specified by:
getComposition in interface IProfeatProperties
Parameters:
sequence - a protein sequence consisting of non-ambiguous characters only
attribute - one of the seven attributes (Hydrophobicity, Volume, Polarity, Polarizability, Charge, SecondaryStructure or SolventAccessibility)
group - the grouping to be computed
Returns:
returns the composition of the specific grouping for the given attribute
Throws:
Exception - throws Exception if attribute or group are unknown

getTransition

public double getTransition(ProteinSequence sequence,
                            IProfeatProperties.ATTRIBUTE attribute,
                            IProfeatProperties.TRANSITION transition)
                     throws Exception
Description copied from interface: IProfeatProperties
Returns the number of transition between the specified groups for the given attribute with respect to the length of sequence.

Specified by:
getTransition in interface IProfeatProperties
Parameters:
sequence - a protein sequence consisting of non-ambiguous characters only
attribute - one of the seven attributes (Hydrophobicity, Volume, Polarity, Polarizability, Charge, SecondaryStructure or SolventAccessibility)
transition - the interested transition between the groups
Returns:
returns the number of transition between the specified groups for the given attribute with respect to the length of sequence.
Throws:
Exception - throws Exception if attribute or group are unknown

getDistributionPosition

public double getDistributionPosition(ProteinSequence sequence,
                                      IProfeatProperties.ATTRIBUTE attribute,
                                      IProfeatProperties.GROUPING group,
                                      IProfeatProperties.DISTRIBUTION distribution)
                               throws Exception
Description copied from interface: IProfeatProperties
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)

Specified by:
getDistributionPosition in interface IProfeatProperties
Parameters:
sequence - a protein sequence consisting of non-ambiguous characters only
attribute - one of the seven attributes (Hydrophobicity, Volume, Polarity, Polarizability, Charge, SecondaryStructure or SolventAccessibility)
group - one the three groups for the attribute
distribution - the distribution of the grouping
Returns:
the position with respect to the length of sequence where the given distribution of the grouping can be found.
Throws:
Exception - throws Exception if attribute or group are unknown

getComposition

public Map<IProfeatProperties.GROUPING,Double> getComposition(ProteinSequence sequence,
                                                              IProfeatProperties.ATTRIBUTE attribute)
                                                       throws Exception
Specified by:
getComposition in interface IProfeatProperties
Throws:
Exception

getComposition

public Map<IProfeatProperties.ATTRIBUTE,Map<IProfeatProperties.GROUPING,Double>> getComposition(ProteinSequence sequence)
                                                                                         throws Exception
Specified by:
getComposition in interface IProfeatProperties
Throws:
Exception

getTransition

public Map<IProfeatProperties.TRANSITION,Double> getTransition(ProteinSequence sequence,
                                                               IProfeatProperties.ATTRIBUTE attribute)
                                                        throws Exception
Specified by:
getTransition in interface IProfeatProperties
Throws:
Exception

getTransition

public Map<IProfeatProperties.ATTRIBUTE,Map<IProfeatProperties.TRANSITION,Double>> getTransition(ProteinSequence sequence)
                                                                                          throws Exception
Specified by:
getTransition in interface IProfeatProperties
Throws:
Exception

getDistributionPosition

public Map<IProfeatProperties.DISTRIBUTION,Double> getDistributionPosition(ProteinSequence sequence,
                                                                           IProfeatProperties.ATTRIBUTE attribute,
                                                                           IProfeatProperties.GROUPING group)
                                                                    throws Exception
Specified by:
getDistributionPosition in interface IProfeatProperties
Throws:
Exception

getDistributionPosition

public Map<IProfeatProperties.GROUPING,Map<IProfeatProperties.DISTRIBUTION,Double>> getDistributionPosition(ProteinSequence sequence,
                                                                                                            IProfeatProperties.ATTRIBUTE attribute)
                                                                                                     throws Exception
Specified by:
getDistributionPosition in interface IProfeatProperties
Throws:
Exception

getDistributionPosition

public Map<IProfeatProperties.ATTRIBUTE,Map<IProfeatProperties.GROUPING,Map<IProfeatProperties.DISTRIBUTION,Double>>> getDistributionPosition(ProteinSequence sequence)
                                                                                                                                       throws Exception
Specified by:
getDistributionPosition in interface IProfeatProperties
Throws:
Exception