Skip to main content

A short description of my package

Project description

worm-imtools

Installation

This package can be installed through pip using:

pip install wormimtools

This can also be performed using pip within a conda environment if you wish to use conda to install other dependencies.

To upgrade the package through pip, run:

pip install --upgrade wormimtools  

Using worm-imtools

It is highly recommended that this is performed using a jupyter notebook.

Processing

To process a directory like the one created above, import and instantiate a Processor object. The channel_info should be specified as a list of tuples containing your channel names and their indexes (0-based) within the images. You can use up to 4 channels:

from wormimtools import Processor

channel_info = [("{channel 0 name}", 0), ("{channel 1 name}", 1)]

proc = Processor("{path_to_images}", channel_info) 
Additional Args:
Default Values:
group_number = 1  
max_value    = 65535
final_len    = 3500

The Processor class contains 3 key-word arguments which have default values.

group_number is used when multiple groups are contained within a single README. This variable specifies the order of the README. If the group in the directory is second in the README, set this to 2, etc.

max_value is the value that the images are normalized to. It is arbitrary, but it should be set to the max value of the image format (255 for 8bit, 65535 for 16bit, etc.). When performing downstream analysis, the dataset should be normalized to the max value of the entire dataset.

final_len specifies the length all arrays will be interpolated to. It should be set to a value close to the average width of the images to minimize the need for interpolation.

Generating a DataFrame
DataFrame Structure

The generated DataFrame contains the following metadata columns specified in README.txt:

date                            # Date the rep was collected              
strain                          # C. elegans strain used
diet                            # Name of the bacterial diet
temp                            # Temperature worms developed at
rep                             # Rep number
name                            # Relative file name
stage                           # C. elegans developmental stage 
rating                          # Rating of quality of worm
comments                        # Comments given at imaging
ID                              # UUID

It also contains the following data columns for channel i (i = 0,1,2,3):

channel{i}_name                 # Channel i name specified in `channel_info`
channel{i}_arr_vals             # Normalized and interpolated array values
channel{i}_arr_vals_ni          # Normalized array values
channel{i}_arr_vals_raw         # Raw array values

In most cases, the raw array values should be used for downstream analysis.

Barcode Plotting

  1. To create barcode plots of the processed arrays, import and instantiate a BarcodePlotter object:
from wormimtools import BarcodePlotter

plotter = BarcodePlotter()
Single Channel Plotting
data = [["Single Channel"]]    # List of arrays generated by Processor

plotter.plot_barcodes_single(data, save={"save_path"})

The save argument is optional, defaulting to None.

Dual Channel Plotting
data = [[["Channel 0"], ["Channel 1"]]] # List of lists of len=2 with arrays for 2 channels of an image

plotter.plot_barcodes_dual(data)

The save argument is the same as single channel plotting.

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

wormimtools-0.3.2.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

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

wormimtools-0.3.2-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file wormimtools-0.3.2.tar.gz.

File metadata

  • Download URL: wormimtools-0.3.2.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for wormimtools-0.3.2.tar.gz
Algorithm Hash digest
SHA256 23ebf8f7880cabf72c836235eb12ee6f02f36f3146afb8dd6217674ad0e4d367
MD5 00a6f9b8ec708bb7669630f07b536c1e
BLAKE2b-256 58277e79f11e73b6e39bbd2b546d2195b7dca39f0eac994928b1ed05f7ebd06d

See more details on using hashes here.

File details

Details for the file wormimtools-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: wormimtools-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for wormimtools-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5a385ff6a1c344151a2fb5abaa1e16b00c3fccb5f66a119b7d0fe8bd8e356f9b
MD5 6765ac1647bdd759b54162bd3b055443
BLAKE2b-256 bd673affc1b2f4eabe1a92a0d32b83997f88fceb8f7119d89b5bf9e1b9552488

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