File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
6467RichSequenceIterator seqs = RichSequence.IOTools.readGenbankDNA(br, ns);
@@ -69,6 +72,8 @@ Iterator fsit = seq.getFeatureSet().iterator(); RichFeature rf =
6972
7073Set noteSet = rf.getNoteSet(); Iterator nit = noteSet.iterator();
7174
75+ String function = "", note = "";
76+
7277while (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\>
Original file line number Diff line number Diff 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
4850RichSequenceIterator seqs = RichSequence.IOTools.readGenbankDNA(br, ns);
@@ -54,6 +56,8 @@ RichFeature rf = (RichFeature) fsit.next();
5456Set noteSet = rf.getNoteSet();
5557Iterator nit = noteSet.iterator();
5658
59+ String function = "", note = "";
60+
5761while (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>
You can’t perform that action at this time.
0 commit comments