Skip to content

Commit c7d3dfe

Browse files
Seekerandreasprlic
authored andcommitted
/* I've noticed some misprints in BioJavaX Documentation and in the source code. */
1 parent 78a429d commit c7d3dfe

2 files changed

Lines changed: 46 additions & 1 deletion

File tree

wiki/User_talk:Seeker.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ the following text fragment:
5959
...
6060
`
6161

62+
I used the followng code to get values of notes **/function**, **/note**
63+
and **/translation** of the FEATURE Field:
64+
6265
<java>
6366

6467
RichSequenceIterator seqs = RichSequence.IOTools.readGenbankDNA(br, ns);
@@ -69,6 +72,8 @@ Iterator fsit = seq.getFeatureSet().iterator(); RichFeature rf =
6972

7073
Set noteSet = rf.getNoteSet(); Iterator nit = noteSet.iterator();
7174

75+
String function = "", note = "";
76+
7277
while (nit.hasNext()) {
7378

7479
` if (fType.equals("CDS")) {`
@@ -81,7 +86,26 @@ while (nit.hasNext()) {
8186

8287
`     note = sn.getValue();`
8388
`     System.out.println("Note:\n" + note);`
89+
`   } else if (snTermName.equals("translation")) {`
90+
91+
`     translation = sn.getValue();`
92+
`     System.out.println("Translation:\n" + translation);`
8493
`   }`
8594
` }`
8695

8796
} </java>
97+
98+
The output was as follows:
99+
100+
<code>
101+
102+
`Function:`
103+
`4-diphosphocytidyl-2-C-methyl-D-erythritol`
104+
`kinase`
105+
`Note:`
106+
`catalyzes the phosphorylation of`
107+
`4-diphosphocytidyl-2-C-methyl-D-erythritol in the`
108+
`nonmevalonate pathway of isoprenoid biosynthesis`
109+
`Translation:   MRILEKAPAKINLSLDVTRKRPDGYHEVEMIMTTIDLADRIELTELAEDEVRVSSHNRFVPDDQRNLAYQAAKLIKDRYNVKKGVSIMITKVIPVAAGLAGGSSDAAATLRGLNRLWNLNLSAETLAELGAEIGSDVSFCVYGGTALATGRGEKIKHISTPPHCWVILAKPTIGVSTAEVYRALKLDGIEHPDVQGMIEAIEEKSFQKMCSRLGNVLESVTLDMHPEVAMIKNQMKRFGADAVLMSGSGPTVFGLVQYESKVQRIYNGLRGFCDQVYAVRMIGEQNALD`
110+
111+
\<\\code\>

wiki/User_talk:Seeker.mediawiki

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ Iwas working with sequence file in GenBank format. This file contained the follo
4343
...
4444
</code>
4545

46+
I used the followng code to get values of notes '''/function''', '''/note''' and '''/translation''' of the FEATURE Field:
47+
4648
<java>
4749

4850
RichSequenceIterator seqs = RichSequence.IOTools.readGenbankDNA(br, ns);
@@ -54,6 +56,8 @@ RichFeature rf = (RichFeature) fsit.next();
5456
Set noteSet = rf.getNoteSet();
5557
Iterator nit = noteSet.iterator();
5658

59+
String function = "", note = "";
60+
5761
while (nit.hasNext()) {
5862

5963
if (fType.equals("CDS")) {
@@ -66,7 +70,24 @@ while (nit.hasNext()) {
6670
6771
note = sn.getValue();
6872
System.out.println("Note:\n" + note);
73+
} else if (snTermName.equals("translation")) {
74+
75+
translation = sn.getValue();
76+
System.out.println("Translation:\n" + translation);
6977
}
7078
}
7179
}
72-
</java>
80+
</java>
81+
82+
The output was as follows:
83+
84+
<code>
85+
Function:
86+
4-diphosphocytidyl-2-C-methyl-D-erythritol
87+
kinase
88+
Note:
89+
catalyzes the phosphorylation of
90+
4-diphosphocytidyl-2-C-methyl-D-erythritol in the
91+
nonmevalonate pathway of isoprenoid biosynthesis
92+
Translation: MRILEKAPAKINLSLDVTRKRPDGYHEVEMIMTTIDLADRIELTELAEDEVRVSSHNRFVPDDQRNLAYQAAKLIKDRYNVKKGVSIMITKVIPVAAGLAGGSSDAAATLRGLNRLWNLNLSAETLAELGAEIGSDVSFCVYGGTALATGRGEKIKHISTPPHCWVILAKPTIGVSTAEVYRALKLDGIEHPDVQGMIEAIEEKSFQKMCSRLGNVLESVTLDMHPEVAMIKNQMKRFGADAVLMSGSGPTVFGLVQYESKVQRIYNGLRGFCDQVYAVRMIGEQNALD
93+
<\code>

0 commit comments

Comments
 (0)