Skip to main content

Functions to ease using pydna interactively

Project description

icon

pydna-utils is a package containing utilities for pydna facilitating interactive use.

Install:

pip install pydna-utils

pydna_utils creates a settings file where links to useful data can be placed. The platformdirs package is used to decide where this file should be located. On my machine this is located at /home/bjorn/.config/pydna/pydna_config.toml.

16:16 $ ipython
Python 3.12.7 (main, Nov 18 2024, 08:24:06) [GCC 11.4.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 9.6.0 -- An enhanced Interactive Python. Type '?' for help.
Tip: You can use `files = !ls *.png`

In [1]: import pydna_utils

In [2]: pydna_utils.get_env()
Out[2]: 
+---------------+-----------------------------------------+
| Setting       | Value                                   |
+---------------+-----------------------------------------+
| pydna_ape_url | /usr/bin/tclsh /home/bjorn/.ApE/ApE.tcl |
| pydna_enzymes | /home/bjorn/.ApE/Enzymes/LGM_group.txt  |
| pydna_primers | /home/bjorn/myvault/PRIMERS.md          |
+---------------+-----------------------------------------+

In [3]: !tail -9 /home/bjorn/myvault/PRIMERS.md # This file contain primer sequences in a format that pydna can understand.

>2_3CYC1clon
CGATGTCGACTTAGATCTCACAGGCTTTTTTCAAG

>1_5CYC1clone
GATCGGCCGGATCCAAATGACTGAATTCAAGGCCG

>0_S1 67bp primer for amplification of GFP from pFA6a-GFPS65T-kanMX6. The last 21 bp are specific for the GFP gene in pFA6a-GFPS65T-kanMX6. The rest is homology with the 3'part of ScJEN1. This primer was used for tagging the JEN1 with GFP on the chromosome.
GATTCGAACGTCTCAAAGACATATGAGGAGCATATTGAGACCGTTAGTAAAGGAGAAGAACTTTTC

In [4]: from pydna_utils.myprimers import PrimerList

In [5]: pl = PrimerList()

In [6]: pl[1]
Out[6]: 1_5CYC1clone 35-mer:5'-GATCGGCCGGATCCA..CCG-3'

In [7]: type(pl[1])
Out[7]: pydna.primer.Primer

In [11]: cat /home/bjorn/.ApE/Enzymes/LGM_group.txt  # This text file contain restriction enzymes in an arbitrary format.
LGM {AatII  Acc65I  AflII  AjiI  BamHI  BglI  BglII  Bsp1407I  BspTI  BstXI  BsuRI  CaiI  CciNI  Eco147I  Eco31I  Eco32I  EcoRI  HindIII  KpnI  MluI  MnlI  MssI  NdeI  NotI  PacI  Pfl23II  PstI  PvuII  SacI  SalI  ScaI  SdaI  SgsI  SmaI  SmiI  StuI  XagI  XbaI  XhoI  XmaI  ZraI}

In [12]: from pydna_utils.myenzymes import myenzymes

In [13]: myenzymes
Out[13]: RestrictionBatch(['AatII', 'Acc65I', 'AflII', 'AjiI', 'BamHI', 'BglI', 'BglII', 'Bsp1407I', 'BspTI', 'BstXI', 'BsuRI', 'CaiI', 'CciNI', 'Eco147I', 'Eco31I', 'Eco32I', 'EcoRI', 'HindIII', 'KpnI', 'MluI', 'MnlI', 'MssI', 'NdeI', 'NotI', 'PacI', 'Pfl23II', 'PstI', 'PvuII', 'SacI', 'SalI', 'ScaI', 'SdaI', 'SgsI', 'SmaI', 'SmiI', 'StuI', 'XagI', 'XbaI', 'XhoI', 'XmaI', 'ZraI'])


In [13]: from pydna_utils import open_config_file

In [13]: open_config_file()  # opens the config file for editing in system text editor.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydna_utils-0.0.2.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydna_utils-0.0.2-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file pydna_utils-0.0.2.tar.gz.

File metadata

  • Download URL: pydna_utils-0.0.2.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.7 Linux/6.8.0-85-generic

File hashes

Hashes for pydna_utils-0.0.2.tar.gz
Algorithm Hash digest
SHA256 0b086bcc60fc43d77f1aa689aac7fddbcb54cd0ed310527bbffae8786395fcc1
MD5 a705910332c49f5379564dad32b7e491
BLAKE2b-256 728b77f94e7bb72774ba1914f8555e1bb18d544183e0ab059e2329b17cc2100b

See more details on using hashes here.

File details

Details for the file pydna_utils-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pydna_utils-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.7 Linux/6.8.0-85-generic

File hashes

Hashes for pydna_utils-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e362308cb5d26b794a48b14a9be617a7f677781e485b5646fd863ac2c3506ab2
MD5 a324c64f01f589d10f6619fecf6fefa7
BLAKE2b-256 11a78729870c65f1935717d2b6cc29e53fe9658b342aad80df0c0e390bd5de1b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page