public class ChainImpl extends Object implements Chain
GroupType
constants.Constructor and Description |
---|
ChainImpl()
Constructs a ChainImpl object.
|
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()
Gets all groups that are not polymer groups and that are not solvent 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()
Gets the 'private' asymId of this chain.
|
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 start,
ResidueNumber end)
Get all groups that are located between two PDB residue numbers.
|
Group[] |
getGroupsByPDB(ResidueNumber start,
ResidueNumber end,
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()
If available, returns the internal chain ID that is used in mmCIF files (asym_id), otherwise null
|
String |
getName()
Get the 'public' authId (chain ID in PDB file)
|
Structure |
getParent()
Deprecated.
use getStructure 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 |
getSeqResOneLetterSeq()
Get the one letter sequence so that Sequence is guaranteed to
be the same length as seqResGroups.
|
String |
getSeqResSequence()
Returns the PDB SEQRES sequence as a one-letter sequence string.
|
Structure |
getStructure()
Returns the parent Structure of this chain.
|
String |
getSwissprotId()
get the Swissprot id of this chains .
|
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)
Sets the 'private' asymId of this chain (Chain id in PDB file ).
|
void |
setEntityInfo(EntityInfo mol)
Sets the Entity information
|
void |
setId(String asymId)
Set the 'private' asymId (internal chain IDs in mmCif) for this chain.
|
void |
setInternalChainID(String internalChainID)
Sets the internal chain ID that is used in mmCif files
|
void |
setName(String authId)
Set the 'public' authId (chain ID in PDB file)
|
void |
setParent(Structure parent)
Deprecated.
|
void |
setSeqMisMatches(List<SeqMisMatch> seqMisMatches)
Sets annotated sequence mismatches for this chain.
|
void |
setSeqResGroups(List<Group> groups)
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)
set the Swissprot id of this chains .
|
String |
toMMCIF()
Convert this Chain to a String in mmCIF format
|
String |
toPDB()
Convert this Chain to a String in PDB format
|
String |
toString()
String representation.
|
public ChainImpl()
public String getId()
getId
in interface Chain
Chain.setId(String)
,
Chain.getName()
public void setId(String asymId)
public String getName()
getName
in interface Chain
Chain.getId()
public void setName(String authId)
setName
in interface Chain
authId
- the 'public' authId (chain ID in PDB file)Chain.getId()
@Deprecated public void setParent(Structure parent)
setParent
in interface Chain
parent
- the parent Structure object for this ChainChain.getStructure()
public void setStructure(Structure parent)
setStructure
in interface Chain
public Structure getStructure()
getStructure
in interface Chain
Chain.setStructure(Structure)
@Deprecated public Structure getParent()
getParent
in interface Chain
Chain.setStructure(Structure)
public void setEntityInfo(EntityInfo mol)
setEntityInfo
in interface Chain
mol
- the EntityInfoChain.getEntityInfo()
public EntityInfo getEntityInfo()
getEntityInfo
in interface Chain
Chain.setEntityInfo(EntityInfo)
public void setSwissprotId(String sp_id)
setSwissprotId
in interface Chain
sp_id
- a String specifying the swissprot id valuegetSwissprotId()
public String getSwissprotId()
getSwissprotId
in interface Chain
setSwissprotId(java.lang.String)
public void addGroup(Group group)
public Group getAtomGroup(int position)
getAtomGroup
in interface Chain
position
- an intChain.getAtomLength()
,
Chain.getAtomGroups()
,
Chain.getSeqResGroup(int)
public 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
.getAtomGroups
in interface Chain
type
- GroupTypeChain.setAtomGroups(List)
public List<Group> getAtomGroups()
getAtomGroups
in interface Chain
Chain.setAtomGroups(List)
,
Chain.getAtomLength()
,
Chain.getSeqResGroups()
public void setAtomGroups(List<Group> groups)
setAtomGroups
in interface Chain
groups
- a List object representing the Groups of this Chain.Chain.getAtomGroups()
public Group[] getGroupsByPDB(ResidueNumber start, ResidueNumber end, boolean ignoreMissing) throws StructureException
Chain
getGroupsByPDB
in interface Chain
start
- PDB residue number of start. If null, defaults to the chain start.end
- PDB residue number of end. If null, defaults to the chain end.ignoreMissing
- ignore missing groups in this range.StructureException
public Group getGroupByPDB(ResidueNumber resNum) throws StructureException
getGroupByPDB
in interface Chain
resNum
- the PDB residue number of the groupStructureException
public Group[] getGroupsByPDB(ResidueNumber start, ResidueNumber end) throws StructureException
getGroupsByPDB
in interface Chain
start
- PDB residue number of start. If null, defaults to the chain start.end
- PDB residue number of end. If null, defaults to the chain end.StructureException
public int getSeqResLength()
getSeqResLength
in interface Chain
Chain.getSeqResGroup(int)
,
Chain.getSeqResGroups()
,
Chain.getAtomLength()
public void setChainID(String asymId)
setChainID
in interface Chain
asymId
- a String specifying the name valueChain.getChainID()
public String getChainID()
getChainID
in interface Chain
Chain.setChainID(String)
public Sequence<?> getBJSequence()
getBJSequence
in interface Chain
public String getAtomSequence()
getAtomSequence
in interface Chain
Chain.getSeqResSequence()
public String getSeqResSequence()
getSeqResSequence
in interface Chain
Chain.getAtomSequence()
public String getSeqResOneLetterSeq()
public Group getSeqResGroup(int position)
getSeqResGroup
in interface Chain
position
- an intChain.getSeqResLength()
,
Chain.getSeqResGroups()
,
Chain.getAtomGroup(int)
public List<Group> getSeqResGroups(GroupType type)
GroupType.AMINOACID
,
GroupType.HETATM
or GroupType.NUCLEOTIDE
.getSeqResGroups
in interface Chain
type
- a GroupTypeChain.setSeqResGroups(List)
public List<Group> getSeqResGroups()
getSeqResGroups
in interface Chain
Chain.setSeqResGroups(List)
,
Chain.getSeqResLength()
,
Chain.getAtomGroups()
public void setSeqResGroups(List<Group> groups)
setSeqResGroups
in interface Chain
groups
- a List of Group objects that from the SEQRES groups of this chain.Chain.getSeqResGroups()
public int getAtomLength()
getAtomLength
in interface Chain
Chain.getAtomGroup(int)
,
Chain.getAtomGroups()
,
#getSeqResLength())
public List<Group> getAtomLigands()
FileParsingParameters#setLoadChemCompInfo(boolean)
has not been set to true.
Otherwise the Ligands could not correctly be identified.getAtomLigands
in interface Chain
public String getInternalChainID()
Chain
getInternalChainID
in interface Chain
public void setInternalChainID(String internalChainID)
Chain
setInternalChainID
in interface Chain
public String toPDB()
Chain
public String toMMCIF()
Chain
public void setSeqMisMatches(List<SeqMisMatch> seqMisMatches)
Chain
setSeqMisMatches
in interface Chain
public List<SeqMisMatch> getSeqMisMatches()
Chain
getSeqMisMatches
in interface Chain
public EntityType getEntityType()
Chain
getEntityType
in interface Chain
EntityType
public boolean isWaterOnly()
Chain
isWaterOnly
in interface Chain
public boolean isPureNonPolymer()
Chain
isPureNonPolymer
in interface Chain
public GroupType getPredominantGroupType()
Chain
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.
getPredominantGroupType
in interface Chain
public boolean isProtein()
Chain
isProtein
in interface Chain
Chain.getPredominantGroupType()
public boolean isNucleicAcid()
Chain
isNucleicAcid
in interface Chain
Chain.getPredominantGroupType()
Copyright © 2000–2018 BioJava. All rights reserved.