uk.ac.sanger.cgp.standalonecsa.beans
Class CdsBean

java.lang.Object
  extended by uk.ac.sanger.cgp.standalonecsa.beans.CdsBean
All Implemented Interfaces:
java.io.Serializable

public class CdsBean
extends java.lang.Object
implements java.io.Serializable

A CdsBean holds information regarding the name, dna sequence, protein sequence and coding orientation of the CDS.

Author:
Original: kr2, $Author: kr2 $
See Also:
Serialized Form

Constructor Summary
CdsBean(java.lang.String name, java.lang.String seq)
          Creates a new instance of CdsBean from it's name and DNA sequence.
 
Method Summary
 java.lang.String getCdsSeq()
          Gets the unformatted CDS DNA sequence.
 java.lang.String getCdsSeq(int lineSize)
          Gets the CDS DNA sequence formatted to the width provided.
 java.lang.String getName()
          Get the name of this CDS.
 java.lang.String getProteinSeq()
          Get the unformatted protein sequence of the provided CDS.
 java.lang.String getProteinSeq(int lineSize)
          Get the protein sequence of the provided CDS formatted to the specified width in characters.
 boolean isSenseTranslated()
          Indicates that the CDS DNA sequence translated best in the provided orientation.
 void setCdsSeq(java.lang.String cdsSeq)
          Set the CDS DNA sequence to the provided string.
 void setProteinSeq(java.lang.String proteinSeq)
          Set the protein sequence to the provided string.
 void setSenseTranslated(boolean senseTranslated)
          Sets the senseTranslated boolean to the provided value.
 java.lang.String toString()
          String representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CdsBean

public CdsBean(java.lang.String name,
               java.lang.String seq)
Creates a new instance of CdsBean from it's name and DNA sequence.

Parameters:
name - the name of this CDS
seq - the DNA sequence for this CDS
Method Detail

getName

public java.lang.String getName()
Get the name of this CDS.

Returns:
the name of the CDS

getCdsSeq

public java.lang.String getCdsSeq(int lineSize)
Gets the CDS DNA sequence formatted to the width provided.

Parameters:
lineSize - number of characters per line
Returns:
formatted CDS DNA sequence

getCdsSeq

public java.lang.String getCdsSeq()
Gets the unformatted CDS DNA sequence.

Returns:
the unformatted CDS DNA sequence

isSenseTranslated

public boolean isSenseTranslated()
Indicates that the CDS DNA sequence translated best in the provided orientation.

Returns:
true when reverse complimenting was not required to translate the CDS DNA sequence

setSenseTranslated

public void setSenseTranslated(boolean senseTranslated)
Sets the senseTranslated boolean to the provided value.

Parameters:
senseTranslated - boolean

getProteinSeq

public java.lang.String getProteinSeq(int lineSize)
Get the protein sequence of the provided CDS formatted to the specified width in characters.

Parameters:
lineSize - number of characters per line
Returns:
formatted protein sequence

getProteinSeq

public java.lang.String getProteinSeq()
Get the unformatted protein sequence of the provided CDS.

Returns:
the unformatted protein sequence

setProteinSeq

public void setProteinSeq(java.lang.String proteinSeq)
Set the protein sequence to the provided string.

Parameters:
proteinSeq - protein sequence to be set

setCdsSeq

public void setCdsSeq(java.lang.String cdsSeq)
Set the CDS DNA sequence to the provided string.

Parameters:
cdsSeq - the CDS DNA sequence

toString

public java.lang.String toString()
String representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
string representation of this object.