hammerlab / SmartCount

Repository for collaboration on Celldom computer vision solutions
Apache License 2.0
2 stars 0 forks source link

Adding resistant cell analysis #60

Closed eric-czech closed 5 years ago

eric-czech commented 5 years ago

Hey @jmotschman ,

I added a command to run an analysis focusing specifically on resistant cells like we spoke about. Here is an example call based on the old G3 experiment with one drug and a few concentrations, which at least makes a little sense for the sake of comparison. You can see it takes a little extra effort in the call to make sure that the concentrations in the filenames are converted properly to floating point values for the sake of the regression on % resistant vs concentration:

celldom run_resistant_cell_analysis \
--output_dir='/lab/data/celldom/output/20181005-G3-full' \
--experiment_config_path='/lab/repos/celldom/config/experiment/exp-20180614-G3-K562-imatinib-poc-01.yaml' \
--concentration_fields='acq_cohort' \
--concentration_values_order='Control,0.1uM,0.3uM,0.5uM' \
--concentration_values_map="'0,.1,.3,.5'" \
--array_fields='acq_pump' \
--lambda_grid="'0,1,21'"

I think the arguments related to concentration are at least fairly self-explanatory but it's worth noting that the array_fields really just needs to be any list of fields that you want to group the cell counts by (could be an array, could be a whole chip, could be a bunch of chips treated w/ the same drug, etc.).

The notebook then produces a couple plots like this (where each would have more horizontal panels if there were more drugs):

screen shot 2018-11-27 at 9 20 32 pm

I'd be happy to tailor some of that more to the dataset you're working with, but I'll stop there for now and make sure this is what you had in mind. Perhaps you can try it on your end and see what it looks like for an experiment with more drugs (or send me the .h5 and config files for the experiment)?

btw: I went with integrating this into the way the other analyses work rather than basing it on a csv import since I thought there would be less room for error that way, and you can still make experiment-specific changes to the resulting notebook rather than the csv file. Let me know if there was a reason I might not be catching that you wanted to be able to do that though.