Installation
By default, pydna is installed with minimal dependencies, but there are optional dependencies for additional functionality.
Optional dependencies
Click here to see optional dependencies
clipboard
Enables the pydna.dseqrecord.Dseqrecord.copy_gb_to_clipboard()
and pydna.dseqrecord.Dseqrecord.copy_fasta_to_clipboard()
These methods will put a copy the sequence on the clipboard in either Genbank (gb) or fasta format.
Dependency |
Function in pydna |
---|---|
copy sequence to clipboard |
download
Pyparsing enables the pydna.genbankfixer.gbtext_clean()
function that can automatically
correct malformed sequence files in Genbank format. These are often found online, so this
option also installs requests to enable the pydna.genbankfixer.download.download_text()
function which can be used to get cleaned up text from a URL.
Dependency |
Function in pydna |
---|---|
fix corrupt Genbank files with pydna.genbankfixer |
|
download sequences with pydna.download |
express
This option enables the pydna.utils.cai()
function and the cai()
method
available from subclasses of pydna.seqrecord.SeqRecord
, such as
pydna.dseqrecord.Dseqrecord
.
| cai2 | codon adaptation index calculations in several modules |
gel
Scipy, matplotlib and pillow (PIL) enable the generation of gel images. Numpy is also needed, but usually installed as a dependency of biopython.
Dependency |
Function in pydna |
---|---|
gel simulation with pydna.gel |
|
“ |
|
“ |
Installing with pip 🐍
# use the `--pre` flag to get the latest version of pydna.
pip install --pre --upgrade pydna
# to install the optional dependencies, you can use the following command:
pip install --pre --upgrade pydna[clipboard,download,express,gel]
Remove options inside the square brackets as required, but be sure not to leave spaces as pip will not recognize the options. See below under “Optional dependencies”.
Installing with poetry 🧙♂️
If your project uses poetry to manage dependencies, you can install pydna with the following commands:
# Basic installation
poetry add pydna
# With optional dependencies (ommit the options you don't want)
poetry add pydna --extras "clipboard download express gel"
# If you already have it installed and you want to add or remove optional
# dependencies, you have to uninstall and install again
poetry remove pydna
poetry add pydna --extras "express gel"