-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathBioJava:CookBook3:AddProtMod.html
More file actions
105 lines (83 loc) · 4.23 KB
/
BioJava:CookBook3:AddProtMod.html
File metadata and controls
105 lines (83 loc) · 4.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<h2 id="how-can-i-define-a-new-protein-modification">How can I define a new protein modification?</h2>
<p>The protmod module automatically loads <a href="BioJava:CookBook3:SupportedProtMod" title="wikilink">a list of protein
modifications</a> into the
protein modification registry. In case you have a protein modification
that is not preloaded, it is possible to define it by yourself and add
it into the registry.</p>
<h2 id="example-define-and-register-disulfide-bond-in-java-code">Example: define and register disulfide bond in Java code</h2>
<java> // define the involved components, in this case two cystines
(CYS) List<component> components = new ArrayList<component>(2);
components.add(Component.of("CYS"));
components.add(Component.of("CYS"));
// define the atom linkages between the components, in this case the SG
atoms on both CYS groups ModificationLinkage linkage = new
ModificationLinkage(components, 0, "SG", 1, "SG");
// define the modification condition, i.e. what components are involved
and what atoms are linked between them ModificationCondition condition =
new ModificationConditionImpl(components,
Collections.singletonList(linkage));
// build a modification ProteinModification mod =
` new ProteinModificationImpl.Builder("0018_test", `
` ModificationCategory.CROSS_LINK_2,`
` ModificationOccurrenceType.NATURAL,`
` condition)`
` .setDescription("A protein modification that effectively cross-links two L-cysteine residues to form L-cystine.")`
` .setFormula("C 6 H 8 N 2 O 2 S 2")`
` .setResidId("AA0025")`
` .setResidName("L-cystine")`
` .setPsimodId("MOD:00034")`
` .setPsimodName("L-cystine (cross-link)")`
` .setSystematicName("(R,R)-3,3'-disulfane-1,2-diylbis(2-aminopropanoic acid)")`
` .addKeyword("disulfide bond")`
` .addKeyword("redox-active center")`
` .build();`
//register the modification ProteinModificationRegistry.register(mod);
Example: definedisulfide bond in XML file and register by Java code
-------------------------------------------------------------------
<xml> <proteinmodifications>
` `<entry>
` `<id>`0018`</id>
` `<description>`A protein modification that effectively cross-links two L-cysteine residues to form L-cystine.`</description>
` `<systematicname>`(R,R)-3,3'-disulfane-1,2-diylbis(2-aminopropanoic acid)`</systematicname>
` `<crossreference>
` `
RESID
` `<id>`AA0025`</id>
` `<name>`L-cystine`</name>
` `</crossreference>
` `<crossreference>
` `
PSI-MOD
` `<id>`MOD:00034`</id>
` `<name>`L-cystine (cross-link)`</name>
` `</crossreference>
` `<condition>
` `<component component="1">
` `<id source="PDBCC">`CYS`</id>
` `</component>
` `<component component="2">
` `<id source="PDBCC">`CYS`</id>
` `</component>
` `<bond>
` `<atom component="1">`SG`</atom>
` `<atom component="2">`SG`</atom>
` `</bond>
` `</condition>
` `<occurrence>`natural`</occurrence>
` `<category>`crosslink2`</category>
` `<keyword>`redox-active center`</keyword>
` `<keyword>`disulfide bond`</keyword>
` `</entry>
</proteinmodifications> </xml>
<java> FileInputStream fis = new FileInputStream("path/to/file");
ProteinModificationXmlReader.registerProteinModificationFromXml(fis);
</java>
See also
--------
<div style="-moz-column-count:3; column-count:3;">
- [How can I identify protein modifications in a
structure?](BioJava:CookBook3:ProtMod "wikilink")
- [How can I get the list of supported protein
modifications?](BioJava:CookBook3:SupportedProtMod "wikilink")
</div>
</component></component></java>