Skip to main content

smtools

Single Molecule analysis Tools

This package contains tools analysis package of the Redding Lab, at the University of Cailfornia, San Francisco.

Dependencies

  • numpy

  • scipy

  • scikit-image

  • matplotlib

Installation

The easiest way to install the package is via pip:

$ pip install smtools

Documentation

Documentation: https://smtools.readthedocs.io/en/latest/

Usage

The smtools.algnment module is designed to align images split into separate channels. It relies on using fluorescent particles that appear on both channels. When executed, the following code will yield the image output below.

import smtools.testdata as test
import smtools.alignment as al
import matplotlib.pyplot as plt
dx, dy, params = al.inspect_global_fit(test.image_stack(), showplot=False)
im = test.image_stack()[0]
im_old = al.overlay(im)
im_adj_image = al.align_by_offset(im,dx,dy)
im_new = al.overlay(im_adj_image)
fig = plt.figure(figsize=(12,12))
ax1 = fig.add_subplot(211)
ax2 = fig.add_subplot(212,sharex=ax1)
ax1.set_title('Original Image', fontsize = "18")
ax2.set_title('Aligned Image', fontsize = "18")
ax1.imshow(im_old)
ax2.imshow(im_new)
plt.show()

The smtools.curtains module is designed to locate individual DNA molecules within a DNA curtain.

import smtools.curtains as cs
import smtools.alignment as al
from scipy.ndimage.interpolation import rotate
import matplotlib.pyplot as plt
import smtools.testdata as test
im = test.test_curtain()
ch1,ch2 = al.im_split(im)
angle = cs.find_rotang(ch2)
rotated_ch2 = rotate(ch2,angle)
bounds, mask = cs.find_curtain(rotated_ch2)
strands = cs.find_DNA(rotated_ch2,bounds)
DNAs = cs.fit_DNA(rotated_ch2, strands)
fig = plt.figure(figsize=(5,10))
plt.axis('off')
plt.imshow(rotated_ch2)
for x0,x1,y in DNAs:
    plt.plot([x0,x1],[y,y],"r.", markersize = 5)
plt.show()

Version History

  • 0.1.0 Initial release with alignment, point_fitting modules

  • 0.2.0 Included curtains and misc modules

References

Metadata

Release files for smtools 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for smtools 0.2.2
File Interpreter ABI Platform
smtools-0.2.2-py3-none-any.whl Python 3 none any Details

Release files / smtools-0.2.2-py3-none-any.whl

Download URL smtools-0.2.2-py3-none-any.whl
Size 5.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
4691bcfe8942071630fa42a0047db5eebae0658efe31a6827251bfb84556c457
BLAKE2b-256 checksum
How to use checksums
5f3849b403dbb5e951e18485c3bb3109994d7439db002f994c16e8c95557ffee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/38.4.0 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.6.4

Release history Release notifications | RSS feed

This release

0.2.2 This release

1 release file

0.2.1

1 release file

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page