diff --git a/consensus/2016_04_01_a549_48hr_batch1/2016_04_01_a549_48hr_batch1_consensus_modz.gct b/consensus/2016_04_01_a549_48hr_batch1/2016_04_01_a549_48hr_batch1_consensus_modz.gct deleted file mode 100644 index 9b6c322..0000000 --- a/consensus/2016_04_01_a549_48hr_batch1/2016_04_01_a549_48hr_batch1_consensus_modz.gct +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eb8012af5eae5a52db4f80232134c945b4575caae8dd53278fe45b2396617f22 -size 230789982 diff --git a/consensus/README.md b/consensus/README.md index 24ea7d4..b816d5c 100644 --- a/consensus/README.md +++ b/consensus/README.md @@ -48,7 +48,7 @@ The pipeline can be reproduced by executing the following: # Make sure conda environment is activated conda activate lincs -# Reproduce thepipeline for producing bulk signatures +# Reproduce the pipeline for producing bulk signatures ipython scripts/nbconverted/build-consensus-signatures.py ``` diff --git a/consensus/build-consensus-signatures.ipynb b/consensus/build-consensus-signatures.ipynb index 444ceef..c327344 100644 --- a/consensus/build-consensus-signatures.ipynb +++ b/consensus/build-consensus-signatures.ipynb @@ -102,7 +102,6 @@ "from pycytominer.aggregate import aggregate\n", "from pycytominer.consensus import modz_base\n", "from pycytominer.feature_select import feature_select\n", - "\n", "from pycytominer.cyto_utils import infer_cp_features" ] }, @@ -635,83 +634,6 @@ " index=False,\n", " )" ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Save whole plate MODZ consensus signature as GCT\n", - "\n", - "Whole-plate-normalized + MODZ aggregated consensus profiles will be made available on clue.io/morphology as a GCT file." - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Now Writing: Consensus Operation: modz; Norm Strategy: whole_plate\n", - "File: 2016_04_01_a549_48hr_batch1/2016_04_01_a549_48hr_batch1_consensus_modz.gct\n", - "(8340, 1790)\n" - ] - }, - { - "data": { - "application/javascript": [ - "\n", - " setTimeout(function() {\n", - " var nbb_cell_id = 11;\n", - " var nbb_unformatted_code = \"import pycytominer.write_gct\\n\\noperation = \\\"modz\\\"\\nnorm_strat = \\\"whole_plate\\\"\\nfile_suffix = \\\".gct\\\"\\nconsensus_file = f\\\"{batch}_consensus_{operation}{file_suffix}\\\"\\nconsensus_file = pathlib.Path(batch, consensus_file)\\n\\nconsensus_df = all_consensus_dfs[norm_strat][operation][\\\"no_feat_select\\\"]\\n\\nprint(\\n f\\\"Now Writing: Consensus Operation: {operation}; Norm Strategy: {norm_strat}\\\\nFile: {consensus_file}\\\"\\n)\\nprint(consensus_df.shape)\\n\\npycytominer.write_gct(consensus_df, consensus_file)\";\n", - " var nbb_formatted_code = \"import pycytominer.write_gct\\n\\noperation = \\\"modz\\\"\\nnorm_strat = \\\"whole_plate\\\"\\nfile_suffix = \\\".gct\\\"\\nconsensus_file = f\\\"{batch}_consensus_{operation}{file_suffix}\\\"\\nconsensus_file = pathlib.Path(batch, consensus_file)\\n\\nconsensus_df = all_consensus_dfs[norm_strat][operation][\\\"no_feat_select\\\"]\\n\\nprint(\\n f\\\"Now Writing: Consensus Operation: {operation}; Norm Strategy: {norm_strat}\\\\nFile: {consensus_file}\\\"\\n)\\nprint(consensus_df.shape)\\n\\npycytominer.write_gct(consensus_df, consensus_file)\";\n", - " var nbb_cells = Jupyter.notebook.get_cells();\n", - " for (var i = 0; i < nbb_cells.length; ++i) {\n", - " if (nbb_cells[i].input_prompt_number == nbb_cell_id) {\n", - " if (nbb_cells[i].get_text() == nbb_unformatted_code) {\n", - " nbb_cells[i].set_text(nbb_formatted_code);\n", - " }\n", - " break;\n", - " }\n", - " }\n", - " }, 500);\n", - " " - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "import pycytominer.write_gct\n", - "\n", - "operation = \"modz\"\n", - "norm_strat = \"whole_plate\"\n", - "file_suffix = \".gct\"\n", - "consensus_file = f\"{batch}_consensus_{operation}{file_suffix}\"\n", - "consensus_file = pathlib.Path(batch, consensus_file)\n", - "\n", - "consensus_df = all_consensus_dfs[norm_strat][operation][\"no_feat_select\"]\n", - "\n", - "print(\n", - " f\"Now Writing: Consensus Operation: {operation}; Norm Strategy: {norm_strat}\\nFile: {consensus_file}\"\n", - ")\n", - "print(consensus_df.shape)\n", - "\n", - "pycytominer.write_gct(consensus_df, consensus_file)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/consensus/scripts/nbconverted/build-consensus-signatures.py b/consensus/scripts/nbconverted/build-consensus-signatures.py index 7e80785..ad5dd55 100644 --- a/consensus/scripts/nbconverted/build-consensus-signatures.py +++ b/consensus/scripts/nbconverted/build-consensus-signatures.py @@ -36,7 +36,6 @@ from pycytominer.aggregate import aggregate from pycytominer.consensus import modz_base from pycytominer.feature_select import feature_select - from pycytominer.cyto_utils import infer_cp_features @@ -270,34 +269,3 @@ def consensus_apply(df, operation, cp_features, replicate_cols): index=False, ) - -# ## Save whole plate MODZ consensus signature as GCT -# -# Whole-plate-normalized + MODZ aggregated consensus profiles will be made available on clue.io/morphology as a GCT file. - -# In[11]: - - -import pycytominer.write_gct - -operation = "modz" -norm_strat = "whole_plate" -file_suffix = ".gct" -consensus_file = f"{batch}_consensus_{operation}{file_suffix}" -consensus_file = pathlib.Path(batch, consensus_file) - -consensus_df = all_consensus_dfs[norm_strat][operation]["no_feat_select"] - -print( - f"Now Writing: Consensus Operation: {operation}; Norm Strategy: {norm_strat}\nFile: {consensus_file}" -) -print(consensus_df.shape) - -pycytominer.write_gct(consensus_df, consensus_file) - - -# In[ ]: - - - -