net.sourceforge.cilib.bioinf.rnaprediction
Class NucleotidePair

java.lang.Object
  extended by net.sourceforge.cilib.bioinf.rnaprediction.NucleotidePair
All Implemented Interfaces:
Comparable<NucleotidePair>

public class NucleotidePair
extends Object
implements Comparable<NucleotidePair>

Author:
mneethling This class represents a binding between 2 nucleotides. It contains the base pair symbols and index into nucleotide string (starting from 1) for each.

Constructor Summary
NucleotidePair(int index5prime, char base5prime, int index3prime, char base3prime)
           
NucleotidePair(int index5prime, int index3prime)
           
 
Method Summary
 int compareTo(NucleotidePair o)
          
 boolean containedInside(NucleotidePair other)
          Returns true if this pair is 'inside' or 'internal' pair of other pair.
 boolean contains(NucleotidePair other)
          Returns true if other pair is 'inside' or 'internal' to this pair.
 boolean equals(Object obj)
          
 char get3primeBase()
           
 int get3primeIndex()
           
 char get5primeBase()
           
 int get5primeIndex()
           
 int hashCode()
          
 boolean isPseudoknot(NucleotidePair other)
          Returns true if the base pairs form a pseudoknot formation.
 boolean shareBase(NucleotidePair other)
          Returns true if the pairs contains the same base.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NucleotidePair

public NucleotidePair(int index5prime,
                      char base5prime,
                      int index3prime,
                      char base3prime)

NucleotidePair

public NucleotidePair(int index5prime,
                      int index3prime)
Method Detail

hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

toString

public String toString()

Overrides:
toString in class Object

compareTo

public int compareTo(NucleotidePair o)

Specified by:
compareTo in interface Comparable<NucleotidePair>

get5primeIndex

public int get5primeIndex()

get3primeIndex

public int get3primeIndex()

get5primeBase

public char get5primeBase()

get3primeBase

public char get3primeBase()

shareBase

public boolean shareBase(NucleotidePair other)
Returns true if the pairs contains the same base.

Parameters:
other -
Returns:

containedInside

public boolean containedInside(NucleotidePair other)
Returns true if this pair is 'inside' or 'internal' pair of other pair. ie i` < i < j < j` where i,j is this pair and i`,j` is other pair

Parameters:
other -
Returns:

contains

public boolean contains(NucleotidePair other)
Returns true if other pair is 'inside' or 'internal' to this pair. ie i < i` < j` < j where i,j is this pair and i`,j` is other pair

Parameters:
other -
Returns:

isPseudoknot

public boolean isPseudoknot(NucleotidePair other)
Returns true if the base pairs form a pseudoknot formation. Returns false if i < j < i` < j` or i` < j` < i < j

Parameters:
other -
Returns:


Copyright © 2009 CIRG. All Rights Reserved.