choderalab / assaytools

Modeling and Bayesian analysis of fluorescence and absorbance assays.
http://assaytools.readthedocs.org
GNU Lesser General Public License v2.1
18 stars 11 forks source link

Making quickmodel more flexible to accept different plate layouts #91

Open MehtapIsik opened 7 years ago

MehtapIsik commented 7 years ago

At the moment quickmodel is designed to work this plate layout:

I would like to analyse an experiment with a different layout: Row A : protein1 + ligand1 Row B : protein2 + ligand1 Row C : protein3 + ligand1 Row D : protein4 + ligand1 Row E : protein5 + ligand1 Row F : protein6 + ligand1 Row G : buffer + ligand1 Row H : buffer + ligand1

I will try to modify quickmodel script to handle this case. Can I add it as an alternative quickmodel script to assaytools for now? @sonyahanson

I think this is the part I need to modify: https://github.com/choderalab/assaytools/blob/master/scripts/quickmodel.py#L74-L75

MehtapIsik commented 7 years ago

@sonyahanson You can find my modified quickmodel script for this new layout: quickmodel_layout2.py I changed lines 73-75 of quickmodel.py.

I used the default inputs.py format but repeated the name of the ligand 4 times.

MehtapIsik commented 7 years ago

Can we define the assay layout using a dictionary like fashion with assay_format, protein_order (this will replace the protein section) and ligand_order sections in inputs.py.

assay_format can be row-wise or column-wise

It will be useful to have assay_format that defines in which direction each titration series lie, so we can analyse data in different orders and even when the experiments are designed in columns (Column 1 - protein, column 2 buffer etc.)

For example our usual layout would be defined like this:

'assay_format' : 'row-wise' 
'ligand_order' :  {'A': 'Bosutinib', 'B':'Bosutinib Isomer', 'C':'Erlotinib', 'D':'Gefitinib', 'E':'Bosutinib', 'F': 'Bosutinib Isomer', 'G': 'Erlotinib', 'H': 'Gefitinib'}
'protein_order' : {'A': 'p38, 'B':'buffer, 'C':'p38', 'D':'buffer', 'E':'p38', 'F': 'buffer', 'G': 'p38', 'H': 'buffer'}

And an unusual layout like I did with HSA samples will be defined like this:

'assay_format' : 'row-wise' 
'ligand_order' :  {'A': 'dansylamide', 'B':'dansylamide', 'C':'dansylamide', 'D':'dansylamide', 'E':'dansylamide, 'F': 'dansylamide', 'G': 'dansylamide', 'H': 'dansylamide'}
'protein_order' : {'A': 'HSA1, 'B':'HSA2', 'C':'HSA3', 'D':'HSA4', 'E':'HSA5', 'F': 'HSA6', 'G': 'buffer', 'H': 'buffer'}

An example for column-wise experiment where only first 4 columns are used:

'assay_format' : 'column-wise' 
'ligand_order' :  {'1': 'Bosutinib', '2':'Bosutinib', '3':'Gefitinib', '4':'Gefitinib''}
'protein_order' : {'1': 'buffer', '2':'Src', '3':'buffer', '4':'Src'}
sonyahanson commented 7 years ago

I agree it would be good to have a more flexible plate layout! I think that if we want it this general, it might be good to start the transition to autoprotocol for the initial file parsing: https://github.com/choderalab/assaytools/blob/master/examples/autoprotocol/README.md

We can have our data in a format that's appropriate for the more advanced analysis, while still doing the analysis the same way we are, and then we don't have to manage too many things at once.

sonyahanson commented 7 years ago

Perhaps as an intermediate, we can create a section in the 'inputs.py' where we can define assay_format as alternating_row or block_row, which seem to be the two formats we have been using recently.