pyLoopSage 1.0.2__tar.gz → 1.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyloopsage-1.0.2 → pyloopsage-1.0.3}/PKG-INFO +49 -16
- {pyloopsage-1.0.2 → pyloopsage-1.0.3}/README.md +48 -15
- {pyloopsage-1.0.2 → pyloopsage-1.0.3}/loopsage/__init__.py +1 -1
- {pyloopsage-1.0.2 → pyloopsage-1.0.3}/pyLoopSage.egg-info/PKG-INFO +49 -16
- {pyloopsage-1.0.2 → pyloopsage-1.0.3}/setup.py +1 -1
- {pyloopsage-1.0.2 → pyloopsage-1.0.3}/LICENSE +0 -0
- {pyloopsage-1.0.2 → pyloopsage-1.0.3}/loopsage/args_definition.py +0 -0
- {pyloopsage-1.0.2 → pyloopsage-1.0.3}/loopsage/em.py +0 -0
- {pyloopsage-1.0.2 → pyloopsage-1.0.3}/loopsage/initial_structures.py +0 -0
- {pyloopsage-1.0.2 → pyloopsage-1.0.3}/loopsage/md.py +0 -0
- {pyloopsage-1.0.2 → pyloopsage-1.0.3}/loopsage/plots.py +0 -0
- {pyloopsage-1.0.2 → pyloopsage-1.0.3}/loopsage/preproc.py +0 -0
- {pyloopsage-1.0.2 → pyloopsage-1.0.3}/loopsage/run.py +0 -0
- {pyloopsage-1.0.2 → pyloopsage-1.0.3}/loopsage/stochastic_simulation.py +0 -0
- {pyloopsage-1.0.2 → pyloopsage-1.0.3}/loopsage/utils.py +0 -0
- {pyloopsage-1.0.2 → pyloopsage-1.0.3}/loopsage/vizualization_tools.py +0 -0
- {pyloopsage-1.0.2 → pyloopsage-1.0.3}/pyLoopSage.egg-info/SOURCES.txt +0 -0
- {pyloopsage-1.0.2 → pyloopsage-1.0.3}/pyLoopSage.egg-info/dependency_links.txt +0 -0
- {pyloopsage-1.0.2 → pyloopsage-1.0.3}/pyLoopSage.egg-info/entry_points.txt +0 -0
- {pyloopsage-1.0.2 → pyloopsage-1.0.3}/pyLoopSage.egg-info/requires.txt +0 -0
- {pyloopsage-1.0.2 → pyloopsage-1.0.3}/pyLoopSage.egg-info/top_level.txt +0 -0
- {pyloopsage-1.0.2 → pyloopsage-1.0.3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyLoopSage
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.3
|
|
4
4
|
Summary: An energy-based stochastic model of loop extrusion in chromatin.
|
|
5
5
|
Home-page: https://github.com/SFGLab/pyLoopSage
|
|
6
6
|
Author: Sebastian Korsak
|
|
@@ -137,7 +137,7 @@ where the last two columns represent the probabilites for left and right anchor
|
|
|
137
137
|
|
|
138
138
|
Then, we define the main parameters of the simulation `N_beads,N_coh,kappa,f,b` or we can choose the default ones (take care because it might be the case that they are not the appropriate ones and they need to be changed), the parameters of Monte Carlo `N_steps, MC_step, burnin, T`, and we initialize the class `LoopSage()`. The command `sim.run_energy_minimization()` corresponds to the stochastic Monte Carlo simulation, and it produces a set of cohesin constraints as a result (`Ms, Ns`). Note that the stochastic simulation has two modes: `Annealing` and `Metropolis`. We feed cohesin constraints to the molecular simulation part of and we run `MD_LE()` or `MD_EM()` simulation which produces a trajectory of 3d-structures, and the average heatmap. `MD_LE()` function can produce an actual trajectory and a `.dcd` video of how simulation changes over time. However, the implementation needs a high amount of memory since we need to define a bond for each time step, and it may not work for large systems. `EM_LE()` is suggested for large simulations, because it does not require so big amount of memory.
|
|
139
139
|
|
|
140
|
-
###
|
|
140
|
+
### Running LoopSage from command-line
|
|
141
141
|
To run LoopSage from command-line, you only need to type a command
|
|
142
142
|
|
|
143
143
|
```bash
|
|
@@ -147,24 +147,57 @@ loopsage -c config.ini
|
|
|
147
147
|
With this command the model will run with parameters specified in `config.ini` file. An example of a `config.ini` file would be the following,
|
|
148
148
|
|
|
149
149
|
```txt
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
[Main]
|
|
151
|
+
|
|
152
|
+
; Input Data and Information
|
|
153
|
+
BEDPE_PATH = /home/skorsak/Data/HiChIP/Maps/hg00731_smc1_maps_2.bedpe
|
|
154
|
+
REGION_START = 15550000
|
|
155
|
+
REGION_END = 16850000
|
|
156
|
+
CHROM = chr6
|
|
157
|
+
OUT_PATH = ../HiChIP_Annealing_T15_MD_region
|
|
158
|
+
|
|
159
|
+
; Simulation Parameters
|
|
160
|
+
N_BEADS = 1000
|
|
161
|
+
N_STEPS = 40000
|
|
162
|
+
MC_STEP = 500
|
|
163
|
+
BURNIN = 1000
|
|
164
|
+
T_INIT = 1.5
|
|
165
|
+
T_FINAL = 0.01
|
|
166
|
+
METHOD = Metropolis
|
|
167
|
+
|
|
168
|
+
; Molecular Dynamics
|
|
169
|
+
PLATFORM = CUDA
|
|
170
|
+
INITIAL_STRUCTURE_TYPE = rw
|
|
171
|
+
SIMULATION_TYPE = EM
|
|
172
|
+
TOLERANCE = 1.0
|
|
173
|
+
```
|
|
153
174
|
|
|
154
|
-
|
|
155
|
-
f, b, kappa = 1.0, 1.0, 1.0
|
|
175
|
+
### Visualization with PyVista
|
|
156
176
|
|
|
157
|
-
|
|
158
|
-
region, chrom = [15550000,16850000], 'chr6'
|
|
177
|
+
There are many tools for visualization of polymer structures. A very good one is UCSF chimera: https://www.cgl.ucsf.edu/chimera/. Usually these visualization tools work well for proteins, but we can use them for chromatin as well.
|
|
159
178
|
|
|
160
|
-
|
|
161
|
-
output_name='../HiChIP_Annealing_T1_MD_region'
|
|
162
|
-
bedpe_file = '/home/skorsak/Data/HiChIP/Maps/hg00731_smc1_maps_2.bedpe'
|
|
179
|
+
LoopSage offers its own visualization which relies in the `pyvista` python library. To visualize a structure, you can run some very simple commands, which call LoopSage functions,
|
|
163
180
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
181
|
+
```python
|
|
182
|
+
import loopsage.vizualization_tools as vz
|
|
183
|
+
import loopsage.utils as uts
|
|
184
|
+
|
|
185
|
+
V = uts.get_coordinates_cif('/home/skorsak/Projects/mine/LoopSage/HiChIP_Annealing_T15_EM_region/ensemble/EMLE_1.cif')
|
|
186
|
+
vz.viz_structure(V)
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
The output should be something like that,
|
|
190
|
+
|
|
191
|
+

|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
In case that you would like to create a continuous video from the enseble of structures, you can use the following command, which would generate an interactive video in gif format which would show how the structure changes in 3D. The command includes quaternion Kabsch aligment as well.
|
|
195
|
+
|
|
196
|
+
```python
|
|
197
|
+
import loopsage.vizualization_tools as vz
|
|
198
|
+
|
|
199
|
+
vz.interactive_plot('/home/skorsak/Projects/mine/LoopSage/HiChIP_Annealing_T15_EM_region/ensemble')
|
|
200
|
+
```
|
|
168
201
|
|
|
169
202
|
### Output Files
|
|
170
203
|
In the output files, simulation produces one folder with 4 subfolders. In subfolder `plots`, you can find plots that are the diagnostics of the algorithm. One of the most basic results you should see is the trajectories of cohesins (LEFs). this diagram should look like that,
|
|
@@ -103,7 +103,7 @@ where the last two columns represent the probabilites for left and right anchor
|
|
|
103
103
|
|
|
104
104
|
Then, we define the main parameters of the simulation `N_beads,N_coh,kappa,f,b` or we can choose the default ones (take care because it might be the case that they are not the appropriate ones and they need to be changed), the parameters of Monte Carlo `N_steps, MC_step, burnin, T`, and we initialize the class `LoopSage()`. The command `sim.run_energy_minimization()` corresponds to the stochastic Monte Carlo simulation, and it produces a set of cohesin constraints as a result (`Ms, Ns`). Note that the stochastic simulation has two modes: `Annealing` and `Metropolis`. We feed cohesin constraints to the molecular simulation part of and we run `MD_LE()` or `MD_EM()` simulation which produces a trajectory of 3d-structures, and the average heatmap. `MD_LE()` function can produce an actual trajectory and a `.dcd` video of how simulation changes over time. However, the implementation needs a high amount of memory since we need to define a bond for each time step, and it may not work for large systems. `EM_LE()` is suggested for large simulations, because it does not require so big amount of memory.
|
|
105
105
|
|
|
106
|
-
###
|
|
106
|
+
### Running LoopSage from command-line
|
|
107
107
|
To run LoopSage from command-line, you only need to type a command
|
|
108
108
|
|
|
109
109
|
```bash
|
|
@@ -113,24 +113,57 @@ loopsage -c config.ini
|
|
|
113
113
|
With this command the model will run with parameters specified in `config.ini` file. An example of a `config.ini` file would be the following,
|
|
114
114
|
|
|
115
115
|
```txt
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
[Main]
|
|
117
|
+
|
|
118
|
+
; Input Data and Information
|
|
119
|
+
BEDPE_PATH = /home/skorsak/Data/HiChIP/Maps/hg00731_smc1_maps_2.bedpe
|
|
120
|
+
REGION_START = 15550000
|
|
121
|
+
REGION_END = 16850000
|
|
122
|
+
CHROM = chr6
|
|
123
|
+
OUT_PATH = ../HiChIP_Annealing_T15_MD_region
|
|
124
|
+
|
|
125
|
+
; Simulation Parameters
|
|
126
|
+
N_BEADS = 1000
|
|
127
|
+
N_STEPS = 40000
|
|
128
|
+
MC_STEP = 500
|
|
129
|
+
BURNIN = 1000
|
|
130
|
+
T_INIT = 1.5
|
|
131
|
+
T_FINAL = 0.01
|
|
132
|
+
METHOD = Metropolis
|
|
133
|
+
|
|
134
|
+
; Molecular Dynamics
|
|
135
|
+
PLATFORM = CUDA
|
|
136
|
+
INITIAL_STRUCTURE_TYPE = rw
|
|
137
|
+
SIMULATION_TYPE = EM
|
|
138
|
+
TOLERANCE = 1.0
|
|
139
|
+
```
|
|
119
140
|
|
|
120
|
-
|
|
121
|
-
f, b, kappa = 1.0, 1.0, 1.0
|
|
141
|
+
### Visualization with PyVista
|
|
122
142
|
|
|
123
|
-
|
|
124
|
-
region, chrom = [15550000,16850000], 'chr6'
|
|
143
|
+
There are many tools for visualization of polymer structures. A very good one is UCSF chimera: https://www.cgl.ucsf.edu/chimera/. Usually these visualization tools work well for proteins, but we can use them for chromatin as well.
|
|
125
144
|
|
|
126
|
-
|
|
127
|
-
output_name='../HiChIP_Annealing_T1_MD_region'
|
|
128
|
-
bedpe_file = '/home/skorsak/Data/HiChIP/Maps/hg00731_smc1_maps_2.bedpe'
|
|
145
|
+
LoopSage offers its own visualization which relies in the `pyvista` python library. To visualize a structure, you can run some very simple commands, which call LoopSage functions,
|
|
129
146
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
147
|
+
```python
|
|
148
|
+
import loopsage.vizualization_tools as vz
|
|
149
|
+
import loopsage.utils as uts
|
|
150
|
+
|
|
151
|
+
V = uts.get_coordinates_cif('/home/skorsak/Projects/mine/LoopSage/HiChIP_Annealing_T15_EM_region/ensemble/EMLE_1.cif')
|
|
152
|
+
vz.viz_structure(V)
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
The output should be something like that,
|
|
156
|
+
|
|
157
|
+

|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
In case that you would like to create a continuous video from the enseble of structures, you can use the following command, which would generate an interactive video in gif format which would show how the structure changes in 3D. The command includes quaternion Kabsch aligment as well.
|
|
161
|
+
|
|
162
|
+
```python
|
|
163
|
+
import loopsage.vizualization_tools as vz
|
|
164
|
+
|
|
165
|
+
vz.interactive_plot('/home/skorsak/Projects/mine/LoopSage/HiChIP_Annealing_T15_EM_region/ensemble')
|
|
166
|
+
```
|
|
134
167
|
|
|
135
168
|
### Output Files
|
|
136
169
|
In the output files, simulation produces one folder with 4 subfolders. In subfolder `plots`, you can find plots that are the diagnostics of the algorithm. One of the most basic results you should see is the trajectories of cohesins (LEFs). this diagram should look like that,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyLoopSage
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.3
|
|
4
4
|
Summary: An energy-based stochastic model of loop extrusion in chromatin.
|
|
5
5
|
Home-page: https://github.com/SFGLab/pyLoopSage
|
|
6
6
|
Author: Sebastian Korsak
|
|
@@ -137,7 +137,7 @@ where the last two columns represent the probabilites for left and right anchor
|
|
|
137
137
|
|
|
138
138
|
Then, we define the main parameters of the simulation `N_beads,N_coh,kappa,f,b` or we can choose the default ones (take care because it might be the case that they are not the appropriate ones and they need to be changed), the parameters of Monte Carlo `N_steps, MC_step, burnin, T`, and we initialize the class `LoopSage()`. The command `sim.run_energy_minimization()` corresponds to the stochastic Monte Carlo simulation, and it produces a set of cohesin constraints as a result (`Ms, Ns`). Note that the stochastic simulation has two modes: `Annealing` and `Metropolis`. We feed cohesin constraints to the molecular simulation part of and we run `MD_LE()` or `MD_EM()` simulation which produces a trajectory of 3d-structures, and the average heatmap. `MD_LE()` function can produce an actual trajectory and a `.dcd` video of how simulation changes over time. However, the implementation needs a high amount of memory since we need to define a bond for each time step, and it may not work for large systems. `EM_LE()` is suggested for large simulations, because it does not require so big amount of memory.
|
|
139
139
|
|
|
140
|
-
###
|
|
140
|
+
### Running LoopSage from command-line
|
|
141
141
|
To run LoopSage from command-line, you only need to type a command
|
|
142
142
|
|
|
143
143
|
```bash
|
|
@@ -147,24 +147,57 @@ loopsage -c config.ini
|
|
|
147
147
|
With this command the model will run with parameters specified in `config.ini` file. An example of a `config.ini` file would be the following,
|
|
148
148
|
|
|
149
149
|
```txt
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
[Main]
|
|
151
|
+
|
|
152
|
+
; Input Data and Information
|
|
153
|
+
BEDPE_PATH = /home/skorsak/Data/HiChIP/Maps/hg00731_smc1_maps_2.bedpe
|
|
154
|
+
REGION_START = 15550000
|
|
155
|
+
REGION_END = 16850000
|
|
156
|
+
CHROM = chr6
|
|
157
|
+
OUT_PATH = ../HiChIP_Annealing_T15_MD_region
|
|
158
|
+
|
|
159
|
+
; Simulation Parameters
|
|
160
|
+
N_BEADS = 1000
|
|
161
|
+
N_STEPS = 40000
|
|
162
|
+
MC_STEP = 500
|
|
163
|
+
BURNIN = 1000
|
|
164
|
+
T_INIT = 1.5
|
|
165
|
+
T_FINAL = 0.01
|
|
166
|
+
METHOD = Metropolis
|
|
167
|
+
|
|
168
|
+
; Molecular Dynamics
|
|
169
|
+
PLATFORM = CUDA
|
|
170
|
+
INITIAL_STRUCTURE_TYPE = rw
|
|
171
|
+
SIMULATION_TYPE = EM
|
|
172
|
+
TOLERANCE = 1.0
|
|
173
|
+
```
|
|
153
174
|
|
|
154
|
-
|
|
155
|
-
f, b, kappa = 1.0, 1.0, 1.0
|
|
175
|
+
### Visualization with PyVista
|
|
156
176
|
|
|
157
|
-
|
|
158
|
-
region, chrom = [15550000,16850000], 'chr6'
|
|
177
|
+
There are many tools for visualization of polymer structures. A very good one is UCSF chimera: https://www.cgl.ucsf.edu/chimera/. Usually these visualization tools work well for proteins, but we can use them for chromatin as well.
|
|
159
178
|
|
|
160
|
-
|
|
161
|
-
output_name='../HiChIP_Annealing_T1_MD_region'
|
|
162
|
-
bedpe_file = '/home/skorsak/Data/HiChIP/Maps/hg00731_smc1_maps_2.bedpe'
|
|
179
|
+
LoopSage offers its own visualization which relies in the `pyvista` python library. To visualize a structure, you can run some very simple commands, which call LoopSage functions,
|
|
163
180
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
181
|
+
```python
|
|
182
|
+
import loopsage.vizualization_tools as vz
|
|
183
|
+
import loopsage.utils as uts
|
|
184
|
+
|
|
185
|
+
V = uts.get_coordinates_cif('/home/skorsak/Projects/mine/LoopSage/HiChIP_Annealing_T15_EM_region/ensemble/EMLE_1.cif')
|
|
186
|
+
vz.viz_structure(V)
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
The output should be something like that,
|
|
190
|
+
|
|
191
|
+

|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
In case that you would like to create a continuous video from the enseble of structures, you can use the following command, which would generate an interactive video in gif format which would show how the structure changes in 3D. The command includes quaternion Kabsch aligment as well.
|
|
195
|
+
|
|
196
|
+
```python
|
|
197
|
+
import loopsage.vizualization_tools as vz
|
|
198
|
+
|
|
199
|
+
vz.interactive_plot('/home/skorsak/Projects/mine/LoopSage/HiChIP_Annealing_T15_EM_region/ensemble')
|
|
200
|
+
```
|
|
168
201
|
|
|
169
202
|
### Output Files
|
|
170
203
|
In the output files, simulation produces one folder with 4 subfolders. In subfolder `plots`, you can find plots that are the diagnostics of the algorithm. One of the most basic results you should see is the trajectories of cohesins (LEFs). this diagram should look like that,
|
|
@@ -6,7 +6,7 @@ with open('README.md', 'r', encoding='utf-8') as f:
|
|
|
6
6
|
|
|
7
7
|
setup(
|
|
8
8
|
name='pyLoopSage', # Package name
|
|
9
|
-
version='1.0.
|
|
9
|
+
version='1.0.3', # Version of the software
|
|
10
10
|
description='An energy-based stochastic model of loop extrusion in chromatin.',
|
|
11
11
|
long_description=long_description,
|
|
12
12
|
long_description_content_type='text/markdown',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|