diff --git a/01_stratified_classification/lasso_range_gene_optimizers.ipynb b/01_stratified_classification/lasso_range_gene_optimizers.ipynb index 9c8410b..9ac575a 100644 --- a/01_stratified_classification/lasso_range_gene_optimizers.ipynb +++ b/01_stratified_classification/lasso_range_gene_optimizers.ipynb @@ -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" @@ -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", + " )" ] }, { diff --git a/01_stratified_classification/nbconverted/lasso_range_gene_optimizers.py b/01_stratified_classification/nbconverted/lasso_range_gene_optimizers.py index e3bf3ef..2cb7afe 100644 --- a/01_stratified_classification/nbconverted/lasso_range_gene_optimizers.py +++ b/01_stratified_classification/nbconverted/lasso_range_gene_optimizers.py @@ -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 diff --git a/01_stratified_classification/scripts/plot_optimizers_for_genes.sh b/01_stratified_classification/scripts/plot_optimizers_for_genes.sh index 7e7dac8..4bdb870 100755 --- a/01_stratified_classification/scripts/plot_optimizers_for_genes.sh +++ b/01_stratified_classification/scripts/plot_optimizers_for_genes.sh @@ -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