'STRAP:multiple sequence alignments '

charite.christo.protein
Class ProteinNT

java.lang.Object
  extended by charite.christo.protein.Protein
      extended by charite.christo.protein.ProteinNT
All Implemented Interfaces:
DialogStringMatch.Interface, ChRunnable, HasClientProperty, HasName, HasProtein, ActionListener, Comparator, EventListener
Direct Known Subclasses:
StrapProtein

public class ProteinNT
extends Protein
implements ChRunnable

This protein model extends JAVADOC:Protein. It has the additional feature that it can be defined from a nucleotide sequence which is translated into amino acid sequence. The class ProteinNT does not depend on classes of STRAP which reside in the folder charite/christo/strap/. STRAP extends ProteinNT by the class JAVADOC:charite.christo.strap.StrapProtein.


Field Summary
static boolean AMINO_ACIDS
           
static String FORWARD
           
static String FORWARD_COMPLEMENT
           
static boolean NUCLEOTIDES
           
static String[] ORIENTATIONS
           
static String REVERSE
           
static String REVERSE_COMPLEMENT
           
 
Fields inherited from class charite.christo.protein.Protein
CDS_GENE, CDS_NOTE, CDS_PRODUCT, CDS_PROTEIN, CDS_XREFS, clientObjects_, FILE_MASKS, mANNO, mDNA, mGAPS, mICON, MODI_COUNTS, MODI_COUNTS_ALIGNMENT, mTIPS, mTRANS, PARSING_INFO, vProteinViewers, vResidueSelection, WEAK_REF
 
Fields inherited from interface charite.christo.interfaces.ChRunnable
APPEND, DOWNLOAD_FINISHED, INTERPRET_LINE, SET_ICON_IMAGE
 
Constructor Summary
ProteinNT()
           
 
Method Summary
 int aminoAcidIndex2nucleotideIndex(int i)
          Maps amino acid indices upon nucleotide indices See JAVADOC:ProteinNT#nucleotideIndex2aminoAcidIndex(int)
 void applyCDS_expression(String s)
          join(7940..7996,8095..8174,8287..8368,8506..8686, complement(join(1787209..1787388,1787427....
 boolean[] areNucleotidesCurrentStrandTranslated()
          True means a nucleotide is part of an triplet (exons).
 boolean cdsExpressionApplied()
           
 int countCodingNucleotides()
           
 int countNucleotides()
          Number of nucleotides or 0;
 byte getNucleotide(int i)
          Get the nucleotide of index i or -1;
 byte getNucleotideCurrentStrand(int i)
           
 byte[] getNucleotides()
          All nucleotides (with introns) including the non-translated (introns) ones
 String getNucleotidesAsString()
          This method is slow the first time after a change.
 String getNucleotidesAsStringUC()
          This method is slow the first time after a change.
 byte[] getNucleotidesCurrentStrand()
          The nucleotides after applying the necessary reverse and complement operations.
 String getNucleotidesCurrentStrandAsString()
           
 byte[] getNucleotidesCurrentStrandExactLength()
           
 String getNucleotidesReverseComplementAsStringUC()
           
 byte[] getResidueTriplet(int iAa, byte[] buffer)
          The triplet at amino acid position iAs
 byte[] getResidueTypeFullLength()
           
 boolean isComplement()
          Complement for the translation of nucleotides.
 boolean isNucleotideCurrentStrandTranslated(int i)
          True means a nucleotide is part of an triplet (exons).
 boolean isReverse()
          Direction translation of nucleotides.
 int nucleotideIdx2translatedNucleotideIdx(int idx)
          Given is the index of a nucleotide.
 int nucleotideIndex2aminoAcidIndex(int i)
          Maps nucleotide indices upon amino acid indices See JAVADOC:ProteinNT#aminoAcidIndex2nucleotideIndex(int)
 int[] nucleotideIndices2translatedNucleotideIndices()
          An array mapping nucleotide indices.
 boolean[] nucleotideSelection2aminoAcidSelection(boolean[] selNts, int offset)
           
 boolean parseFrameShift(byte[] z, int l)
           
 Object run(String id, Object arg)
           
 void setNucleotideCurrentStrandTranslated(int iNt, boolean isTranslated)
          the transformed nucleotide of index i is translated or not depending on b
 void setNucleotides(byte[] rawNtSequence, String orientation)
          Sets the sequence of nucleotides.
 void setNucleotides(String nts, String orientation)
          See JAVADOC:ProteinNT#setNucleotides(byte[],ProteinNT$Orientation)
 void setNucleotidesCurrentStrandTranslated(boolean[] bb)
          Determines which nucleotide needs to be translated (coding sequence).
 void setTranslatedStrand(String orientation)
          Set the way nucleotides are translated
 int translatedNucleotideIndex2nucleotideIndex(int idx)
          computes the nucleotide index from the translated idx.
 int[] translatedNucleotideIndices2nucleotideIndices()
          An array mapping nucleotide indices.
 
Methods inherited from class charite.christo.protein.Protein
actionPerformed, addCDS, addDatabaseRef, addHeteroCompounds, addHeteroCompoundsUniq, addProteinViewer, addResidueSelection, addSequenceRef, addThreeLetterCode, atomNumber2residueIdx, column2index, commonPdbId, comparator_aminoacidSequenceAlphabetically, compare, containsHeteroCompound, containsOnlyACTGNX, countAtoms, countResidues, countResiduesInChain, cursorPosAsString, equalsResidueType, fileAllChains, geneProductProteinNoteForCDS, getAccessionID, getAlignment, getAllResidueSelections, getAssertEDT, getAtomBFactor, getAtomCoordinates_modificationCount, getAtomCoordinates, getAtomCoordinates, getAtomName32, getAtomName32, getAtomNumber, getAtomOccupancy, getAtomType, getBioMatrices, getCalphaIndexToResidueIndex, getCDS, getChainFirstResidueIdx, getChainLastResidueIdx, getChainsAsString, getCharacters, getClientProperty, getClientPropertyMapAsString, getCompound, getDatabaseRefs, getDnaAndRnaAndHeteros, getDnaAndRnaStructures, getEC, getFile, getFileAsString, getFileHasSidechainAtoms, getFileLastModified, getFileMayBeWithSideChains, getFileName, getFileNameHC, getFilePath, getFileWithAllChains, getFirstResidueIndex, getGappedSequence_modificationCount, getHaystacksForStringSearch, getHeader, getHeteroCompounds, getIconImage, getInferred3dCountMatches, getInferredPdbID, getInfo, getLastResidueIndex, getMouseOverSelection, getName, getName0, getNameHC, getNucleotides_modificationCount, getOnlyChains, getOrganism, getOrganismScientific, getParsingTime, getPdbID, getPdbRef, getPdbTextSecStru, getProtein, getProteinParserClass, getProteinViewer, getProteinViewers, getResidueAnglePsi, getResidueAtomNumber, getResidueAtomNumber, getResidueCalpha, getResidueCalpha, getResidueCalpha, getResidueChain, getResidueChain, getResidueFirstAtomIdx, getResidueFirstAtomIdx, getResidueInsertionCode, getResidueInsertionCode, getResidueLastAtomIdx, getResidueLastAtomIdx, getResidueName32, getResidueName32, getResidueNumber, getResidueNumber, getResidueSecStrType, getResidueSecStrType, getResidueSelections_modificationCount, getResidueSelections, getResidueSelectionsAt, getResidueSolventAccessibility, getResidueSubsetAsBooleanArray, getResidueType_modificationCount, getResidueType, getResidueType, getResidueType, getResidueTypeAsString, getResidueTypeAsStringUC, getResidueTypeExactLength, getResidueTypeHashCode, getResolutionAnstroms, getRotationAndTranslation, getSequenceRefs, getTitle, getUniprotID, getURL, hasCalpha, hashTMalign, inferCoordinates, isInMsfFile, isLoadedFromStructureFile, isWaterInFile, loadSideChainAtoms, mouseOver, paintChain, pdbNumberToIdx, putClientProperty, removeAllSequenceRefs, removeHeteroCompound, removeProteinViewer, removeResidueSelection, removeSequenceRef, residueNumberAndChain2residueIdx, residueSubsetAsBooleanArray, residueSubsetAsBooleanArray, selectedPositionsToText, setAccessionID, setAssertEDT, setAtomBFactor, setAtomCoordOriginal, setAtomNumber, setAtomOccupancy, setAtomType, setAtomType32bit, setBioMatrices, setCharSequence, setCompound, setEC, setFile, setFileHasSidechainAtoms, setFileLastModified, setFileWithAllChains, setFileWithSideChains, setFileWithSideChainsObtainableFromPDB, setFirstResidueIndex, setHeader, setIsInMsfFile, setIsLoadedFromStructureFile, setName, setOnlyChains, setOrganism, setOrganismScientific, setParsingTime, setPdbID, setPdbTextSecStru, setProteinParserClass, setResidueAnglePhi, setResidueAnglePsi, setResidueAtomNumber, setResidueCalphaOriginal, setResidueChain, setResidueFirstAndLastAtomIdx, setResidueInsertionCode, setResidueNumber, setResidueSecStrType, setResidueSolventAccessibility, setResidueSubset, setResidueType, setResidueType, setResidueType32bit, setResidueTypeToUpperOrLower, setResolutionAnstroms, setRotationAndTranslation, setTitle, setUniprotID, setURL, strapFile, toOneLetterCode, toOneLetterCode, toString, toThreeLetterCode
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

AMINO_ACIDS

public static final boolean AMINO_ACIDS
See Also:
Constant Field Values

NUCLEOTIDES

public static final boolean NUCLEOTIDES
See Also:
Constant Field Values

FORWARD

public static final String FORWARD
See Also:
Constant Field Values

REVERSE

public static final String REVERSE
See Also:
Constant Field Values

FORWARD_COMPLEMENT

public static final String FORWARD_COMPLEMENT
See Also:
Constant Field Values

REVERSE_COMPLEMENT

public static final String REVERSE_COMPLEMENT
See Also:
Constant Field Values

ORIENTATIONS

public static final String[] ORIENTATIONS
Constructor Detail

ProteinNT

public ProteinNT()
Method Detail

parseFrameShift

public boolean parseFrameShift(byte[] z,
                               int l)

isReverse

public final boolean isReverse()
Direction translation of nucleotides.


isComplement

public final boolean isComplement()
Complement for the translation of nucleotides.


setTranslatedStrand

public final void setTranslatedStrand(String orientation)
Set the way nucleotides are translated


getNucleotides

public final byte[] getNucleotides()
All nucleotides (with introns) including the non-translated (introns) ones

Returns:
a byte array of nucleotides or null

getNucleotidesCurrentStrand

public final byte[] getNucleotidesCurrentStrand()
The nucleotides after applying the necessary reverse and complement operations. The string is 0-terminated.


getNucleotidesCurrentStrandExactLength

public final byte[] getNucleotidesCurrentStrandExactLength()

getNucleotidesAsString

public String getNucleotidesAsString()
This method is slow the first time after a change. Then the cached result is returned.


getNucleotidesAsStringUC

public String getNucleotidesAsStringUC()
This method is slow the first time after a change. Then the cached result is returned.


getNucleotidesReverseComplementAsStringUC

public String getNucleotidesReverseComplementAsStringUC()

getNucleotidesCurrentStrandAsString

public String getNucleotidesCurrentStrandAsString()

getNucleotideCurrentStrand

public final byte getNucleotideCurrentStrand(int i)

getNucleotide

public final byte getNucleotide(int i)
Get the nucleotide of index i or -1;


countNucleotides

public final int countNucleotides()
Number of nucleotides or 0;


setNucleotides

public final void setNucleotides(byte[] rawNtSequence,
                                 String orientation)
Sets the sequence of nucleotides. e.g. "CAGTTGTACTG".getBytes()


setNucleotides

public final void setNucleotides(String nts,
                                 String orientation)
See JAVADOC:ProteinNT#setNucleotides(byte[],ProteinNT$Orientation)


setNucleotidesCurrentStrandTranslated

public final void setNucleotidesCurrentStrandTranslated(boolean[] bb)
Determines which nucleotide needs to be translated (coding sequence). True for exon and false for intron or UTR.


setNucleotideCurrentStrandTranslated

public final void setNucleotideCurrentStrandTranslated(int iNt,
                                                       boolean isTranslated)
the transformed nucleotide of index i is translated or not depending on b


areNucleotidesCurrentStrandTranslated

public final boolean[] areNucleotidesCurrentStrandTranslated()
True means a nucleotide is part of an triplet (exons). False means the nucleotide is not translated (intron,UTR)


isNucleotideCurrentStrandTranslated

public final boolean isNucleotideCurrentStrandTranslated(int i)
True means a nucleotide is part of an triplet (exons). False means the nucleotide is not translated (intron,UTR)


countCodingNucleotides

public final int countCodingNucleotides()

getResidueTypeFullLength

public final byte[] getResidueTypeFullLength()

nucleotideIndices2translatedNucleotideIndices

public final int[] nucleotideIndices2translatedNucleotideIndices()
An array mapping nucleotide indices. E.g. the 100th translated nucleotide may be found at position 200 of the original nucleotide array if there is an untranslated region of 100 nucleotides. JAVADOC:ProteinNT#translatedNucleotideIndices2nucleotideIndices()


nucleotideIdx2translatedNucleotideIdx

public final int nucleotideIdx2translatedNucleotideIdx(int idx)
Given is the index of a nucleotide.

Returns:
the index of translated nucleotides, where introns and UTRs are not counted.

translatedNucleotideIndices2nucleotideIndices

public final int[] translatedNucleotideIndices2nucleotideIndices()
An array mapping nucleotide indices. E.g. the 100th translated nucleotide may be found at position 200 of the original nucleotide array if there is an untranslated region of 100 nucleotides. See JAVADOC:ProteinNT#nucleotideIndices2translatedNucleotideIndices()


translatedNucleotideIndex2nucleotideIndex

public final int translatedNucleotideIndex2nucleotideIndex(int idx)
computes the nucleotide index from the translated idx. Translated are exons but not introns and UTRs


aminoAcidIndex2nucleotideIndex

public final int aminoAcidIndex2nucleotideIndex(int i)
Maps amino acid indices upon nucleotide indices See JAVADOC:ProteinNT#nucleotideIndex2aminoAcidIndex(int)


nucleotideIndex2aminoAcidIndex

public final int nucleotideIndex2aminoAcidIndex(int i)
Maps nucleotide indices upon amino acid indices See JAVADOC:ProteinNT#aminoAcidIndex2nucleotideIndex(int)


getResidueTriplet

public final byte[] getResidueTriplet(int iAa,
                                      byte[] buffer)
The triplet at amino acid position iAs

Parameters:
iAa - the index of the amino acid
buffer - a buffer of 3 bytes

nucleotideSelection2aminoAcidSelection

public final boolean[] nucleotideSelection2aminoAcidSelection(boolean[] selNts,
                                                              int offset)

applyCDS_expression

public void applyCDS_expression(String s)
join(7940..7996,8095..8174,8287..8368,8506..8686, complement(join(1787209..1787388,1787427.... join(complement(2261..2639),complement(881..1620))


cdsExpressionApplied

public boolean cdsExpressionApplied()

run

public Object run(String id,
                  Object arg)
Specified by:
run in interface ChRunnable

'STRAP:multiple sequence alignments '

'The most important classes are StrapAlign, StrapProtein and StrapEvent.'