Skip to content

Latest commit

History

History
95 lines (73 loc) 路 3.35 KB

File metadata and controls

95 lines (73 loc) 路 3.35 KB
title BioJava:CookBook3:ModFinder
permalink wiki/BioJava%3ACookBook3%3AModFinder

How can I identify protein modifications in a structure?

BioJava provide a module biojava3-modfinder for identification of protein pre-, co-, and post-translational modifications from structures. A list of protein modifications has been pre-loaded. It is possible to identify all pre-loaded modifications or part of them.

Example: identify and print all preloaded modifications from a structure

Set<ModifiedCompound> identifyAllModfications(Structure struc) {

聽聽聽ProteinModificationIdentifierparser聽=聽newProteinModificationIdentifier();
聽聽聽parser.identify(struc);
聽聽聽Set`<ModifiedCompound> mcs聽=聽parser.getIdentifiedModifiedCompound();
聽聽聽returnmcs;

}

Example: identify phosphorylation sites in a structure

 聽聽List`<ResidueNumber> phosphosites聽=聽newArrayList`<ResidueNumber>`();  
 聽聽ProteinModificationIdentifierparser聽=聽newProteinModificationIdentifier();  
 聽聽parser.identify(struc,聽ProteinModificationRegistry.getByKeyword("phosphoprotein"));  
 聽聽Set`<ModifiedCompound> mcs聽=聽parser.getIdentifiedModifiedCompound();  
 聽聽for聽(ModifiedCompoundmc聽:聽mcs)聽{`  
 聽聽聽聽聽聽Set`<StructureGroup> groups聽=聽mc.getGroups(true);  
 聽聽聽聽聽聽for聽(StructureGroupgroup聽:聽groups)聽{`  
 聽聽聽聽聽聽聽聽聽聽phosphosites.add(group.getPDBResidueNumber());  
 聽聽聽聽聽聽}`  
 聽聽}`  
 聽聽returnphosphosites;

} ```

Demo code to run the above methods
----------------------------------

```java import org.biojava.nbio.structure.ResidueNumber; import
org.biojava.nbio.structure.Structure; import
org.biojava.nbio.structure.io.PDBFileReader; import
org.biojava.nbio.protmod.structure.ProteinModificationIdentifier;

public static void main(String[] args) {

 聽聽try聽{`  
 聽聽聽聽聽聽PDBFileReaderreader聽=聽newPDBFileReader();  
 聽聽聽聽聽聽reader.setAutoFetch(true);

 聽聽聽聽聽聽//聽identify聽all聽modificaitons聽from聽PDB:1CAD聽and聽print聽them`  
 聽聽聽聽聽聽StringpdbId聽=聽"1CAD";  
 聽聽聽聽聽聽Structurestruc聽=聽reader.getStructureById(pdbId);  
 聽聽聽聽聽聽Set`<ModifiedCompound> mcs聽=聽identifyAllModfications(struc);  
 聽聽聽聽聽聽for聽(ModifiedCompoundmc聽:聽mcs)聽{`  
 聽聽聽聽聽聽聽聽聽聽System.out.println(mc.toString());  
 聽聽聽聽聽聽}`

 聽聽聽聽聽聽//聽identify聽all聽phosphosites聽from聽PDB:3MVJ聽and聽print聽them`  
 聽聽聽聽聽聽pdbId聽=聽"3MVJ";  
 聽聽聽聽聽聽struc聽=聽reader.getStructureById(pdbId);  
 聽聽聽聽聽聽List`<ResidueNumber> psites聽=聽identifyPhosphosites(struc);  
 聽聽聽聽聽聽for聽(ResidueNumberpsite聽:聽psites)聽{`  
 聽聽聽聽聽聽聽聽聽聽System.out.println(psite.toString());  
 聽聽聽聽聽聽}`  
 聽聽}聽catch(Exceptione)聽{`  
 聽聽聽聽聽聽e.printStackTrace();  
 聽聽}`

} ```

See also
--------

<div style="-moz-column-count:3; column-count:3;">
-   [How can I get the list of supported protein
    modifications?](/wiki/BioJava:CookBook3:SupportedProtMod "wikilink")
-   [How can I define a new protein
    modification?](/wiki/BioJava:CookBook3:AddProtMod "wikilink")

</div>