Skip to content

Commit

Permalink
Don't leave open handles (important on Jython on Windows)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjc committed Nov 11, 2010
1 parent 936ea5f commit 8a90050
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Bio/SeqIO/QualityIO.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"fastq" as the format name:
>>> from Bio import SeqIO
>>> for record in SeqIO.parse(open("Quality/example.fastq"), "fastq"):
>>> for record in SeqIO.parse("Quality/example.fastq", "fastq"):
... print record.id, record.seq
EAS54_6_R1_2_1_413_324 CCCTTCTTGTCTTCAGCGTTTCTCC
EAS54_6_R1_2_1_540_792 TTGGCAGGCCAAGGCCGATGGATCA
Expand Down Expand Up @@ -192,7 +192,7 @@
If you wanted to, you could read in this FASTQ file, and save it as a QUAL file:
>>> from Bio import SeqIO
>>> record_iterator = SeqIO.parse(open("Quality/example.fastq"), "fastq")
>>> record_iterator = SeqIO.parse("Quality/example.fastq", "fastq")
>>> out_handle = open("Quality/temp.qual", "w")
>>> SeqIO.write(record_iterator, out_handle, "qual")
3
Expand All @@ -201,7 +201,7 @@
You can of course read in a QUAL file, such as the one we just created:
>>> from Bio import SeqIO
>>> for record in SeqIO.parse(open("Quality/temp.qual"), "qual"):
>>> for record in SeqIO.parse("Quality/temp.qual", "qual"):
... print record.id, record.seq
EAS54_6_R1_2_1_413_324 ?????????????????????????
EAS54_6_R1_2_1_540_792 ?????????????????????????
Expand Down

0 comments on commit 8a90050

Please sign in to comment.