Skip to content
This repository has been archived by the owner on Jul 2, 2020. It is now read-only.

Commit

Permalink
fix os and glob
Browse files Browse the repository at this point in the history
  • Loading branch information
minqiao committed Jul 1, 2019
1 parent fb1a83c commit 69d4049
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion workflow/finemapping_results_wrangler.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@
"parameter: columns = [2,4]\n",
"# chromosome identifiers\n",
"parameter: chroms = [x+1 for x in range(22)]\n",
"import glob\n",
"skip_if(len(glob.glob(f\"{id_map_prefix:a}.*.{id_map_suffix}\")) == 0, msg = 'Variant ID are not updated because no valid file is found using --id-map-prefix and --id-map-suffix')\n",
"output: f'{_input:n}.id_updated.gz'\n",
"R: expand = \"${ }\", stdout = f'{_output:n}.log'\n",
Expand Down Expand Up @@ -427,6 +428,7 @@
"parameter: columns = [2,4,5,6]\n",
"# chromosome identifiers\n",
"parameter: chroms = [x+1 for x in range(22)]\n",
"import glob\n",
"skip_if(len(glob.glob(f\"{coordinate_map_prefix:a}.*.{coordinate_map_suffix}\")) == 0, msg = 'Genomic coordinates are not updated because no valid file is found using --coordinate-map-prefix and --coordinate-map-suffix')\n",
"output: f'{_input:n}.{coordinate_version_id}.gz'.replace('.id_updated.', '.')\n",
"R: expand = \"${ }\", stdout = f'{_output:n}.log'\n",
Expand Down Expand Up @@ -506,7 +508,7 @@
""
]
],
"version": "0.18.3"
"version": "0.19.4"
}
},
"nbformat": 4,
Expand Down
5 changes: 4 additions & 1 deletion workflow/summary_statistics_finemapping.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@
"# Whether or not to keep fit from each iteration,\n",
"# for debug purpose.\n",
"parameter: track_fit = False\n",
"import os\n",
"#\n",
"suffix = f'SuSiE_B.L_{L}.prior_{fmtP(susie_pve)}.res_var_{str(susie_est_residual).lower()}'\n",
"var_y_str = f'var_y = {var_y},' if var_y > 0 else ''\n",
Expand Down Expand Up @@ -345,6 +346,7 @@
"# Whether or not to keep fit from each iteration,\n",
"# for debug purpose.\n",
"parameter: track_fit = False\n",
"import os\n",
"#\n",
"suffix = f'SuSiE_Z.L_{L}'\n",
"#\n",
Expand Down Expand Up @@ -405,6 +407,7 @@
"fail_if(n<=2, msg = 'Please specif valid sample size --n')\n",
"# Extra arguments to pass to DAP\n",
"parameter: args = ''\n",
"import os\n",
"suffix = f'DAP{\".\"+fmtP(args) if len(args) else \"\"}'\n",
"#\n",
"depends: executable('dap-g'), Py_Module('pandas'), Py_Module('numpy')\n",
Expand Down Expand Up @@ -1549,7 +1552,7 @@
"height": 0,
"style": "side"
},
"version": "0.18.3"
"version": "0.19.4"
}
},
"nbformat": 4,
Expand Down
5 changes: 3 additions & 2 deletions workflow/summary_statistics_wrangler.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
" ```\n",
" where each line is white-space separated with the first the chromosome number and second the file name.\n",
" \n",
" **For UChicago midway users**: reference genotype data for 1000 Genomes EUR samples are extracted using workflow `prepare_1KG_reference` below. The output can be found under `/project/mstephens/SuSIE_gtex_CPP/1KG_EUR`. The manifest file `1KG_EUR.manifest` was prepared by:\n",
" **For UChicago midway users**: reference genotype data for 1000 Genomes EUR samples are extracted using workflow `prepare_1KG_reference` below. The output can be found under `/project2/xinhe/mqiao/SuSiE_GWAS/1KG_EUR/`. The manifest file `1KG_EUR.manifest` was prepared by:\n",
" ```\n",
" for i in {1..22} X; do echo $i ALL.chr$i.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.EUR.vcf.gz; done > 1KG_EUR.manifest\n",
" ```"
Expand Down Expand Up @@ -414,6 +414,7 @@
"parameter: adjust_panel_position = 1\n",
"# Either empty, or `chr`\n",
"parameter: panel_chrom_prefix = ''\n",
"import os\n",
"\n",
"fail_if(len(columns) not in (5,6), msg = 'Input column ID has to be of length 5 or 6.')\n",
"\n",
Expand Down Expand Up @@ -1209,7 +1210,7 @@
"height": 0,
"style": "side"
},
"version": "0.18.4"
"version": "0.19.4"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 69d4049

Please sign in to comment.