diff_classifier.knotlets

diff_classifier.knotlets

Test functions to submit tracking jobs to AWS Batch with Cloudknot

diff_classifier.knotlets.assemble_msds(prefix, remote_folder, bucket='nancelab.publicfiles', ires=(512, 512), frames=651, rows=4, cols=4)[source]

Calculates MSDs and features from input trajectory files

A function based on msd.all_msds2 and features.calculate_features, creates msd and feature csv files from input trajectory files and uploads to S3.

prefix : string
Prefix (everything except file extension and folder name) of image file to be tracked. Must be available on S3.
remote_folder : string
Folder name where file is contained on S3 in the bucket specified by ‘bucket’.
bucket : string
S3 bucket where file is contained.
ires : tuple of int
Resolution of split images. Really just a sanity check to make sure you correctly splitting.
frames : int
Number of frames in input videos.
rows : int
Number of rows to split image into.
cols : int
Number of columns to split image into.
diff_classifier.knotlets.split(prefix, remote_folder, bucket='nancelab.publicfiles', rows=4, cols=4, ores=(2048, 2048), ires=(512, 512))[source]

Splits input image file into smaller images.

A function based on imagej.partition_im that download images from an S3 bucket, splits it into smaller images, and uploads these to S3.

Parameters:
prefix : string

Prefix (everything except file extension and folder name) of image file to be tracked. Must be available on S3.

remote_folder : string

Folder name where file is contained on S3 in the bucket specified by ‘bucket’.

bucket : string

S3 bucket where file is contained.

rows : int

Number of rows to split image into.

cols : int

Number of columns to split image into.

ores : tuple of int

Original resolution of input image.

ires : tuple of int

Resolution of split images. Really just a sanity check to make sure you correctly splitting.

diff_classifier.knotlets.split_track_msds(prefix, remote_folder, bucket='nancelab.publicfiles', rows=4, cols=4, ores=(2048, 2048), ires=(512, 512), to_split=False, regress_f='regress.obj', frames=651, tparams={'do_median_filtering': False, 'gap_closing_max_distance': 10.0, 'linking_max_distance': 6.0, 'max_frame_gap': 3, 'median_intensity': 300.0, 'quality': 15.0, 'radius': 3.0, 'snr': 0.0, 'threshold': 0.0, 'track_duration': 20.0, 'xdims': (0, 511), 'ydims': (1, 511)})[source]

Splits images, track particles, and calculates MSDs

A composite function designed to work with Cloudknot to split images, track particles, and calculate MSDs.

Parameters:
prefix : string

Prefix (everything except file extension and folder name) of image file to be tracked. Must be available on S3.

remote_folder : string

Folder name where file is contained on S3 in the bucket specified by ‘bucket’.

bucket : string

S3 bucket where file is contained.

rows : int

Number of rows to split image into.

cols : int

Number of columns to split image into.

ores : tuple of int

Original resolution of input image.

ires : tuple of int

Resolution of split images. Really just a sanity check to make sure you correctly splitting.

to_split : bool

If True, will perform image splitting.

regress_f : string

Name of regress object used to predict quality parameter.

frames : int

Number of frames in input videos.

tparams : dict

Dictionary containing tracking parameters to Trackmate analysis.

diff_classifier.knotlets.tracking(subprefix, remote_folder, bucket='nancelab.publicfiles', regress_f='regress.obj', rows=4, cols=4, ires=(512, 512), tparams={'do_median_filtering': False, 'gap_closing_max_distance': 10.0, 'linking_max_distance': 6.0, 'max_frame_gap': 3, 'median_intensity': 300.0, 'quality': 15.0, 'radius': 3.0, 'snr': 0.0, 'threshold': 0.0, 'track_duration': 20.0, 'xdims': (0, 511), 'ydims': (1, 511)})[source]

Tracks particles in input image using Trackmate.

A function based on imagej.track that downloads the image from S3, tracks particles using Trackmate, and uploads the resulting trajectory file to S3.

Parameters:
subprefix : string

Prefix (everything except file extension and folder name) of image file to be tracked. Must be available on S3.

remote_folder : string

Folder name where file is contained on S3 in the bucket specified by ‘bucket’.

bucket : string

S3 bucket where file is contained.

regress_f : string

Name of regress object used to predict quality parameter.

rows : int

Number of rows to split image into.

cols : int

Number of columns to split image into.

ires : tuple of int

Resolution of split images. Really just a sanity check to make sure you correctly splitting.

tparams : dict

Dictionary containing tracking parameters to Trackmate analysis.