'STRAP:multiple sequence alignments '

charite.christo.protein
Class Protein

java.lang.Object
  extended by charite.christo.protein.Protein
All Implemented Interfaces:
ChRunnable, Colored, HasImage, HasName, HasPropertyMap, HasRenderer, HasRendererModiCount, HasWeakRef, HasProtein, java.awt.event.ActionListener, java.util.EventListener

public class Protein
extends java.lang.Object
implements HasPropertyMap, HasProtein, java.awt.event.ActionListener, HasName, HasWeakRef, Colored, ChRunnable, HasRendererModiCount, HasImage

PACKAGE:charite.christo.strap. The class Protein provides a protein model with amino acid sequences and coordinates for c-alpha atoms.

Here are some frequently used get-methods:


Field Summary
 int _mapRefSeqMC
           
 UniqueList<ProteinViewer> _vProteinViewers
           
static boolean AMINO_ACIDS
           
static int B_INTO_SAME_LINE
           
static int B_PROCESSED
           
static int B_REGISTERD
           
static int CDS_GENE
           
static int CDS_NOTE
           
static int CDS_PRODUCT
           
static int CDS_PROTEIN
           
static int CDS_TRANSCRIPT_ID
           
static int CDS_TRANSLATION
           
static int CDS_XREFS
           
static int COMPLEMENT
           
static int FILE_TYPE_MAX
           
static int FORWARD
           
static long HETERO_ADD_APPLY_INVERSE_MX
           
static long HETERO_ADD_UNIQUE
           
static java.lang.Object KEY_BA_PARSE
           
static int m1stIdx
           
static int mANNO
           
static int mANNOsf
           
 java.util.Map<java.lang.String,ReferenceSequence> mapReferenceSequence
           
static int mASSOCPDB
           
static int MAX_CACHE
           
static int mDNA
           
static int mGAPS
           
static int mICON
           
static int[] MODI_COUNTS_ALL
           
static int mTIPS
           
static int mTRANS
           
static int NO_TRANSLATE
           
static Protein[] NONE
           
static boolean NUCLEOTIDES
           
static int O_WEB_TOK
           
static int O_WEB_TOK1
           
static int O_WEB_TOKENS
           
 java.lang.Object[] OBJECTS
           
static long PAINT_CHAIN_UNDERLINE
           
 BA PARSING_INFO
           
static int POS_CLICKED_3D
           
static int POS_PRINT_COLUMN
           
static int REVERSE
           
static int REVERSE_COMPLEMENT
           
static java.lang.String[] TRANSLATIONS_AS_STRING
           
 java.lang.Object WEAK_REF
           
 
Fields inherited from interface charite.christo.ChRunnable
APPEND, COLUMN_TITLE, DOWNLOAD_FINISHED, GET_PANEL, ICON, INTERPRET_LINE, IS_DRAG4XY, ITEM_TEXT, MODIFY_RENDERER_COMPONENT, PROGRESS, REPAINT_CURSOR, SAY_DOWNLOADING, SET_ICON_IMAGE, SET_TREE_VALUE, SHOW_IN_FRAME, TAB_TEXT, TIP_TEXT
 
Fields inherited from interface charite.christo.HasRenderer
JLIST, STRIKE_THROUGH
 
Constructor Summary
Protein()
           
Protein(ProteinAlignment a)
           
 
Method Summary
 boolean _isTransient()
           
 void actionPerformed(java.awt.event.ActionEvent ev)
           
 void addCDS(java.lang.String cds, java.lang.String[] geneProductProteinidNote)
           
 void addDatabaseRef(java.lang.String s)
           
 boolean addHeteroCompounds(long options, HeteroCompound... hh)
           
 void addInvalidFeatureLine(java.lang.CharSequence s)
           
 void addProteinViewer(ProteinViewer v)
           
 int addResidueGap(int iA, int gap)
           
 boolean addResidueSelection(ResidueSelection s)
          Add a selection of residues
 void addSequenceRef(java.lang.String s0)
           
static void addThreeLetterCode(java.lang.String s, char ch)
           
 int atomNumber2residueIdx(int pdbAtomNum)
          Given a pdb Number (2nd column in pdb files) What is the residue index ?
 boolean cdsExpressionApplied()
           
<P extends Protein>
P
cloneProtein(P pNew)
           
 int[] coding2allPositions()
          An array mapping nucleotide indices.
 int column2indexZ(int col)
          Get index of residue at the horizontal alignment position col.
 int column2nextIndexZ(int h)
          Get index of residue at the horizontal alignment position h or the next index if h points to a gap.
 int column2thisOrPreviousIndex(int col)
          Get index of residue at the horizontal alignment position col.
 int[] columns2indices()
          Get indeces of residues at horizontal alignment positions col.
 int[] columns2nextIndices()
          An array to map horizontal residue positions to residue indices.
static java.lang.String commonPdbId(Protein[] pp)
           
 java.awt.Rectangle computeLabelSize(java.awt.Font f, java.awt.Rectangle charBounds, java.lang.String name, java.awt.Rectangle rect)
           
 boolean containsHeteroCompound(HeteroCompound h)
           
 boolean containsInvalidFeatureLine(java.lang.CharSequence s)
           
 boolean containsOnlyACTGNX()
           
 int countAtoms()
          number of atoms in the model.
 int countCalpha()
          Are calpha-coordinates known ?
 int countNucleotides()
           
 int countResidues()
          number of residues, returns getResidueType().length
 short countResiduesInChain(byte chain)
           
static void debugMC(Protein[] pp)
           
 void detach3DStructure()
           
static boolean equalsResidueType(Protein p1, Protein p2)
           
 void expandTreeNode(java.lang.Class c)
           
static java.io.File fileAllChains(java.io.File f0)
           
 void findIconImage()
           
static int firstResIdx(Protein p)
           
 boolean[] fromFullLengthB(boolean[] sel)
           
 java.lang.String[] geneProductProteinNoteForCDS(java.lang.String cds)
           
 java.lang.String getAccessionID()
           
 ProteinAlignment getAlignment()
          Get The alignment object.
 ResidueSelection[] getAllResidueSelections()
           
 float[] getAtomBFactor()
           
 float[] getAtomCoordinates()
          Transformed Coordinates of all atoms order [x1,y1,z1,x2,y2,z2,x3,...].
 float[] getAtomCoordinates(Matrix3D m3d)
           
 int[] getAtomName32()
          Names (4 characters) of atoms, as recorded in the 3rd column of PDB files.
 int getAtomName32(int iAtom)
           
 int[] getAtomNumber()
          The atom number is recorded in the 2nd column of pdb files
 float[] getAtomOccupancy()
           
 byte[] getAtomType()
           
 Matrix3D[] getBioMatrices()
           
 java.lang.String[] getCDS()
           
 int getChainFirstResidueIdx(char chain)
          Indices of the residues each chain starts with.
 int getChainLastResidueIdx(char chain)
          see JAVADOC:Protein#getChainFirstResidueIdx(char)
 java.lang.String getChainsAsString()
           
 byte[] getCharacters()
          The original character sequence which can be aminos or nucleotides.
 java.lang.Object getClientProperty(java.lang.Object o)
          See equivalent method in JComponent.
 int getCodingStrand()
           
 java.awt.Color getColor()
           
 java.lang.String getCompound()
           
 java.lang.String[] getDatabaseRefs()
           
 HeteroCompound[] getDnaAndRnaAndHeteros()
           
 HeteroCompound[] getDnaAndRnaStructures()
           
 java.lang.String[] getEC()
           
 java.io.File getFile()
           
 boolean getFileHasSidechainAtoms()
           
 java.io.File getFileMayBeWithSideChains()
           
 java.lang.String getFileName()
           
 int getFileNameHC()
           
 java.lang.String getFilePath()
           
 java.io.File getFileWithAllChains()
           
 int[] getFirstAndLastResidueIndex()
           
 byte[] getGappedSecStru()
           
 byte[] getGappedSequence()
          The amino acid sequence with gaps (0x20).
 java.lang.String getGappedSequenceAsString()
          The amino acid sequence.
 java.lang.String getGappedSequenceAsStringUC()
          The amino acid sequence.
 byte[] getGappedSequenceExactLength()
          The amino acid sequence.
 float[] getGappedSolventAccessibility()
           
 java.lang.String getHeader()
           
 HeteroCompound[] getHeteroCompounds()
           
 javax.swing.ImageIcon getIcon()
           
 java.awt.Image getIconImage()
           
 java.lang.String getIconUrl()
           
 java.awt.Image getImage(java.awt.Component observer)
          Get the icon of the protein or null
 java.lang.String getImageId()
           
 int[] getInferred3dCountMatches()
           
 java.lang.String getInferredPdbID()
           
 java.lang.String getInfo(int iType)
           
 ChJTree getJTree()
           
 java.awt.Rectangle getLabelSize(java.awt.Font f, java.awt.Rectangle charBounds)
           
 int getMaxColumnZ()
          Get the horizontal position of the last residue..
static BasicResidueSelection getMouseOverSelection()
           
 java.lang.String getName()
          A protein should have a name, usually the file-name
 java.lang.String getName0()
           
 int getNameHC()
           
 java.lang.String getNameURLE()
           
 byte[] getNucleotides()
           
 java.lang.String getNucleotidesAsStringUC()
          This method is slow the first time after a change.
 byte[] getNucleotidesCodingStrand()
          The nucleotides after applying the necessary reverse and complement operations.
 java.lang.String getNucleotidesReverseComplementAsStringUC()
           
 java.lang.String getOnlyChains()
           
 java.lang.String getOrganism()
           
 java.lang.String getOrganismScientific()
           
 java.lang.String getOriginalName()
           
 long getParsingTime()
           
 java.lang.String getPdbID()
           
 java.lang.String getPdbRef()
           
 BA getPdbTextSecStru()
           
 int getPreferedOrder()
           
 java.util.Map getPropertyMap(boolean create)
           
 Protein getProtein()
          returns itself.
 java.lang.Class getProteinParserClass()
           
 Protein[] getProteinsSameComplex()
           
 ProteinViewer[] getProteinViewers()
           
 ReferenceSequence getReferenceSequence(java.lang.String otherId, BA log, boolean background, java.lang.Runnable runWhenFinished)
           
 java.lang.Object getRenderer(long options, long[] rendOptions)
           
 long getRendererModiCount()
           
 java.lang.String getRendTxt()
           
 float[] getResidueAnglePsi()
           
 ResidueAnnotation[] getResidueAnnotations()
           
 ResidueAnnotation[] getResidueAnnotationsNF()
           
 ResidueAnnotation getResidueAnnotationWithName(java.lang.CharSequence name)
           
 int[] getResidueAtomNumber()
          Atom number of the first atom of the amino acid.
 int getResidueAtomNumber(int i)
          Atom number of i-th residue, as recorded in the PDB files or -1.
 int[] getResidueAtomNumberFullLength()
           
 float[] getResidueCalpha()
          Get transformed calpha-coordinates [Anstrom]
 float[] getResidueCalpha(Matrix3D m3d)
           
 float[] getResidueCalphaOriginalFullLength()
           
 byte[] getResidueChain()
          the chain denominators of each residue
 byte getResidueChain(int i)
          chain denominators of the i-th residue, usually capital letter
 byte[] getResidueChainFullLength()
           
 int[] getResidueColumn()
          Maps residue indices upon horizontal text positions of the alignment.
 int getResidueColumn(int i)
          Maps residue indices to horizontal text positions of the alignment.
 int getResidueColumnZ(int i)
           
 int[] getResidueFirstAtomIdx()
           
 int getResidueFirstAtomIdx(int resIdx)
          Indices of the atoms each residue starts with.
 int[] getResidueGap()
           
 int getResidueGap(int i)
           
 int getResidueIndexOffset()
           
 byte[] getResidueInsertionCode()
          ATOM 200 CA LEU A 27B 8.378 37.835 28.244 1.00 37.40 C ATOM 208 CA LEU A 27C 6.042 34.960 27.222 1.00 42.03 C ATOM 216 CA ASN A 27D 2.874 36.266 25.650 1.00 42.04 C ^ used in only a few PDB entries as e.g.
 byte getResidueInsertionCode(int i)
           
 byte[] getResidueInsertionCodeFullLength()
           
 int[] getResidueLastAtomIdx()
           
 int getResidueLastAtomIdx(int resIdx)
           
 int[] getResidueName32()
          Names (4 characters) of residues, as recorded in the 4th column of PDB files.
 int getResidueName32(int i)
           
 int[] getResidueNumber()
          Numbers of each residue, as recorded in the PDB files.
 int getResidueNumber(int i)
          Number of i-th residue, as recorded in the PDB files or -1.
 int[] getResidueNumberFullLength()
           
 byte[] getResidueSecStrType()
           
 byte getResidueSecStrType(int i)
          secondary structure (H,E,C) of i-th residue , H=helix, C=coil, E=Extended,Sheet
 byte[] getResidueSecStrTypeFullLenght()
          H=helix, C=coil, E=Extended,Sheet
 ResidueSelection[] getResidueSelections()
          The selections of residues excluding ResidueAnnotation-objects
 ResidueSelection[] getResidueSelectionsAt(long options, int iA_from, int iA_to, int where)
           
 ResidueSelection[] getResidueSelectionsWithName(java.lang.String[] names)
           
 float[] getResidueSolventAccessibility()
          Residue accessibility in square Anstroms, as taken from DSSP.
 boolean[] getResidueSubsetB()
           
 int getResidueSubsetB1()
          Index of the first true in getResidueSubsetB();
 byte[] getResidueTripletZ(int ia, byte[] buffer)
          The triplet at amino acid position
 byte[] getResidueType()
          The sequence in one letter format.
 byte getResidueType(int i)
           
static byte[][] getResidueType(Protein[] pp)
           
 java.lang.String getResidueTypeAsString()
          AA sequence as string
 java.lang.String getResidueTypeAsStringUC()
          AA sequence as upper case string
 byte[] getResidueTypeExactLength()
           
 byte[] getResidueTypeFullLength()
           
 int getResidueTypeHashCode()
           
 byte[] getResidueTypeLowerCaseMeansNo3dCoordinates()
           
 float getResolutionAnstroms()
           
 Matrix3D getRotationAndTranslation()
          Get the rotation - translation matrix.
 int getRow()
           
 byte[] getSelectedAminoacids()
          Returns an array telling what residues are selected by at least one residue selection.
 byte[] getSelectedNucleotides()
           
 ResidueAnnotation[] getSequenceFeatures()
           
 java.lang.String[] getSequenceRefs()
           
 java.lang.String getTitle()
           
 java.lang.String getUniprotID()
           
 java.net.URL getURL()
           
 ValueOfProtein getValueOfProtein()
           
 javax.swing.JComponent getVerticalRendererComponent()
           
 java.lang.Object getWeakRef()
           
 int getWebTokenIdx()
           
 long hashCodeCalpha()
           
 java.util.WeakHashMap<Protein,Superimpose3D.Result> hashTMalign()
           
 boolean hasPdbId(java.lang.String s)
           
 java.io.File iconLink()
           
static void incrementMC(int type, java.lang.Object proteins)
           
 float inferCoordinates(Protein[] pp3d, java.lang.Class classAligner, BA log)
           
 void inferGapsFromGappedSequence(byte[] seq)
          The original residue types are kept but the gaps are inferred from the gapped sequence seq.
 void inferredPDB_markMatches(boolean toLC, boolean selection)
           
 boolean[] isCoding()
          True means a nucleotide is part of an triplet (exons).
 boolean isInAlignment()
           
 boolean isInMsfFile()
           
 boolean isLoadedFromStructureFile()
           
 boolean isWaterInFile()
           
 void loadSideChainAtoms(BA ba)
           
 int mc(int type)
           
 int mcSum(int t1, int t2)
           
 int mcSum(int t1, int t2, int t3)
           
static void mouseOver(Protein p, int iAa0)
           
static Protein newInstance(java.io.File f)
          creates Protein from a protein file The file type may be PDB, SWISSPROT, EMBL, FASTA The method is not thread safe because it uses a static byte buffer for file data.
static Protein newInstance(long options, java.io.File proteinFile)
           
 boolean[] ntPositions2aa(boolean[] selNts, int offset, int[] returnMinIdx)
           
 void paintChain(long options, java.awt.Graphics g, java.lang.String T, int x0, int y, int w, int h)
           
 boolean parse(BA txt, ProteinParser[] parsers, long mode)
          Interpretes the text and extracts the protein data and sets the fields such as residueType in the protein.
 void parseCDS(java.lang.String s)
          join(7940..7996,8095..8174,8287..8368,8506..8686, complement(join(1787209..1787388,1787427....
 void parseFrameShift(byte[] z, int l)
           
 boolean parseGaps(byte[] z, int l)
          Reads a line such as X2XXX3X1XXXX2XXXXX The numbers are gaps and the letters residue positions
 java.lang.String pdbFileName(boolean[] res, long writerOptions)
           
 java.lang.CharSequence pdbNumberToIdx1(java.lang.CharSequence expression)
           
 BA posAsTextZ(int type, int ias)
           
 void putClientProperty(java.lang.Object key, java.lang.Object value)
          See equivalent method in JComponent.
 void removeAllSequenceRefs()
           
 boolean removeHeteroCompound(HeteroCompound h)
           
 void removeProteinViewer(ProteinViewer v)
           
 void removeResidueSelection(java.lang.Class c)
          Remove all selection of residues that are instances of c
 boolean removeResidueSelection(ResidueSelection s)
          Remove selection of residues
 void removeSequenceRef(java.lang.String s)
           
 void reportIconWidth(int w)
           
 boolean[] residueSubsetAsBool(java.lang.CharSequence expr, int[] returnMinIdx)
          Converts String denominating a subset of residues into a boolean array E.g.
 boolean[] residueSubsetAsBooleanZ(java.lang.CharSequence expr)
           
 int resNumAndChain2resIdxZ(boolean fullLength, int resNum, char chain, char insCode)
          Given a residue number and a chain denominator What is the residue index ?
 java.lang.Object run(java.lang.String id, java.lang.Object arg)
           
 void save(boolean isViewer, java.io.File dir, BA error)
           
 void selectCodingStrand(int orientation)
           
static java.lang.String selectedPositionsToText(boolean[] bb, int offset, Protein protein)
           
static java.lang.String selectedPositionsToText(boolean pdbNumbers, boolean[] bb, int offset, Protein protein)
           
static java.lang.String selectedPositionsToText(ResidueSelection s)
           
 void setAccessionID(java.lang.String s0)
           
 void setAlignment(ProteinAlignment a)
           
 void setAtomBFactor(float[] atomBFactor)
           
 void setAtomCoordOriginal(float[] ii)
           
 void setAtomNumber(int[] atomNumber)
          The atom number is recorded in the 2nd column of pdb files
 void setAtomOccupancy(float[] atomOccupancy)
           
 void setAtomType(byte[] at)
           
 void setAtomType32bit(int[] at)
           
 void setBalloonText(java.lang.String t)
           
 void setBioMatrices(Matrix3D[] mm)
           
 void setCharSequence(byte[] tt)
          The original character sequence which can be aminos or nucleotides.
 void setCoding(boolean[] bb)
          Determines which nucleotide needs to be translated (coding sequence).
 void setColor(java.awt.Color c)
           
 void setCompound(java.lang.String s)
           
 void setEC(java.lang.String... s)
           
 Protein setFile(java.io.File f)
           
 void setFileHasSidechainAtoms(boolean b)
           
 void setFileWithAllChains(java.io.File f)
           
 void setFileWithSideChains(java.io.File f)
           
 void setFileWithSideChainsObtainableFromPDB(boolean b)
           
 void setGappedSequence(byte[] seq, int len)
          set the gapped sequence
 void setGappedSequence(java.lang.CharSequence seq)
          See JAVADOC:Protein#setGappedSequence(byte[])
 void setHeader(java.lang.String s)
           
 void setIconImage(java.lang.String url)
           
 void setInfoAssociatedPdb(java.lang.String info)
           
 void setIsInAlignment(boolean b)
           
 void setIsInMsfFile(boolean b)
           
 void setIsLoadedFromStructureFile(boolean b)
           
 boolean setModiCount(int type, int value)
           
 Protein setName(java.lang.String n)
           
 void setNucleotides(java.lang.Object rawNtSequence, int orientation)
          Sets the sequence of nucleotides.
 void setOnlyChains(java.lang.String s)
           
 void setOrganism(java.lang.String s)
           
 void setOrganismScientific(java.lang.String s)
           
 void setOriginalName(java.lang.String s)
           
 void setParsingTime(long t)
           
 void setPdbID(java.lang.String s0)
           
 void setPdbTextSecStru(BA txt)
           
 void setPreferedOrder(int t)
           
 void setProteinParserClass(java.lang.Class p)
           
 void setProteinsSameComplex(Protein[] pp)
           
 void setResidueAnglePhi(float[] angle)
           
 void setResidueAnglePsi(float[] angle)
           
 void setResidueAtomNumber(int[] rai)
          set atom numbers of each residue, as recorded in the PDB files.
 void setResidueCalphaOriginal(float[] xyz)
          set the array of untransformed calpha-coordinates {x0,y0,z0, x1,y1,z1, x2,y2,z2 ...}
 void setResidueChain(byte[] bb)
           
 void setResidueFirstAndLastAtomIdx(int[] first, int[] last)
           
 void setResidueGap(int[] rg)
           
 void setResidueGap(int iA, int gap)
           
 void setResidueIndexOffset(int first)
           
 void setResidueInsertionCode(byte[] ic)
           
 void setResidueNumber(int[] rn)
          set Numbers of each residue, as recorded in the PDB files.
 void setResidueSecStrType(byte[] a)
          Secondary structure (H,E,C)
 void setResidueSolventAccessibility(float[] a)
          Set accessibilities of residues
 void setResidueSubset(boolean[] b)
           
 void setResidueSubset(java.lang.String expression)
          residueSubset("10-20,40-50") will return a new protein instance with residues from 10-20 and 40-50 In PDB-files the pdb-residue-number can be referred to: 10:-20:, 40:-50: One can add a chain identifier like 10:A-20:A, 40:A-50:A Note: counting of residues starts here at 1 and not 0 !!
 void setResidueType(java.lang.Object seq)
          set the array of amino acids
 void setResidueType32bit(int[] rn)
          set Names of each residue, as recorded in the PDB files.
 void setResolutionAnstroms(float r)
           
 void setRotationAndTranslation(Matrix3D m3d)
          see JAVADOC:Protein#getRotationAndTranslation()
 void setRow(int i)
           
 void setTitle(java.lang.String s)
           
 void setTransient(boolean b)
          Non-transient proteins are not saved
 void setUniprotID(java.lang.String s0)
           
 void setURL(java.net.URL u)
           
 void setValueOfProtein(ValueOfProtein v)
           
static java.io.File strapFile(int t, java.lang.Object protein)
           
static java.io.File strapFile(int t, java.lang.Object protein, java.io.File dir)
           
 int sumUpGaps(int ias)
           
 java.lang.Thread thread_parseCDS(java.lang.String s)
           
 int[] toCodingPositions()
          An array mapping nucleotide indices.
 boolean[] toFullLengthB(boolean[] sel)
           
static byte toOneLetterCode(int name32)
          Equivalent to toOneLetterCode(n&255,(n>>>8)&255, (n>>>16)&255);
static byte toOneLetterCode(int c0, int c1, int c2)
          Conversion from three-letter- to one-letter-code.
 java.lang.String toString()
           
static java.lang.String toThreeLetterCode(int i)
          F ==> PHE
static java.lang.String urlCd(boolean encode, java.lang.CharSequence text, int from)
           
 int wideColumn2nextIndex(int column)
           
 java.io.File writePdbFile(boolean[] res, long writerOptions)
           
 java.io.File writePdbFile(long writerOptions)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CDS_GENE

public static final int CDS_GENE
See Also:
Constant Field Values

CDS_PRODUCT

public static final int CDS_PRODUCT
See Also:
Constant Field Values

CDS_PROTEIN

public static final int CDS_PROTEIN
See Also:
Constant Field Values

CDS_NOTE

public static final int CDS_NOTE
See Also:
Constant Field Values

CDS_XREFS

public static final int CDS_XREFS
See Also:
Constant Field Values

CDS_TRANSCRIPT_ID

public static final int CDS_TRANSCRIPT_ID
See Also:
Constant Field Values

CDS_TRANSLATION

public static final int CDS_TRANSLATION
See Also:
Constant Field Values

HETERO_ADD_UNIQUE

public static final long HETERO_ADD_UNIQUE
See Also:
Constant Field Values

HETERO_ADD_APPLY_INVERSE_MX

public static final long HETERO_ADD_APPLY_INVERSE_MX
See Also:
Constant Field Values

m1stIdx

public static final int m1stIdx
See Also:
Constant Field Values

mANNO

public static final int mANNO
See Also:
Constant Field Values

mANNOsf

public static final int mANNOsf
See Also:
Constant Field Values

mASSOCPDB

public static final int mASSOCPDB
See Also:
Constant Field Values

mDNA

public static final int mDNA
See Also:
Constant Field Values

mGAPS

public static final int mGAPS
See Also:
Constant Field Values

mICON

public static final int mICON
See Also:
Constant Field Values

mTIPS

public static final int mTIPS
See Also:
Constant Field Values

mTRANS

public static final int mTRANS
See Also:
Constant Field Values

FILE_TYPE_MAX

public static final int FILE_TYPE_MAX
See Also:
Constant Field Values

_vProteinViewers

public final UniqueList<ProteinViewer> _vProteinViewers

WEAK_REF

public final java.lang.Object WEAK_REF

POS_CLICKED_3D

public static final int POS_CLICKED_3D
See Also:
Constant Field Values

POS_PRINT_COLUMN

public static final int POS_PRINT_COLUMN
See Also:
Constant Field Values

PARSING_INFO

public final BA PARSING_INFO

PAINT_CHAIN_UNDERLINE

public static final long PAINT_CHAIN_UNDERLINE
See Also:
Constant Field Values

NONE

public static final Protein[] NONE

MODI_COUNTS_ALL

public static final int[] MODI_COUNTS_ALL

MAX_CACHE

public static final int MAX_CACHE
See Also:
Constant Field Values

AMINO_ACIDS

public static final boolean AMINO_ACIDS
See Also:
Constant Field Values

NUCLEOTIDES

public static final boolean NUCLEOTIDES
See Also:
Constant Field Values

TRANSLATIONS_AS_STRING

public static final java.lang.String[] TRANSLATIONS_AS_STRING

NO_TRANSLATE

public static final int NO_TRANSLATE
See Also:
Constant Field Values

FORWARD

public static final int FORWARD
See Also:
Constant Field Values

REVERSE

public static final int REVERSE
See Also:
Constant Field Values

COMPLEMENT

public static final int COMPLEMENT
See Also:
Constant Field Values

REVERSE_COMPLEMENT

public static final int REVERSE_COMPLEMENT
See Also:
Constant Field Values

KEY_BA_PARSE

public static final java.lang.Object KEY_BA_PARSE

O_WEB_TOK

public static final int O_WEB_TOK
See Also:
Constant Field Values

O_WEB_TOKENS

public static final int O_WEB_TOKENS
See Also:
Constant Field Values

O_WEB_TOK1

public static final int O_WEB_TOK1
See Also:
Constant Field Values

B_PROCESSED

public static final int B_PROCESSED
See Also:
Constant Field Values

B_INTO_SAME_LINE

public static final int B_INTO_SAME_LINE
See Also:
Constant Field Values

B_REGISTERD

public static final int B_REGISTERD
See Also:
Constant Field Values

OBJECTS

public final java.lang.Object[] OBJECTS

mapReferenceSequence

public java.util.Map<java.lang.String,ReferenceSequence> mapReferenceSequence

_mapRefSeqMC

public int _mapRefSeqMC
Constructor Detail

Protein

public Protein(ProteinAlignment a)

Protein

public Protein()
Method Detail

newInstance

public static Protein newInstance(java.io.File f)
creates Protein from a protein file The file type may be PDB, SWISSPROT, EMBL, FASTA The method is not thread safe because it uses a static byte buffer for file data.


newInstance

public static Protein newInstance(long options,
                                  java.io.File proteinFile)

getProtein

public Protein getProtein()
returns itself. For interface HasProtein.

Specified by:
getProtein in interface HasProtein

getChainFirstResidueIdx

public int getChainFirstResidueIdx(char chain)
Indices of the residues each chain starts with. To obtain the residue index of chain B call getChainFirstResidueIdx('B'); See JAVADOC:Protein#getChainLastResidueIdx(char)


getChainLastResidueIdx

public int getChainLastResidueIdx(char chain)
see JAVADOC:Protein#getChainFirstResidueIdx(char)


getResidueFirstAtomIdx

public int getResidueFirstAtomIdx(int resIdx)
Indices of the atoms each residue starts with. To obtain the atom index of the 42th amino acid call int idx=getResidueFirstAtomIdx(42); then getAtomCoordinates()[idx*3] getAtomCoordinates()[idx*3+1] getAtomCoordinates()[idx*3+2] See JAVADOC:Protein#getResidueLastAtomIdx(int)


getResidueLastAtomIdx

public int getResidueLastAtomIdx(int resIdx)

setResidueFirstAndLastAtomIdx

public void setResidueFirstAndLastAtomIdx(int[] first,
                                          int[] last)

getResidueFirstAtomIdx

public int[] getResidueFirstAtomIdx()

getResidueLastAtomIdx

public int[] getResidueLastAtomIdx()

setResidueAnglePsi

public void setResidueAnglePsi(float[] angle)

getResidueAnglePsi

public float[] getResidueAnglePsi()

setResidueAnglePhi

public void setResidueAnglePhi(float[] angle)

getDnaAndRnaAndHeteros

public HeteroCompound[] getDnaAndRnaAndHeteros()

getDnaAndRnaStructures

public HeteroCompound[] getDnaAndRnaStructures()

getHeteroCompounds

public HeteroCompound[] getHeteroCompounds()

containsHeteroCompound

public boolean containsHeteroCompound(HeteroCompound h)

addHeteroCompounds

public boolean addHeteroCompounds(long options,
                                  HeteroCompound... hh)

removeHeteroCompound

public boolean removeHeteroCompound(HeteroCompound h)

setCharSequence

public void setCharSequence(byte[] tt)
The original character sequence which can be aminos or nucleotides. Do not use this method.


getCharacters

public final byte[] getCharacters()
The original character sequence which can be aminos or nucleotides. Do not use this method.


getResidueType

public final byte[] getResidueType()
The sequence in one letter format. Use this method only if JAVADOC:Protein#getResidueType(int) cannot be used for performance reasons. The byte array might be longer than the number of residues in the proteins. In this case it is 0-terminated. Never ever obtain the length of the protein by getResidueType().length. Use JAVADOC:Protein#countResidues() instead.


getResidueTypeHashCode

public final int getResidueTypeHashCode()

getResidueTypeExactLength

public final byte[] getResidueTypeExactLength()

getResidueType

public byte getResidueType(int i)

setResidueType

public void setResidueType(java.lang.Object seq)
set the array of amino acids


countResidues

public final int countResidues()
number of residues, returns getResidueType().length


getResidueTypeAsStringUC

public final java.lang.String getResidueTypeAsStringUC()
AA sequence as upper case string


getResidueTypeAsString

public final java.lang.String getResidueTypeAsString()
AA sequence as string


getResidueChain

public byte[] getResidueChain()
the chain denominators of each residue


getResidueChainFullLength

public byte[] getResidueChainFullLength()

getResidueChain

public byte getResidueChain(int i)
chain denominators of the i-th residue, usually capital letter


setResidueChain

public void setResidueChain(byte[] bb)

getChainsAsString

public java.lang.String getChainsAsString()

countResiduesInChain

public short countResiduesInChain(byte chain)

getResidueNumber

public int[] getResidueNumber()
Numbers of each residue, as recorded in the PDB files. Is usually not identical with running index. column 23-26


getResidueNumberFullLength

public int[] getResidueNumberFullLength()

getResidueNumber

public final int getResidueNumber(int i)
Number of i-th residue, as recorded in the PDB files or -1.


setResidueNumber

public void setResidueNumber(int[] rn)
set Numbers of each residue, as recorded in the PDB files.


getResidueInsertionCode

public byte[] getResidueInsertionCode()
ATOM 200 CA LEU A 27B 8.378 37.835 28.244 1.00 37.40 C ATOM 208 CA LEU A 27C 6.042 34.960 27.222 1.00 42.03 C ATOM 216 CA ASN A 27D 2.874 36.266 25.650 1.00 42.04 C ^ used in only a few PDB entries as e.g. in pdb43ca pdb1vdc


getResidueInsertionCodeFullLength

public byte[] getResidueInsertionCodeFullLength()

getResidueInsertionCode

public byte getResidueInsertionCode(int i)

setResidueInsertionCode

public void setResidueInsertionCode(byte[] ic)

getResidueName32

public int[] getResidueName32()
Names (4 characters) of residues, as recorded in the 4th column of PDB files. LYS => 'L' + 'Y'*256 +'S'*256*256+' '*256*256*256 See JAVADOC:ChUtils#bit32To4chars(int,char[]) See JAVADOC:ChUtils#charsTo32bit(int,int,int)


getResidueName32

public int getResidueName32(int i)

setResidueType32bit

public void setResidueType32bit(int[] rn)
set Names of each residue, as recorded in the PDB files.


getResidueAtomNumber

public int[] getResidueAtomNumber()
Atom number of the first atom of the amino acid.
       ATOM  39607  CG  GLN V 195      18.039-150.197  79.532  1.00 76.24           C
       
The atom number is 39607.


getResidueAtomNumberFullLength

public int[] getResidueAtomNumberFullLength()

getResidueAtomNumber

public int getResidueAtomNumber(int i)
Atom number of i-th residue, as recorded in the PDB files or -1.


setResidueAtomNumber

public void setResidueAtomNumber(int[] rai)
set atom numbers of each residue, as recorded in the PDB files.


getResidueSolventAccessibility

public float[] getResidueSolventAccessibility()
Residue accessibility in square Anstroms, as taken from DSSP.


setResidueSolventAccessibility

public void setResidueSolventAccessibility(float[] a)
Set accessibilities of residues


getResidueSecStrType

public byte getResidueSecStrType(int i)
secondary structure (H,E,C) of i-th residue , H=helix, C=coil, E=Extended,Sheet


setResidueSecStrType

public void setResidueSecStrType(byte[] a)
Secondary structure (H,E,C)


getResidueSecStrType

public byte[] getResidueSecStrType()

getResidueSecStrTypeFullLenght

public byte[] getResidueSecStrTypeFullLenght()
H=helix, C=coil, E=Extended,Sheet


getAtomName32

public int[] getAtomName32()
Names (4 characters) of atoms, as recorded in the 3rd column of PDB files. cAlpha= CA => 'C' + 'A'*256 +' ''*256*256+' '*256*256*256 See JAVADOC:ChUtils#bit32To4chars(int,char[]) See JAVADOC:ChUtils#charsTo32bit(int,int,int)


getAtomName32

public int getAtomName32(int iAtom)

setAtomType32bit

public void setAtomType32bit(int[] at)

getAtomType

public byte[] getAtomType()

setAtomType

public void setAtomType(byte[] at)

setAtomNumber

public void setAtomNumber(int[] atomNumber)
The atom number is recorded in the 2nd column of pdb files


getAtomNumber

public int[] getAtomNumber()
The atom number is recorded in the 2nd column of pdb files


setAtomCoordOriginal

public void setAtomCoordOriginal(float[] ii)

getAtomCoordinates

public float[] getAtomCoordinates()
Transformed Coordinates of all atoms order [x1,y1,z1,x2,y2,z2,x3,...]. If no transformation is given, JAVADOC:Protein#getAtomCoord(null) is returned. See JAVADOC:Protein#getRotationAndTranslation() Never ever obtain the number of atoms by getAtomCoordinates().length. Instead use JAVADOC:Protein#countAtoms()


countAtoms

public int countAtoms()
number of atoms in the model.


setAtomBFactor

public void setAtomBFactor(float[] atomBFactor)

getAtomBFactor

public float[] getAtomBFactor()

setAtomOccupancy

public void setAtomOccupancy(float[] atomOccupancy)

getAtomOccupancy

public float[] getAtomOccupancy()

setHeader

public void setHeader(java.lang.String s)

setOrganism

public void setOrganism(java.lang.String s)

setOrganismScientific

public void setOrganismScientific(java.lang.String s)

setCompound

public void setCompound(java.lang.String s)

setTitle

public void setTitle(java.lang.String s)

getCompound

public java.lang.String getCompound()

getTitle

public java.lang.String getTitle()

getHeader

public java.lang.String getHeader()

getOrganism

public java.lang.String getOrganism()

getOrganismScientific

public java.lang.String getOrganismScientific()

getInfo

public java.lang.String getInfo(int iType)

getEC

public java.lang.String[] getEC()

setEC

public void setEC(java.lang.String... s)

getUniprotID

public java.lang.String getUniprotID()

setUniprotID

public void setUniprotID(java.lang.String s0)

getPdbID

public java.lang.String getPdbID()

hasPdbId

public boolean hasPdbId(java.lang.String s)

setPdbID

public void setPdbID(java.lang.String s0)

getPdbRef

public java.lang.String getPdbRef()

getAccessionID

public java.lang.String getAccessionID()

setAccessionID

public void setAccessionID(java.lang.String s0)

getSequenceRefs

public java.lang.String[] getSequenceRefs()

getDatabaseRefs

public java.lang.String[] getDatabaseRefs()

removeAllSequenceRefs

public void removeAllSequenceRefs()

removeSequenceRef

public void removeSequenceRef(java.lang.String s)

addSequenceRef

public void addSequenceRef(java.lang.String s0)

addDatabaseRef

public void addDatabaseRef(java.lang.String s)

getCDS

public java.lang.String[] getCDS()

geneProductProteinNoteForCDS

public java.lang.String[] geneProductProteinNoteForCDS(java.lang.String cds)

addCDS

public void addCDS(java.lang.String cds,
                   java.lang.String[] geneProductProteinidNote)

setName

public Protein setName(java.lang.String n)

getName0

public final java.lang.String getName0()

getNameHC

public final int getNameHC()

getName

public final java.lang.String getName()
A protein should have a name, usually the file-name

Specified by:
getName in interface HasName

getNameURLE

public final java.lang.String getNameURLE()

urlCd

public static java.lang.String urlCd(boolean encode,
                                     java.lang.CharSequence text,
                                     int from)

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object

setURL

public void setURL(java.net.URL u)

getURL

public java.net.URL getURL()

getOriginalName

public java.lang.String getOriginalName()

setOriginalName

public void setOriginalName(java.lang.String s)

getFile

public final java.io.File getFile()

getFilePath

public java.lang.String getFilePath()

getFileName

public java.lang.String getFileName()

getFileNameHC

public final int getFileNameHC()

setFile

public Protein setFile(java.io.File f)

setFileWithAllChains

public final void setFileWithAllChains(java.io.File f)

setFileWithSideChainsObtainableFromPDB

public final void setFileWithSideChainsObtainableFromPDB(boolean b)

setFileWithSideChains

public void setFileWithSideChains(java.io.File f)

getFileMayBeWithSideChains

public java.io.File getFileMayBeWithSideChains()

getFileWithAllChains

public final java.io.File getFileWithAllChains()

getFileHasSidechainAtoms

public boolean getFileHasSidechainAtoms()

setFileHasSidechainAtoms

public void setFileHasSidechainAtoms(boolean b)

strapFile

public static java.io.File strapFile(int t,
                                     java.lang.Object protein)

strapFile

public static java.io.File strapFile(int t,
                                     java.lang.Object protein,
                                     java.io.File dir)

setIsInMsfFile

public void setIsInMsfFile(boolean b)

isInMsfFile

public boolean isInMsfFile()

pdbFileName

public final java.lang.String pdbFileName(boolean[] res,
                                          long writerOptions)

writePdbFile

public final java.io.File writePdbFile(long writerOptions)

writePdbFile

public final java.io.File writePdbFile(boolean[] res,
                                       long writerOptions)

hashCodeCalpha

public long hashCodeCalpha()

setOnlyChains

public void setOnlyChains(java.lang.String s)

getOnlyChains

public java.lang.String getOnlyChains()

toThreeLetterCode

public static java.lang.String toThreeLetterCode(int i)
F ==> PHE


addThreeLetterCode

public static void addThreeLetterCode(java.lang.String s,
                                      char ch)

toOneLetterCode

public static final byte toOneLetterCode(int c0,
                                         int c1,
                                         int c2)
Conversion from three-letter- to one-letter-code. E.g. toOneLetterCode('T','R','P') returns 'y' for Tryptophane


toOneLetterCode

public static final byte toOneLetterCode(int name32)
Equivalent to toOneLetterCode(n&255,(n>>>8)&255, (n>>>16)&255);


getResidueSelections

public ResidueSelection[] getResidueSelections()
The selections of residues excluding ResidueAnnotation-objects


addResidueSelection

public boolean addResidueSelection(ResidueSelection s)
Add a selection of residues


getResidueSelectionsWithName

public ResidueSelection[] getResidueSelectionsWithName(java.lang.String[] names)

removeResidueSelection

public boolean removeResidueSelection(ResidueSelection s)
Remove selection of residues


setResidueCalphaOriginal

public void setResidueCalphaOriginal(float[] xyz)
set the array of untransformed calpha-coordinates {x0,y0,z0, x1,y1,z1, x2,y2,z2 ...}


getResidueCalphaOriginalFullLength

public float[] getResidueCalphaOriginalFullLength()

countCalpha

public final int countCalpha()
Are calpha-coordinates known ?


getResidueTypeLowerCaseMeansNo3dCoordinates

public byte[] getResidueTypeLowerCaseMeansNo3dCoordinates()

getResidueCalpha

public float[] getResidueCalpha()
Get transformed calpha-coordinates [Anstrom]

Returns:
{x0,y0,z0, x1,y1,z1, x2,y2,z2 ...}

getResidueCalpha

public float[] getResidueCalpha(Matrix3D m3d)
Parameters:
m3d - The coordinate system If m3d==null then the coriginal coordinates as recorded in the PDB file are returned. p.getResidueCalpha(p.getRotationAndTranslation()) is identical to p.getResidueCalpha()
Returns:
The C-alpha coordinates

getAtomCoordinates

public float[] getAtomCoordinates(Matrix3D m3d)

getRotationAndTranslation

public final Matrix3D getRotationAndTranslation()
Get the rotation - translation matrix. The methods JAVADOC:Protein#getAtomCoordinates() and JAVADOC:Protein#getResidueCalpha() return transformed coordinates.


setRotationAndTranslation

public final void setRotationAndTranslation(Matrix3D m3d)
see JAVADOC:Protein#getRotationAndTranslation()


getProteinViewers

public ProteinViewer[] getProteinViewers()

addProteinViewer

public void addProteinViewer(ProteinViewer v)

removeProteinViewer

public void removeProteinViewer(ProteinViewer v)

pdbNumberToIdx1

public java.lang.CharSequence pdbNumberToIdx1(java.lang.CharSequence expression)

residueSubsetAsBool

public boolean[] residueSubsetAsBool(java.lang.CharSequence expr,
                                     int[] returnMinIdx)
Converts String denominating a subset of residues into a boolean array E.g. "1-3,5-6" ==> XXX.XXX....


residueSubsetAsBooleanZ

public boolean[] residueSubsetAsBooleanZ(java.lang.CharSequence expr)

atomNumber2residueIdx

public int atomNumber2residueIdx(int pdbAtomNum)
Given a pdb Number (2nd column in pdb files) What is the residue index ?


resNumAndChain2resIdxZ

public int resNumAndChain2resIdxZ(boolean fullLength,
                                  int resNum,
                                  char chain,
                                  char insCode)
Given a residue number and a chain denominator What is the residue index ?


getWeakRef

public java.lang.Object getWeakRef()
Specified by:
getWeakRef in interface HasWeakRef

getPropertyMap

public java.util.Map getPropertyMap(boolean create)
Specified by:
getPropertyMap in interface HasPropertyMap

putClientProperty

public final void putClientProperty(java.lang.Object key,
                                    java.lang.Object value)
See equivalent method in JComponent.


getClientProperty

public final java.lang.Object getClientProperty(java.lang.Object o)
See equivalent method in JComponent.


getResidueIndexOffset

public int getResidueIndexOffset()

setResidueIndexOffset

public void setResidueIndexOffset(int first)

getFirstAndLastResidueIndex

public int[] getFirstAndLastResidueIndex()

firstResIdx

public static int firstResIdx(Protein p)

setResidueSubset

public void setResidueSubset(java.lang.String expression)
residueSubset("10-20,40-50") will return a new protein instance with residues from 10-20 and 40-50 In PDB-files the pdb-residue-number can be referred to: 10:-20:, 40:-50: One can add a chain identifier like 10:A-20:A, 40:A-50:A Note: counting of residues starts here at 1 and not 0 !!


setResidueSubset

public void setResidueSubset(boolean[] b)

getResidueSubsetB1

public int getResidueSubsetB1()
Index of the first true in getResidueSubsetB();


getResidueSubsetB

public boolean[] getResidueSubsetB()

fromFullLengthB

public boolean[] fromFullLengthB(boolean[] sel)

toFullLengthB

public boolean[] toFullLengthB(boolean[] sel)

getResolutionAnstroms

public float getResolutionAnstroms()

setResolutionAnstroms

public void setResolutionAnstroms(float r)

hashTMalign

public java.util.WeakHashMap<Protein,Superimpose3D.Result> hashTMalign()

getResidueType

public static byte[][] getResidueType(Protein[] pp)

setProteinParserClass

public void setProteinParserClass(java.lang.Class p)

setParsingTime

public void setParsingTime(long t)

getProteinParserClass

public java.lang.Class getProteinParserClass()

getParsingTime

public long getParsingTime()

containsOnlyACTGNX

public final boolean containsOnlyACTGNX()

getInferred3dCountMatches

public int[] getInferred3dCountMatches()

inferCoordinates

public float inferCoordinates(Protein[] pp3d,
                              java.lang.Class classAligner,
                              BA log)

inferredPDB_markMatches

public void inferredPDB_markMatches(boolean toLC,
                                    boolean selection)

detach3DStructure

public void detach3DStructure()

getInferredPdbID

public java.lang.String getInferredPdbID()

paintChain

public void paintChain(long options,
                       java.awt.Graphics g,
                       java.lang.String T,
                       int x0,
                       int y,
                       int w,
                       int h)

fileAllChains

public static final java.io.File fileAllChains(java.io.File f0)

setBioMatrices

public void setBioMatrices(Matrix3D[] mm)

getBioMatrices

public Matrix3D[] getBioMatrices()

setPdbTextSecStru

public void setPdbTextSecStru(BA txt)

getPdbTextSecStru

public BA getPdbTextSecStru()

getMouseOverSelection

public static BasicResidueSelection getMouseOverSelection()

mouseOver

public static void mouseOver(Protein p,
                             int iAa0)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent ev)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

selectedPositionsToText

public static java.lang.String selectedPositionsToText(ResidueSelection s)

selectedPositionsToText

public static java.lang.String selectedPositionsToText(boolean[] bb,
                                                       int offset,
                                                       Protein protein)

selectedPositionsToText

public static java.lang.String selectedPositionsToText(boolean pdbNumbers,
                                                       boolean[] bb,
                                                       int offset,
                                                       Protein protein)

isWaterInFile

public boolean isWaterInFile()

loadSideChainAtoms

public void loadSideChainAtoms(BA ba)

equalsResidueType

public static boolean equalsResidueType(Protein p1,
                                        Protein p2)

isLoadedFromStructureFile

public boolean isLoadedFromStructureFile()

setIsLoadedFromStructureFile

public void setIsLoadedFromStructureFile(boolean b)

commonPdbId

public static java.lang.String commonPdbId(Protein[] pp)

cloneProtein

public <P extends Protein> P cloneProtein(P pNew)

getProteinsSameComplex

public Protein[] getProteinsSameComplex()

setProteinsSameComplex

public void setProteinsSameComplex(Protein[] pp)

setColor

public void setColor(java.awt.Color c)
Specified by:
setColor in interface Colored

getColor

public java.awt.Color getColor()
Specified by:
getColor in interface Colored

mc

public final int mc(int type)

mcSum

public final int mcSum(int t1,
                       int t2)

mcSum

public final int mcSum(int t1,
                       int t2,
                       int t3)

incrementMC

public static void incrementMC(int type,
                               java.lang.Object proteins)

setModiCount

public boolean setModiCount(int type,
                            int value)

debugMC

public static void debugMC(Protein[] pp)

selectCodingStrand

public void selectCodingStrand(int orientation)

getCodingStrand

public final int getCodingStrand()

getNucleotides

public final byte[] getNucleotides()

getNucleotidesCodingStrand

public final byte[] getNucleotidesCodingStrand()
The nucleotides after applying the necessary reverse and complement operations. The string has the exact length.


countNucleotides

public final int countNucleotides()

setNucleotides

public final void setNucleotides(java.lang.Object rawNtSequence,
                                 int orientation)
Sets the sequence of nucleotides. e.g. "CAGTTGTACTG".getBytes()


getResidueTypeFullLength

public final byte[] getResidueTypeFullLength()

getResidueTripletZ

public final byte[] getResidueTripletZ(int ia,
                                       byte[] buffer)
The triplet at amino acid position

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

setCoding

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


isCoding

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


toCodingPositions

public final int[] toCodingPositions()
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:Protein#coding2allPositions()


coding2allPositions

public final int[] coding2allPositions()
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:Protein#toCodingPositions()


ntPositions2aa

public final boolean[] ntPositions2aa(boolean[] selNts,
                                      int offset,
                                      int[] returnMinIdx)

thread_parseCDS

public java.lang.Thread thread_parseCDS(java.lang.String s)

parseCDS

public void parseCDS(java.lang.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()

parseFrameShift

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

getNucleotidesAsStringUC

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


getNucleotidesReverseComplementAsStringUC

public java.lang.String getNucleotidesReverseComplementAsStringUC()

getAlignment

public final ProteinAlignment getAlignment()
Get The alignment object.


setAlignment

public void setAlignment(ProteinAlignment a)

setIsInAlignment

public void setIsInAlignment(boolean b)

isInAlignment

public boolean isInAlignment()

setValueOfProtein

public void setValueOfProtein(ValueOfProtein v)

getValueOfProtein

public ValueOfProtein getValueOfProtein()

setResidueGap

public void setResidueGap(int[] rg)

setResidueGap

public void setResidueGap(int iA,
                          int gap)

addResidueGap

public int addResidueGap(int iA,
                         int gap)

getResidueGap

public int[] getResidueGap()

getResidueGap

public final int getResidueGap(int i)

sumUpGaps

public int sumUpGaps(int ias)

wideColumn2nextIndex

public int wideColumn2nextIndex(int column)

getResidueColumn

public int[] getResidueColumn()
Maps residue indices upon horizontal text positions of the alignment.

Returns:
an integer-array of all horizontal positions for each residue

getResidueColumn

public final int getResidueColumn(int i)
Maps residue indices to horizontal text positions of the alignment.


getResidueColumnZ

public final int getResidueColumnZ(int i)

getMaxColumnZ

public int getMaxColumnZ()
Get the horizontal position of the last residue..


columns2nextIndices

public int[] columns2nextIndices()
An array to map horizontal residue positions to residue indices. At gap positions the array contains -1.


columns2indices

public int[] columns2indices()
Get indeces of residues at horizontal alignment positions col.

Returns:
The residue index or -1 for an alignment position (column).

column2indexZ

public int column2indexZ(int col)
Get index of residue at the horizontal alignment position col.

Parameters:
col - the alignment position (column)
Returns:
The residue index or -1 for an alignment position (column).

column2thisOrPreviousIndex

public int column2thisOrPreviousIndex(int col)
Get index of residue at the horizontal alignment position col. if h points to a gap return the previous index.

Parameters:
col - the alignment position (column)
Returns:
The residue index or -1 for an alignment position (column).

column2nextIndexZ

public int column2nextIndexZ(int h)
Get index of residue at the horizontal alignment position h or the next index if h points to a gap.

Parameters:
h - the alignment position (column)
Returns:
the index of the residue at alignment position

getGappedSequence

public byte[] getGappedSequence()
The amino acid sequence with gaps (0x20). Array may be longer than getMaxColumnZ().In this case the end is marked with 0x00.


getGappedSequenceExactLength

public byte[] getGappedSequenceExactLength()
The amino acid sequence. Gaps are character '-'.


getGappedSequenceAsString

public java.lang.String getGappedSequenceAsString()
The amino acid sequence. Gaps are character '-'.


getGappedSequenceAsStringUC

public java.lang.String getGappedSequenceAsStringUC()
The amino acid sequence. Gaps are character '-'.


getGappedSecStru

public byte[] getGappedSecStru()

getGappedSolventAccessibility

public float[] getGappedSolventAccessibility()

inferGapsFromGappedSequence

public void inferGapsFromGappedSequence(byte[] seq)
The original residue types are kept but the gaps are inferred from the gapped sequence seq. A letter denotes an amino acid, any other character a gap.


setGappedSequence

public void setGappedSequence(byte[] seq,
                              int len)
set the gapped sequence


setGappedSequence

public void setGappedSequence(java.lang.CharSequence seq)
See JAVADOC:Protein#setGappedSequence(byte[])


parseGaps

public boolean parseGaps(byte[] z,
                         int l)
Reads a line such as X2XXX3X1XXXX2XXXXX The numbers are gaps and the letters residue positions


getWebTokenIdx

public int getWebTokenIdx()

getPreferedOrder

public int getPreferedOrder()

setPreferedOrder

public void setPreferedOrder(int t)

setRow

public void setRow(int i)

getRow

public int getRow()

save

public void save(boolean isViewer,
                 java.io.File dir,
                 BA error)

_isTransient

public boolean _isTransient()

setTransient

public void setTransient(boolean b)
Non-transient proteins are not saved


parse

public boolean parse(BA txt,
                     ProteinParser[] parsers,
                     long mode)
Interpretes the text and extracts the protein data and sets the fields such as residueType in the protein.

Parameters:
parsers - An array of parsers to do the job. Try all until one succeeds.
txt - the protein text in fasta or pdb or swissprot format.
Returns:
true on success

getImage

public java.awt.Image getImage(java.awt.Component observer)
Get the icon of the protein or null

Specified by:
getImage in interface HasImage

getIcon

public javax.swing.ImageIcon getIcon()

getIconImage

public java.awt.Image getIconImage()

setIconImage

public void setIconImage(java.lang.String url)

getIconUrl

public java.lang.String getIconUrl()

getImageId

public java.lang.String getImageId()

findIconImage

public void findIconImage()

iconLink

public java.io.File iconLink()

setInfoAssociatedPdb

public void setInfoAssociatedPdb(java.lang.String info)

setBalloonText

public void setBalloonText(java.lang.String t)

reportIconWidth

public void reportIconWidth(int w)

getRendererModiCount

public long getRendererModiCount()
Specified by:
getRendererModiCount in interface HasRendererModiCount

getRenderer

public java.lang.Object getRenderer(long options,
                                    long[] rendOptions)
Specified by:
getRenderer in interface HasRenderer

getVerticalRendererComponent

public javax.swing.JComponent getVerticalRendererComponent()

getRendTxt

public java.lang.String getRendTxt()

getLabelSize

public final java.awt.Rectangle getLabelSize(java.awt.Font f,
                                             java.awt.Rectangle charBounds)

computeLabelSize

public java.awt.Rectangle computeLabelSize(java.awt.Font f,
                                           java.awt.Rectangle charBounds,
                                           java.lang.String name,
                                           java.awt.Rectangle rect)

getSelectedAminoacids

public byte[] getSelectedAminoacids()
Returns an array telling what residues are selected by at least one residue selection. 0 element means not selected any other number means selected.


getSelectedNucleotides

public byte[] getSelectedNucleotides()

getAllResidueSelections

public ResidueSelection[] getAllResidueSelections()

removeResidueSelection

public void removeResidueSelection(java.lang.Class c)
Remove all selection of residues that are instances of c


posAsTextZ

public BA posAsTextZ(int type,
                     int ias)

getResidueSelectionsAt

public ResidueSelection[] getResidueSelectionsAt(long options,
                                                 int iA_from,
                                                 int iA_to,
                                                 int where)

getResidueAnnotationWithName

public ResidueAnnotation getResidueAnnotationWithName(java.lang.CharSequence name)

getResidueAnnotations

public ResidueAnnotation[] getResidueAnnotations()
Returns:
All annotations of the protein

getSequenceFeatures

public ResidueAnnotation[] getSequenceFeatures()

getResidueAnnotationsNF

public ResidueAnnotation[] getResidueAnnotationsNF()

getReferenceSequence

public ReferenceSequence getReferenceSequence(java.lang.String otherId,
                                              BA log,
                                              boolean background,
                                              java.lang.Runnable runWhenFinished)

addInvalidFeatureLine

public void addInvalidFeatureLine(java.lang.CharSequence s)

containsInvalidFeatureLine

public boolean containsInvalidFeatureLine(java.lang.CharSequence s)

run

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

getJTree

public ChJTree getJTree()

expandTreeNode

public void expandTreeNode(java.lang.Class c)

'STRAP:multiple sequence alignments '

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