Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Biopython
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Input and output === Biopython can read and write to a number of common sequence formats, including [[FASTA format|FASTA]], [[FASTQ format|FASTQ]], GenBank, Clustal, PHYLIP and [[Nexus file|NEXUS]]. When reading files, descriptive information in the file is used to populate the members of Biopython classes, such as <code>SeqRecord</code>. This allows records of one file format to be converted into others. Very large sequence files can exceed a computer's memory resources, so Biopython provides various options for accessing records in large files. They can be loaded entirely into memory in Python data structures, such as lists or [[Associative array|dictionaries]], providing fast access at the cost of memory usage. Alternatively, the files can be read from disk as needed, with slower performance but lower memory requirements. <syntaxhighlight lang="pycon"> >>> # This script loads a file containing multiple sequences and saves each one in a different format. >>> from Bio import SeqIO >>> genomes = SeqIO.parse("salmonella.gb", "genbank") >>> for genome in genomes: ... SeqIO.write(genome, genome.id + ".fasta", "fasta") </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)