Skip to content

Commit

Permalink
run figshare plot generation script
Browse files Browse the repository at this point in the history
  • Loading branch information
jjc2718 committed Jun 15, 2023
1 parent 9cdaed5 commit df21929
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 10 deletions.
30 changes: 25 additions & 5 deletions 01_stratified_classification/lasso_range_gene_optimizers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "8ecc9509-3356-45c8-ad0e-a8d605cfc6aa",
"id": "4e349b64-dc93-475d-b2e3-a277714f9510",
"metadata": {
"tags": [
"parameters"
Expand All @@ -64,10 +64,30 @@
"metric = 'aupr'\n",
"\n",
"output_plots = True\n",
"output_plots_dir = os.path.join(\n",
" cfg.repo_root, '01_stratified_classification', 'optimizers_plots'\n",
" # cfg.repo_root, '01_stratified_classification', 'optimizers_plots', 'figshare'\n",
")"
"\n",
"# toggle this in papermill script to generate all results\n",
"figshare = False"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "7f5e3f07-fb50-4f86-a45d-7022b3d6984a",
"metadata": {
"tags": [
"parameters"
]
},
"outputs": [],
"source": [
"if figshare:\n",
" output_plots_dir = os.path.join(\n",
" cfg.repo_root, '01_stratified_classification', 'optimizers_plots', 'figshare'\n",
" )\n",
"else:\n",
" output_plots_dir = os.path.join(\n",
" cfg.repo_root, '01_stratified_classification', 'optimizers_plots'\n",
" )"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,22 @@
metric = 'aupr'

output_plots = True
output_plots_dir = os.path.join(
cfg.repo_root, '01_stratified_classification', 'optimizers_plots'
# cfg.repo_root, '01_stratified_classification', 'optimizers_plots', 'figshare'
)

# toggle this in papermill script to generate all results
figshare = False


# In[2]:


if figshare:
output_plots_dir = os.path.join(
cfg.repo_root, '01_stratified_classification', 'optimizers_plots', 'figshare'
)
else:
output_plots_dir = os.path.join(
cfg.repo_root, '01_stratified_classification', 'optimizers_plots'
)


# ### Get nonzero coefficient information for each lasso penalty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ for gene in "${genes[@]}"; do
cmd="papermill lasso_range_gene_optimizers.ipynb "
cmd+="${papermill_output_dir}/lasso_range_gene_optimizers.run.ipynb "
cmd+="-k ${kernel_name} "
cmd+="-p plot_gene ${gene}"
cmd+="-p plot_gene ${gene} "
cmd+="-p figshare True"
echo "Running: $cmd"
eval $cmd

Expand Down

0 comments on commit df21929

Please sign in to comment.