public interface Chain extends Serializable
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.
|
Object |
clone()
returns an identical copy of this Chain.
|
Group |
getAtomGroup(int position)
Return the Group at given position,
from within Groups with observed density in the chain, i.e.
|
List<Group> |
getAtomGroups()
Return all Groups with observed density in the chain, i.e.
|
List<Group> |
getAtomGroups(GroupType type)
Return a List of all (observed) Groups of a special type, one of:
GroupType.AMINOACID ,
GroupType.HETATM or GroupType.NUCLEOTIDE . |
int |
getAtomLength()
Returns the number of Groups with observed density in the chain, i.e.
|
List<Group> |
getAtomLigands()
Deprecated.
since biojava 5.0 this does not apply anymore. Chains contain either
polymeric groups or non-polymeric groups
|
String |
getAtomSequence()
Returns the sequence of amino acids as it has been provided in the ATOM records.
|
Sequence<?> |
getBJSequence()
Converts the SEQRES groups of a Chain to a Biojava Sequence object.
|
String |
getChainID()
Deprecated.
use getId() instead
|
EntityInfo |
getEntityInfo()
Returns the EntityInfo for this chain.
|
EntityType |
getEntityType()
Returns the EntityType of this chain.
|
Group |
getGroupByPDB(ResidueNumber resNum)
Get a group by its PDB residue numbering.
|
Group[] |
getGroupsByPDB(ResidueNumber pdbresnumStart,
ResidueNumber pdbresnumEnd)
Get all groups that are located between two PDB residue numbers.
|
Group[] |
getGroupsByPDB(ResidueNumber pdbresnumStart,
ResidueNumber pdbresnumEnd,
boolean ignoreMissing)
Get all groups that are located between two PDB residue numbers.
|
String |
getId()
Get the 'private' asymId (internal chain IDs in mmCif) for this chain.
|
String |
getInternalChainID()
Deprecated.
use
getId() instead |
String |
getName()
Get the 'public' authId (chain ID in PDB file)
|
Structure |
getParent()
Deprecated.
use getStructure(Structure) instead.
|
GroupType |
getPredominantGroupType()
Get the predominant
GroupType for a given Chain, following these
rules: if the ratio of number of residues of a certain
GroupType to total non-water residues is above the threshold
, then that GroupType is
returned if there is no GroupType that is above the
threshold then the GroupType with most members is chosen, logging
it
See also ChemComp.getPolymerType() and
ChemComp.getResidueType() which follow the PDB chemical component
dictionary and provide a much more accurate description of groups and
their linking. |
List<SeqMisMatch> |
getSeqMisMatches()
Gets annotated sequence mismatches for this chain.
|
Group |
getSeqResGroup(int position)
Return the Group at given position,
from within groups in the SEQRES records of the chain, i.e.
|
List<Group> |
getSeqResGroups()
Returns a list of all groups in SEQRES records of the chain, i.e.
|
List<Group> |
getSeqResGroups(GroupType type)
Returns a List of all SEQRES groups of a special type, one of:
GroupType.AMINOACID ,
GroupType.HETATM or GroupType.NUCLEOTIDE . |
int |
getSeqResLength()
Returns the number of groups in the SEQRES records of the chain, i.e.
|
String |
getSeqResSequence()
Returns the PDB SEQRES sequence as a one-letter sequence string.
|
Structure |
getStructure()
Returns the parent Structure of this chain.
|
String |
getSwissprotId()
Gets the Swissprot id of this chain.
|
boolean |
isNucleicAcid()
Tell whether given chain is DNA or RNA
|
boolean |
isProtein()
Tell whether given chain is a protein chain
|
boolean |
isPureNonPolymer()
Returns true if the given chain is composed of non-polymeric (including water) groups only.
|
boolean |
isWaterOnly()
Tests if a chain is consisting of water molecules only
|
void |
setAtomGroups(List<Group> groups)
Set all Groups with observed density in the chain, i.e.
|
void |
setChainID(String asymId)
Deprecated.
use
setId(String asymId) instead |
void |
setEntityInfo(EntityInfo entityInfo)
Sets the Entity information
|
void |
setId(String asymId)
Set the 'private' asymId (internal chain IDs in mmCif) for this chain.
|
void |
setInternalChainID(String internalChainID)
Deprecated.
use
#setId() instead |
void |
setName(String authId)
Set the 'public' authId (chain ID in PDB file)
|
void |
setParent(Structure parent)
Deprecated.
use setStructure instead
|
void |
setSeqMisMatches(List<SeqMisMatch> seqMisMatches)
Sets annotated sequence mismatches for this chain.
|
void |
setSeqResGroups(List<Group> seqResGroups)
Sets the list of SeqResGroups for this chain.
|
void |
setStructure(Structure parent)
Sets the back-reference to its parent Structure.
|
void |
setSwissprotId(String sp_id)
Sets the Swissprot id of this chain.
|
String |
toMMCIF()
Convert this Chain to a String in mmCIF format
|
String |
toPDB()
Convert this Chain to a String in PDB format
|
String |
toString() |
Object clone()
void addGroup(Group group)
group
- a Group objectString getId()
setId(String)
,
getName()
void setId(String asymId)
asymId
- the internal chain Idvoid setName(String authId)
authId
- the 'public' authId (chain ID in PDB file)getId()
String getName()
getId()
Group getAtomGroup(int position)
position
- an intgetAtomLength()
,
getAtomGroups()
,
getSeqResGroup(int)
Group getSeqResGroup(int position)
position
- an intgetSeqResLength()
,
getSeqResGroups()
,
getAtomGroup(int)
List<Group> getAtomGroups()
setAtomGroups(List)
,
getAtomLength()
,
getSeqResGroups()
void setAtomGroups(List<Group> groups)
groups
- a List object representing the Groups of this Chain.getAtomGroups()
List<Group> getAtomGroups(GroupType type)
GroupType.AMINOACID
,
GroupType.HETATM
or GroupType.NUCLEOTIDE
.
Note that if a standard aminoacid appears as a HETATM (because it is part of a ligand) then
it is still considered as GroupType.AMINOACID
and not as GroupType.HETATM
.type
- GroupTypesetAtomGroups(List)
Group getGroupByPDB(ResidueNumber resNum) throws StructureException
resNum
- the PDB residue number of the groupStructureException
Group[] getGroupsByPDB(ResidueNumber pdbresnumStart, ResidueNumber pdbresnumEnd) throws StructureException
pdbresnumStart
- PDB residue number of start. If null, defaults to the chain start.pdbresnumEnd
- PDB residue number of end. If null, defaults to the chain end.StructureException
Group[] getGroupsByPDB(ResidueNumber pdbresnumStart, ResidueNumber pdbresnumEnd, boolean ignoreMissing) throws StructureException
pdbresnumStart
- PDB residue number of start. If null, defaults to the chain start.pdbresnumEnd
- PDB residue number of end. If null, defaults to the chain end.ignoreMissing
- ignore missing groups in this range.StructureException
int getAtomLength()
getAtomGroup(int)
,
getAtomGroups()
,
#getSeqResLength())
int getSeqResLength()
getSeqResGroup(int)
,
getSeqResGroups()
,
getAtomLength()
void setEntityInfo(EntityInfo entityInfo)
entityInfo
- the EntityInfogetEntityInfo()
EntityInfo getEntityInfo()
setEntityInfo(EntityInfo)
@Deprecated void setChainID(String asymId)
setId(String asymId)
insteadasymId
- a String specifying the name valuegetChainID()
@Deprecated String getChainID()
setChainID(String)
String getInternalChainID()
getId()
insteadvoid setInternalChainID(String internalChainID)
#setId()
insteadinternalChainID
- Sequence<?> getBJSequence()
String getAtomSequence()
getSeqResSequence()
String getSeqResSequence()
getAtomSequence()
void setSwissprotId(String sp_id)
sp_id
- a String specifying the swissprot id valuegetSwissprotId()
String getSwissprotId()
setSwissprotId(String sp_id)
List<Group> getSeqResGroups(GroupType type)
GroupType.AMINOACID
,
GroupType.HETATM
or GroupType.NUCLEOTIDE
.type
- a GroupTypesetSeqResGroups(List)
List<Group> getSeqResGroups()
setSeqResGroups(List)
,
getSeqResLength()
,
getAtomGroups()
void setSeqResGroups(List<Group> seqResGroups)
seqResGroups
- a List of Group objects that from the SEQRES groups of this chain.getSeqResGroups()
@Deprecated void setParent(Structure parent)
parent
- the parent Structure object for this ChaingetStructure()
void setStructure(Structure parent)
parent
- @Deprecated Structure getParent()
setStructure(Structure)
Structure getStructure()
setStructure(Structure)
@Deprecated List<Group> getAtomLigands()
FileParsingParameters#setLoadChemCompInfo(boolean)
has not been set to true.
Otherwise the Ligands could not correctly be identified.void setSeqMisMatches(List<SeqMisMatch> seqMisMatches)
seqMisMatches
- List<SeqMisMatch> getSeqMisMatches()
EntityType getEntityType()
EntityType
boolean isWaterOnly()
boolean isPureNonPolymer()
GroupType getPredominantGroupType()
GroupType
for a given Chain, following these
rules: GroupType
to total non-water residues is above the threshold
, then that GroupType
is
returnedGroupType
that is above the
threshold then the GroupType
with most members is chosen, logging
it
See also ChemComp.getPolymerType()
and
ChemComp.getResidueType()
which follow the PDB chemical component
dictionary and provide a much more accurate description of groups and
their linking.
boolean isProtein()
getPredominantGroupType()
boolean isNucleicAcid()
getPredominantGroupType()
Copyright © 2000–2018 BioJava. All rights reserved.