-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanalyze.py
63 lines (50 loc) · 1.71 KB
/
analyze.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#George Emanuel
#Copyright Presidents and Fellows of Harvard College, 2017.
#Helper file for analyzing imaging data from the command line
import getopt
import sys
import numpy as np
import matplotlib.pyplot as plt
from core.data import data
import core.data.image as image
import core.analysis.aligner as aligner
from core.analysis import cellfinder
from core.analysis import normalization
from core import experiment
data.__DATAHOME__ = #path to data
data.__CACHEHOME__ = #path to sequencing results
coreCount = -1
imagingExperiment = None
parametersFile = None
positionFile = None
sequencingExperiment = None
sequencingLibrary = None
opts, args = getopt.getopt(
sys.argv[1:],
'c:i:s:l:p:',
['cores=','imaging_experiment=','sequencing_experiment=',
'sequencing_library=', 'position_file=', 'parameters_file='])
for opt, arg in opts:
if opt in ('-c', '--cores'):
coreCount = int(arg)
elif opt in ('-i', '--imaging_experiment'):
imagingExperiment = arg
elif opt in ('-s', '--sequencing_experiment'):
sequencingExperiment = arg
elif opt in ('-l', '--sequencing_library'):
sequencingLibrary = arg
elif opt in ('-p', '--parameters_file'):
parametersFile = arg
elif opt in ('--position_file'):
positionFile = arg
else:
print(arg)
print("Imaging experiment " + imagingExperiment)
outputExperiment = experiment.SequenceFunctionExperiment(
imagingExperiment = imagingExperiment,
sequencingExperiment = sequencingExperiment,
sequencingLibrary = sequencingLibrary,
parametersFile = parametersFile)
outputExperiment.coreCount = coreCount
analysis = outputExperiment.get_analysis()