1
|
|
|
#!/usr/bin/env python |
2
|
|
|
|
3
|
|
|
import turtle |
4
|
|
|
import sys |
5
|
|
|
import diff_classifier.knotlets as kn |
6
|
|
|
import numpy as np |
7
|
|
|
import diff_classifier.aws as aws |
8
|
|
|
import diff_classifier.msd as msd |
9
|
|
|
|
10
|
|
|
folder = '09_26_18_tissue_study' |
11
|
|
|
bucket = 'hpontes.data' |
12
|
|
|
#experiment = 'test' #Used for naming purposes. Should exclude XY and well information |
13
|
|
|
|
14
|
|
|
#vids = 2 |
15
|
|
|
to_track = [] |
16
|
|
|
frames = 651 |
17
|
|
|
fps = 100.02 |
18
|
|
|
umppx = 0.07 |
19
|
|
|
|
20
|
|
|
vids = 5 |
21
|
|
|
covers = ['10K', '1K', '5K', 'COOH'] |
22
|
|
|
slices = [4, 5, 6] |
23
|
|
|
for cover in covers: |
24
|
|
|
for slic in slices: |
25
|
|
|
for num in range(1, vids+1): |
|
|
|
|
26
|
|
|
#to_track.append('100x_0_4_1_2_gel_{}_bulk_vid_{}'.format(vis, num)) |
27
|
|
|
to_track.append('{}_tissue_S{}_XY{}'.format(cover, slic, num)) |
28
|
|
|
|
29
|
|
|
geomean = {} |
30
|
|
|
gSEM = {} |
31
|
|
|
for sample_name in to_track[int(sys.argv[1]):int(sys.argv[2])]: |
32
|
|
|
# Users can toggle between using pre-calculated geomean files and calculating new values by commenting out the relevant |
33
|
|
|
# lines of code within the for loop. |
34
|
|
|
#aws.download_s3('{}/geomean_{}.csv'.format(folder, sample_name), 'geomean_{}.csv'.format(sample_name), bucket_name=bucket) |
35
|
|
|
#aws.download_s3('{}/geoSEM_{}.csv'.format(folder, sample_name), 'geoSEM_{}.csv'.format(sample_name), bucket_name=bucket) |
36
|
|
|
#geomean[sample_name] = np.genfromtxt('geomean_{}.csv'.format(sample_name)) |
37
|
|
|
#gSEM[sample_name] = np.genfromtxt('geoSEM_{}.csv'.format(sample_name)) |
38
|
|
|
|
39
|
|
|
aws.download_s3('{}/msd_{}.csv'.format(folder, sample_name), 'msd_{}.csv'.format(sample_name), bucket_name=bucket) |
40
|
|
|
geomean[sample_name], gSEM[sample_name] = msd.geomean_msdisp(sample_name, umppx=umppx, fps=fps, |
41
|
|
|
remote_folder=folder, bucket=bucket) |
42
|
|
|
print('Done with {}'.format(sample_name)) |
43
|
|
|
|
44
|
|
|
|