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.1.tar.gz (11.1 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.1-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wormimtools-0.3.1.tar.gz
  • Upload date:
  • Size: 11.1 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.1.tar.gz
Algorithm Hash digest
SHA256 666ec3ef1c02b534d99d6c933c16958e269ed3e7930ff8463714c2a5330694da
MD5 90175f00c88704ed9949f8ef1d5cd5c9
BLAKE2b-256 a04174b939e7ed75d062adc7128c0c4d8789622bd918794d0a33e8275bf6f634

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wormimtools-0.3.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c76c4461baf573c8911c44b0984c2f9425b6cd7c7b61df13b7baee1632e2a732
MD5 2fe0d0374877f841c19b0cf4381adec8
BLAKE2b-256 d24ceae23585f8fa49cdc63fef0ebace6a2d07b9809ce64fb0953ac110b5477d

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