public interface Chain
Defines the interface for a Chain. A Chain corresponds to a Chain in a PDB file.
A chain consists out of a list of Group
objects. A Group can either be
an AminoAcid
, Hetatom
or Nucleotide
.
The BioJava API provides access to both the ATOM and SEQRES records in a PDB file.
During parsing of a PDB file it aligns the ATOM and SEQRES groups and joins them.
The SEQRES sequence can be accessed via getSeqResGroups()
and the
ATOM groups via getAtomGroups()
. Groups that have been observed
(i.e. they are in the ATOM records) can be detected by Group
.has3D()
Modifier and Type | Method and Description |
---|---|
void |
addGroup(Group group)
add a group to the list of ATOM record group of this chain.
|
java.lang.Object |
clone()
returns an identical copy of this Chain.
|
Annotation |
getAnnotation()
get/set the Annotation of a Chain.
|
Group |
getAtomGroup(int position)
return the Group at position X.
|
java.util.List<Group> |
getAtomGroups()
Return all groups that have been specified in the ATOM section of this chain .
|
java.util.List<Group> |
getAtomGroups(java.lang.String type)
Return a List of all groups of a special type (e.g.
|
int |
getAtomLength()
Return the number of Groups in the ATOM records of the chain.
|
java.lang.String |
getAtomSequence()
Return the sequence of amino acids as it has been provided in the ATOM records.
|
Sequence |
getBJSequence()
Convert the SEQRES groups of a Chain to a Biojava Sequence object.
|
Group |
getGroup(int position)
Deprecated.
use getAtomGroup or getSeqResGroup instead
|
Group |
getGroupByPDB(java.lang.String pdbresnum)
get a group by its PDB residue numbering.
|
java.util.List<Group> |
getGroups()
Deprecated.
use getAtomGroups or getSeqResGroups instead
|
java.util.List<Group> |
getGroups(java.lang.String type)
Deprecated.
use getAtomGroups or getSeqResGroups instead
|
Group[] |
getGroupsByPDB(java.lang.String pdbresnumStart,
java.lang.String pdbresnumEnd)
Get all groups that are located between two PDB residue numbers.
|
Group[] |
getGroupsByPDB(java.lang.String pdbresnumStart,
java.lang.String pdbresnumEnd,
boolean ignoreMissing)
Get all groups that are located between two PDB residue numbers.
|
Compound |
getHeader()
Returns the Header ( a Compound object) for this chain.
|
java.lang.Long |
getId()
Get the ID used by Hibernate.
|
int |
getLength()
Deprecated.
please use getAtomLength or getLengthSeqRes instead
|
int |
getLengthAminos()
Deprecated.
use getAtomGroups("amino").size() instead.
|
java.lang.String |
getName()
get and set the name of this chain (Chain id in PDB file ).
|
Structure |
getParent()
Returns the parent Structure of this chain.
|
Group |
getSeqResGroup(int position)
return the Group at position X.
|
java.util.List<Group> |
getSeqResGroups()
Return all groups of this chain.
|
java.util.List<Group> |
getSeqResGroups(java.lang.String type)
Return a List of all groups of a special type (e.g.
|
int |
getSeqResLength()
Returns the number of groups in the SEQRES records of the chain.
|
java.lang.String |
getSeqResSequence()
Get the sequence for all amino acids as it is specified in the SEQRES residues.
|
java.lang.String |
getSequence()
Deprecated.
use getAtomSequence instead
|
java.lang.String |
getSwissprotId()
Get the Swissprot id of this chain.
|
void |
setAnnotation(Annotation anno)
get/set the Annotation of a Chain.
|
void |
setAtomGroups(java.util.List<Group> groups)
Set all groups that have been specified in the ATOM section of this chain .
|
void |
setHeader(Compound molId)
Set the Header from the PDB file.
|
void |
setId(java.lang.Long id)
Set the ID used by Hibernate.
|
void |
setName(java.lang.String name)
get and set the name of this chain (Chain id in PDB file ).
|
void |
setParent(Structure parent)
Set the back-reference to its parent Structure.
|
void |
setSeqResGroups(java.util.List<Group> seqResGroups)
Set the list of SeqResGroups for this chain.
|
void |
setSwissprotId(java.lang.String sp_id)
Set the Swissprot id of this chain.
|
java.lang.String |
toString()
string representation.
|
java.lang.Object clone()
void addGroup(Group group)
group
- a Group objectjava.lang.Long getId()
setId(Long)
void setId(java.lang.Long id)
id
- assigned by HibernategetId()
Group getGroup(int position)
position
- an intgetAtomGroup(int)
,
getSeqResGroup(int)
Group getAtomGroup(int position)
position
- an intGroup getSeqResGroup(int position)
position
- an intjava.util.List<Group> getGroups(java.lang.String type)
type
- a Stringjava.util.List<Group> getGroups()
java.util.List<Group> getAtomGroups()
setAtomGroups(List)
void setAtomGroups(java.util.List<Group> groups)
groups
- a List object representing the Groups of this Chain.getAtomGroups()
java.util.List<Group> getAtomGroups(java.lang.String type)
type
- a StringsetAtomGroups(List)
Group getGroupByPDB(java.lang.String pdbresnum) throws StructureException
pdbresnum
- the PDB residue number of the groupStructureException
Group[] getGroupsByPDB(java.lang.String pdbresnumStart, java.lang.String pdbresnumEnd) throws StructureException
pdbresnumStart
- PDB residue number of startpdbresnumEnd
- PDB residue number of endStructureException
Group[] getGroupsByPDB(java.lang.String pdbresnumStart, java.lang.String pdbresnumEnd, boolean ignoreMissing) throws StructureException
pdbresnumStart
- PDB residue number of startpdbresnumEnd
- PDB residue number of endignoreMissing
- ignore missing groups in this range.StructureException
int getLength()
getAtomLength()
,
getSeqResLength()
int getAtomLength()
int getSeqResLength()
int getLengthAminos()
void setAnnotation(Annotation anno)
anno
- the Annotation to be provided.getAnnotation()
Annotation getAnnotation()
setAnnotation(Annotation)
void setHeader(Compound molId)
molId
- the Compound that contains the header information for this chaingetHeader()
Compound getHeader()
setHeader(Compound)
void setName(java.lang.String name)
name
- a String specifying the name valuegetName()
java.lang.String getName()
setName(java.lang.String)
java.lang.String toString()
toString
in class java.lang.Object
Sequence getBJSequence() throws IllegalSymbolException
IllegalSymbolException
java.lang.String getSequence()
getAtomSequence()
java.lang.String getAtomSequence()
getSeqResSequence()
java.lang.String getSeqResSequence()
getAtomSequence()
void setSwissprotId(java.lang.String sp_id)
sp_id
- a String specifying the swissprot id valuegetSwissprotId()
java.lang.String getSwissprotId()
setSwissprotId(String sp_id)
java.util.List<Group> getSeqResGroups(java.lang.String type)
type
- a StringsetSeqResGroups(List)
java.util.List<Group> getSeqResGroups()
setSeqResGroups(List)
void setSeqResGroups(java.util.List<Group> seqResGroups)
seqResGroups
- a List of Group objects that from the SEQRES groups of this chain.getSeqResGroups()
void setParent(Structure parent)
parent
- the parent Structure object for this ChaingetParent()
Structure getParent()
setParent(Structure)