Skip to main content

Redding Lab analysis tools

Project description

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

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

smtools-0.2.2-py3-none-any.whl (5.4 MB view details)

Uploaded Python 3

File details

Details for the file smtools-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: smtools-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 5.4 MB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for smtools-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4691bcfe8942071630fa42a0047db5eebae0658efe31a6827251bfb84556c457
MD5 2a7fd2020a2a87026421499f0e4cb9d0
BLAKE2b-256 5f3849b403dbb5e951e18485c3bb3109994d7439db002f994c16e8c95557ffee

See more details on using hashes here.

Supported by

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