pydna.genbank
This module provides a class for downloading sequences from genbank called Genbank and an function that does the same thing called genbank.
The function can be used if the environmental variable pydna_email has
been set to a valid email address. The easiest way to do this permanantly is to edit the
pydna.ini file. See the documentation of pydna.open_config_folder()
- class pydna.genbank.Genbank(users_email: str, *, tool: str = 'pydna')[source]
Bases:
object
Class to facilitate download from genbank. It is easier and quicker to use the
pydna.genbank.genbank()
function directly.- Parameters:
users_email (string) – Has to be a valid email address. You should always tell Genbanks who you are, so that they can contact you.
Examples
>>> from pydna.genbank import Genbank >>> gb=Genbank("bjornjobb@gmail.com") >>> rec = gb.nucleotide("LP002422.1") # <- entry from genbank >>> print(len(rec)) 1
- nucleotide(**kwargs)
- pydna.genbank.genbank(accession: str = 'CS570233.1', *args, **kwargs) GenbankRecord [source]
Download a genbank nuclotide record.
This function takes the same paramenters as the :func:pydna.genbank.Genbank.nucleotide method. The email address stored in the pydna_email environment variable is used. The easiest way set this permanantly is to edit the pydna.ini file. See the documentation of
pydna.open_config_folder()
if no accession is given, a very short Genbank entry is used as an example (see below). This can be useful for testing the connection to Genbank.
Please note that this result is also cached by default by settings in the pydna.ini file. See the documentation of
pydna.open_config_folder()
LOCUS CS570233 14 bp DNA linear PAT 18-MAY-2007 DEFINITION Sequence 6 from Patent WO2007025016. ACCESSION CS570233 VERSION CS570233.1 KEYWORDS . SOURCE synthetic construct ORGANISM synthetic construct other sequences; artificial sequences. REFERENCE 1 AUTHORS Shaw,R.W. and Cottenoir,M. TITLE Inhibition of metallo-beta-lactamase by double-stranded dna JOURNAL Patent: WO 2007025016-A1 6 01-MAR-2007; Texas Tech University System (US) FEATURES Location/Qualifiers source 1..14 /organism="synthetic construct" /mol_type="unassigned DNA" /db_xref="taxon:32630" /note="This is a 14bp aptamer inhibitor." ORIGIN 1 atgttcctac atga //