Skip to content

Commit 67f8d2a

Browse files
Rhollandandreasprlic
authored andcommitted
/* FASTA */
1 parent a3c8940 commit 67f8d2a

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

wiki/BioJava3:HowTo.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ simpler for the most common use-cases.
161161
`   FASTA fasta = parser.next(); `
162162
`   // fasta contains a complete FASTA record.`
163163
` }`
164-
` reader.close();`
164+
` parser.close();`
165165

166166
### Converting the FASTA sequence into DNA sequence
167167

@@ -177,12 +177,13 @@ simpler for the most common use-cases.
177177

178178
` ThingParser`<FASTA>` parser = ThingParserFactory.`
179179
`   getWriteParser(FASTA.format, new File("/path/to/my/fasta.fa"), fasta);`
180-
` parser.parseAll();`
180+
` parser.parseAll();`
181+
` parser.close();`
181182

182183
### Writing a FASTA file (the hard way)
183184

184185
` FASTAEmitter emitter = new FASTAEmitter(fasta);`
185186
` FASTAWriter writer = new FASTAFileWriter(new File("/path/to/new/fasta.fa"));`
186187
` ThingParser`<FASTA>` parser = new ThingParser`<FASTA>`(emitter, writer);`
187188
` parser.parseAll();`
188-
` writer.close();`
189+
` parser.close();`

wiki/BioJava3:HowTo.mediawiki

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Convenience wrapper classes are provided to make the parsing process simpler for
145145
FASTA fasta = parser.next();
146146
// fasta contains a complete FASTA record.
147147
}
148-
reader.close();
148+
parser.close();
149149
150150
=== Converting the FASTA sequence into DNA sequence ===
151151

@@ -162,11 +162,12 @@ Convenience wrapper classes are provided to make the parsing process simpler for
162162
ThingParser<FASTA> parser = ThingParserFactory.
163163
getWriteParser(FASTA.format, new File("/path/to/my/fasta.fa"), fasta);
164164
parser.parseAll();
165+
parser.close();
165166
166167
=== Writing a FASTA file (the hard way) ===
167168

168169
FASTAEmitter emitter = new FASTAEmitter(fasta);
169170
FASTAWriter writer = new FASTAFileWriter(new File("/path/to/new/fasta.fa"));
170171
ThingParser<FASTA> parser = new ThingParser<FASTA>(emitter, writer);
171172
parser.parseAll();
172-
writer.close();
173+
parser.close();

0 commit comments

Comments
 (0)