Skip to content

Commit

Permalink
add pandda fragment screening analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
hkwang committed May 1, 2024
1 parent c670f4b commit a20f9e7
Show file tree
Hide file tree
Showing 39 changed files with 4,690 additions and 2,964 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Examples of merging crystallographic intensities with a bivariate prior

## Setup

To run much of the scripts and notebooks in this repository, [Careless](https://github.com/rs-station/careless) must be installed. Many scripts activate a conda environment with Careless installed, e.g.:
To run much of the scripts and notebooks in this repository, [Careless](https://github.com/rs-station/careless) and [rs-booster](https://github.com/rs-station/rs-booster) must be installed. Many scripts activate a conda environment with Careless installed, e.g.:

[run_ccs.sh](pyp/run_ccs.sh)
```
Expand Down
94 changes: 47 additions & 47 deletions dfs/CCs.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
113 changes: 86 additions & 27 deletions dfs/Inspect_Careless_param_grid-DFS.ipynb

Large diffs are not rendered by default.

86 changes: 86 additions & 0 deletions dfs/compute_pandda_ph.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "cf5ad767-7da5-444a-8204-403cdef0bad9",
"metadata": {},
"outputs": [],
"source": [
"import reciprocalspaceship as rs\n",
"import gemmi as gm\n",
"import os\n",
"import numpy as np"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "6012c13b-c3a5-475c-b44b-9cf4333ed145",
"metadata": {},
"outputs": [],
"source": [
"\n",
"base_dir = \"/n/home01/hwang6/Storelab/projects/dw-examples/dfs/20221007_unscaled_unmerged/\"\n",
"for dataset in [\"P0115\", \"P0116\", \"P0123\" ,\"P0124\",\n",
" \"P0131\", \"P0132\", \"P0137\", \"P0138\",\n",
" \"P0139\", \"P0142\", \"P0148\", \"P0159\",\n",
" \"P0161\", \"P0163\", \"P0178\", \"P0179\"]:\n",
" os.chdir(base_dir+f\"UCSF-{dataset}\")\n",
" a = gm.read_ccp4_map(f\"UCSF-{dataset}-z_map.native.ccp4\")\n",
" array = a.grid.array\n",
" gridsize = array.shape[::-1]\n",
" grid = gm.FloatGrid(*gridsize)\n",
" grid.set_unit_cell(a.grid.unit_cell)\n",
" grid.spacegroup=gm.SpaceGroup(\"P43\")\n",
" temp = np.array(grid,copy=False)\n",
" temp[:,:,:]= array.T[:,:,:]\n",
" rs.io.write_ccp4_map(\n",
" grid.array, \n",
" f\"UCSF-{dataset}-z_map.native_T.ccp4\",\n",
" cell=grid.unit_cell, \n",
" spacegroup=grid.spacegroup)\n",
"\n",
" "
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "55938d86-a9cf-46e0-9518-6c3502886ea7",
"metadata": {},
"outputs": [],
"source": [
"%%bash \n",
"cd ..\n",
"for dataset in \"P0115\" \"P0116\" \"P0123\" \"P0124\" \"P0131\" \"P0132\" \"P0137\" \"P0138\" \"P0139\" \"P0142\" \"P0148\" \"P0159\" \"P0161\" \"P0163\" \"P0178\" \"P0179\"\n",
"do\n",
" cd UCSF-${dataset}\n",
" rs.find_difference_peaks ./UCSF-${dataset}-pandda-model.pdb -z 5 -c UCSF-${dataset}-z_map.native_T.ccp4 -o out_${dataset}_pandda.csv\n",
" cd ..\n",
"done\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:anaconda-careless]",
"language": "python",
"name": "conda-env-anaconda-careless-py"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.13"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading

0 comments on commit a20f9e7

Please sign in to comment.