|
'STRAP:multiple sequence alignments ' | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object charite.christo.protein.Protein charite.christo.protein.ProteinNT charite.christo.strap.StrapProtein
public class StrapProtein
The class StrapProtein describes the protein objects in Strap and is important for users who write plugins for STRAP. It is an extension of JAVADOC:ProteinNT because it allows proteins to be read from nucleotide files. In addition it allows gaps which is the basis for sequence alignments.
Field Summary | |
---|---|
static String |
METHOD_PARSE
|
static StrapProtein[] |
NONE
|
Fields inherited from class charite.christo.protein.ProteinNT |
---|
AMINO_ACIDS, FORWARD, FORWARD_COMPLEMENT, NUCLEOTIDES, ORIENTATIONS, REVERSE, 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, LOG, SET_ICON_IMAGE |
Constructor Summary | |
---|---|
StrapProtein()
|
|
StrapProtein(ProteinAlignment a)
|
Method Summary | |
---|---|
void |
addResidueSelection(ResidueSelection s)
Add a selection of residues |
int |
column2index(int col)
Get index of residue at the horizontal alignment position col. |
int |
column2nextIndex(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()
|
ByteArray |
cursorPosAsString(int ias,
boolean showColumn)
|
void |
dispose()
|
ProteinAlignment |
getAlignment()
Get The alignment object. |
ResidueSelection[] |
getAllResidueSelections()
|
File[] |
getDndFiles()
|
byte[] |
getGappedSequence()
The amino acid sequence with gaps (0x20). |
String |
getGappedSequenceAsString()
The amino acid sequence. |
String |
getGappedSequenceAsStringUC()
The amino acid sequence. |
byte[] |
getGappedSequenceExactLength()
The amino acid sequence. |
byte[] |
getGappedSequences()
|
static byte[][] |
getGappedSequences(StrapProtein[] pp,
int colFrom,
int colTo,
char gap)
|
byte[] |
getGappedSequenceTS()
To be run not in EDT |
ImageIcon |
getIcon()
|
Image |
getIconImage()
|
String |
getIconUrl()
|
Image |
getImage(Component observer)
Get the icon of the protein or null |
String |
getImageId()
|
int |
getMaxColumn()
Get the horizontal position of the last residue.. |
static int |
getMaxColumn(StrapProtein[] pp)
|
static long |
getParserOptions()
|
static StrapProtein[] |
getProteinsWithNames(ByteArray ba,
StrapProtein[] pp)
|
static StrapProtein |
getProteinWithName(String name,
Protein[] pp0)
returns the 1st protein whose name equals to name. |
static StrapProtein |
getProteinWithNameAndFile(String n,
File file,
Object[] pp)
|
ReferenceSequence |
getReferenceSequence(String otherId,
ChRunnable log,
boolean background,
Runnable runWhenFinished)
|
JComponent |
getRendererComponent()
|
StringBuffer |
getRendererText(int options)
|
ResidueAnnotation[] |
getResidueAnnotations()
|
ResidueAnnotation |
getResidueAnnotationWithName(CharSequence name)
|
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[] |
getResidueGap()
|
int |
getResidueGap(int i)
|
ResidueSelection[] |
getResidueSelectionsAt(int resIdxFrom,
int resIdxTo)
|
ResidueSelection[] |
getResidueSelectionsAt(int iA_from,
int iA_to,
int where)
|
boolean[] |
getResiduesInAlignmentcolumnrangeAsBoolean(int fromColumn,
int toColumn)
|
byte[] |
getSelectedAminoacids()
Returns an array telling what residues are selected by at least one residue selection. |
byte[] |
getSelectedNucleotides()
|
JComponent |
getVerticalRendererComponent()
|
static void |
inferCoordinates_BG(StrapProtein[] pp,
String[] pdbID,
long options,
Runnable whenFinished)
|
static void |
inferCoordinates_EDT(StrapProtein[] pp,
String[] pdbID,
long options)
|
void |
inferGapsFromGappedSequence(byte[] seq)
The original residue types are kept but the gaps are inferred from the gapped sequence seq. |
boolean |
isTransient()
|
static StrapProtein[] |
loadProteinsInList(ByteArray ba,
long options)
|
static StrapProtein[] |
loadProteinsInList(File f,
long options)
|
static StrapProtein |
newInstance(File proteinFile)
|
static StrapProtein |
newInstance(File proteinFile,
long options)
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. |
boolean |
parse(ByteArray txt,
ProteinParser[] parsers,
long mode)
Interpretes the text and extracts the protein data and sets the fields such as residueType in the protein. |
void |
removeResidueSelection(Class c)
Remove all selection of residues that are instances of c |
void |
removeResidueSelection(ResidueSelection s)
Remove selection of residues |
Object |
run(String id,
Object arg)
|
void |
save(File dir,
StringBuffer error)
|
void |
setAlignment(ProteinAlignment a)
|
void |
setGappedSequence(byte[] seq,
int len)
set the gapped sequence |
void |
setGappedSequence(CharSequence seq)
See JAVADOC:StrapProtein#setGappedSequence(byte[]) |
void |
setIconImage(String url)
|
void |
setInfoAssociatedPdb(String info)
|
static void |
setParserOptions(long options)
|
void |
setResidueGap(int[] rg)
|
void |
setResidueGap(int iA,
int gap)
|
void |
setTransient(boolean b)
Non-transient proteins are not saved |
void |
texshade(String txt)
|
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 |
---|
public static final String METHOD_PARSE
public static final StrapProtein[] NONE
Constructor Detail |
---|
public StrapProtein(ProteinAlignment a)
public StrapProtein()
Method Detail |
---|
public static StrapProtein newInstance(File proteinFile, long options)
public static StrapProtein newInstance(File proteinFile)
public boolean[] getResiduesInAlignmentcolumnrangeAsBoolean(int fromColumn, int toColumn)
public void dispose()
public final ProteinAlignment getAlignment()
getAlignment
in class Protein
public final void setAlignment(ProteinAlignment a)
public void setResidueGap(int[] rg)
public void setResidueGap(int iA, int gap)
public int[] getResidueGap()
public final int getResidueGap(int i)
public int[] getResidueColumn()
public final int getResidueColumn(int i)
public int getMaxColumn()
public int[] columns2nextIndices()
public final int[] columns2indices()
public int column2index(int col)
column2index
in class Protein
col
- the alignment position (column)
public final int column2thisOrPreviousIndex(int col)
col
- the alignment position (column)
public final int column2nextIndex(int h)
h
- the alignment position (column)
public byte[] getGappedSequenceTS()
public byte[] getGappedSequence()
public static byte[][] getGappedSequences(StrapProtein[] pp, int colFrom, int colTo, char gap)
public byte[] getGappedSequences()
public byte[] getGappedSequenceExactLength()
public String getGappedSequenceAsString()
public String getGappedSequenceAsStringUC()
public void inferGapsFromGappedSequence(byte[] seq)
public void setGappedSequence(byte[] seq, int len)
public void setGappedSequence(CharSequence seq)
public File[] getDndFiles()
getDndFiles
in interface HasDndFiles
public void save(File dir, StringBuffer error)
public boolean isTransient()
public void setTransient(boolean b)
public boolean parse(ByteArray txt, ProteinParser[] parsers, long mode)
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.
public static long getParserOptions()
public static void setParserOptions(long options)
public Image getImage(Component observer)
getImage
in interface HasImage
public ImageIcon getIcon()
public Image getIconImage()
getIconImage
in class Protein
public void setIconImage(String url)
public String getIconUrl()
public String getImageId()
public void setInfoAssociatedPdb(String info)
public JComponent getRendererComponent()
getRendererComponent
in interface HasRendererComponent
public JComponent getVerticalRendererComponent()
public final StringBuffer getRendererText(int options)
public void texshade(String txt)
public byte[] getSelectedAminoacids()
public byte[] getSelectedNucleotides()
public ResidueSelection[] getAllResidueSelections()
getAllResidueSelections
in class Protein
public void removeResidueSelection(Class c)
public void addResidueSelection(ResidueSelection s)
Protein
addResidueSelection
in class Protein
public void removeResidueSelection(ResidueSelection s)
Protein
removeResidueSelection
in class Protein
public ByteArray cursorPosAsString(int ias, boolean showColumn)
cursorPosAsString
in class Protein
public ResidueSelection[] getResidueSelectionsAt(int resIdxFrom, int resIdxTo)
public ResidueSelection[] getResidueSelectionsAt(int iA_from, int iA_to, int where)
getResidueSelectionsAt
in class Protein
public ResidueAnnotation getResidueAnnotationWithName(CharSequence name)
public ResidueAnnotation[] getResidueAnnotations()
public ReferenceSequence getReferenceSequence(String otherId, ChRunnable log, boolean background, Runnable runWhenFinished)
public static StrapProtein[] loadProteinsInList(File f, long options)
public static StrapProtein[] loadProteinsInList(ByteArray ba, long options)
public static final StrapProtein[] getProteinsWithNames(ByteArray ba, StrapProtein[] pp)
public static StrapProtein getProteinWithName(String name, Protein[] pp0)
public static StrapProtein getProteinWithNameAndFile(String n, File file, Object[] pp)
public static int getMaxColumn(StrapProtein[] pp)
public Object run(String id, Object arg)
run
in interface ChRunnable
run
in class ProteinNT
public static void inferCoordinates_BG(StrapProtein[] pp, String[] pdbID, long options, Runnable whenFinished)
public static void inferCoordinates_EDT(StrapProtein[] pp, String[] pdbID, long options)
|
'STRAP:multiple sequence alignments ' | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |