<jupyter_start><jupyter_text>One drug analysis In the introduction we have analysed a IC50 input file. We performed a full analysis that is we analyse all associations between all drugs and all features. This may take a while and sometimes one is just interested in a single drug or a sub set of drugs. In this notebook, we show how to restrict the analysis.<jupyter_code>%pylab inline
matplotlib.rcParams['figure.figsize'] = (10,6)<jupyter_output>Populating the interactive namespace from numpy and matplotlib<jupyter_text>As before, we create an ANOVA instance. Pur input IC50 will be the test file<jupyter_code>from gdsctools import ANOVA, ic50_test
an = ANOVA(ic50_test)<jupyter_output><empty_output><jupyter_text>Drugs are stored in the **drugIds** in case you forgot the drug you are interested in.. eg. the first drug identifer is<jupyter_code>drug_name = an.drugIds[0]
results = an.anova_one_drug(drug_name)<jupyter_output>[--------         21%                  ] 10 of 47 complete in 0.0 sec[---------------- 42%                  ] 20 of 47 complete in 0.1 sec[-----------------63%----              ] 30 of 47 complete in 0.1 sec[-----------------85%------------      ] 40 of 47 complete in 0.2 sec[-----------------100%-----------------] 47 of 47 complete in 0.2 sec<jupyter_text>Now, you can create an HTML report or simply call one of the volcano plot<jupyter_code>results.volcano()<jupyter_output><empty_output><jupyter_text>DRAFT version to use new JS volcano plot (v 0.12)<jupyter_code>from gdsctools.report import ReportMain
from gdsctools.volcano import VolcanoANOVAJS
v = VolcanoANOVAJS(results)
html = v.render_drug(999)
report = ReportMain(template_filename="volcano_standalone.html")
report.jinja['volcano_jsdata'] = html
report.write()
from IPython.display import HTML
display(HTML('<iframe src="report/index.html" width="100%" height="600px"></iframe>'))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13581541688515994, 'fraction_numerical': 0.03408495018353435, 'mean_word_length': 3.676470588235294, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '400086', 'license': 'Python-2.0', 'n_tokens_mistral': 641, 'n_tokens_neox': 554, 'n_words': 199, 'path': 'notebooks/3. One Drug Analysis.ipynb', 'repo_name': 'Donnyvdm/gdsctools', 'size': '1907'}