MultiMM 1.0.22__tar.gz → 1.0.24__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: MultiMM
3
- Version: 1.0.22
3
+ Version: 1.0.24
4
4
  Summary: A tool for chromatin modeling from nucleosomes to chromosomal territories.
5
5
  Home-page: https://github.com/SFGLab/MultiMM
6
6
  Author: Sebastian Korsak
@@ -237,8 +237,9 @@ Therefore, it is advisable to read the paper and understand well the meaning of
237
237
  | Argument Name | Type | Value | Units | Description |
238
238
  |------------------------------|--------------|-------------|---------------|-------------|
239
239
  | PLATFORM | str | CPU | CPU | name of the platform. Available choices: CPU, OpenCL, CUDA. |
240
+ | CPU_THREADS | int | None | None | Number of CPU threads (in case that CPU is chosen as platform). |
240
241
  | DEVICE | str | None | None | device index for CUDA or OpenCL (count from 0) |
241
- | MAGIC_ARGUMENT | str | None | None | Helping function to specify parameters of simulation. Choose 'GENE', 'CHROM' or 'GW' depending on the resolution of interest. |
242
+ | MODELLING_LEVEL | str | None | None | Helping function to specify parameters of simulation. Choose 'GENE', 'CHROM' or 'GW' depending on the resolution of interest. |
242
243
  | INITIAL_STRUCTURE_PATH | str | None | None | Path to CIF file. |
243
244
  | BUILD_INITIAL_STRUCTURE | bool | True | None | To build a new initial structure. |
244
245
  | INITIAL_STRUCTURE_TYPE | str | hilbert | None | you can choose between: hilbert, circle, rw, confined_rw, self_avoiding_rw, helix, spiral, sphere, knot. |
@@ -255,7 +256,7 @@ Therefore, it is advisable to read the paper and understand well the meaning of
255
256
  | GENE_TSV | str | '' | None | A .tsv with genes and their locations in the genome. |
256
257
  | GENE_NAME | str | '' | None | The name of the gene of interest. |
257
258
  | GENE_ID | str | '' | None | The id of the gene of interest. |
258
- | GENE_WINDOW | int | 200000| bp | The window around the area of the gene of interest. |
259
+ | GENE_WINDOW | int | 500000| bp | The window around the area of the gene of interest. |
259
260
  | LOC_START | int | None | None | Starting region coordinate (*in case that you do not want to model the whole genome*). |
260
261
  | LOC_END | int | None | None | Ending region coordinate (*in case that you do not want to model the whole genome*). |
261
262
  | CHROM | str | None | None | Chromosome that corresponds the the modelling region of interest (*in case that you do not want to model the whole genome*). |
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: MultiMM
3
- Version: 1.0.22
3
+ Version: 1.0.24
4
4
  Summary: A tool for chromatin modeling from nucleosomes to chromosomal territories.
5
5
  Home-page: https://github.com/SFGLab/MultiMM
6
6
  Author: Sebastian Korsak
@@ -237,8 +237,9 @@ Therefore, it is advisable to read the paper and understand well the meaning of
237
237
  | Argument Name | Type | Value | Units | Description |
238
238
  |------------------------------|--------------|-------------|---------------|-------------|
239
239
  | PLATFORM | str | CPU | CPU | name of the platform. Available choices: CPU, OpenCL, CUDA. |
240
+ | CPU_THREADS | int | None | None | Number of CPU threads (in case that CPU is chosen as platform). |
240
241
  | DEVICE | str | None | None | device index for CUDA or OpenCL (count from 0) |
241
- | MAGIC_ARGUMENT | str | None | None | Helping function to specify parameters of simulation. Choose 'GENE', 'CHROM' or 'GW' depending on the resolution of interest. |
242
+ | MODELLING_LEVEL | str | None | None | Helping function to specify parameters of simulation. Choose 'GENE', 'CHROM' or 'GW' depending on the resolution of interest. |
242
243
  | INITIAL_STRUCTURE_PATH | str | None | None | Path to CIF file. |
243
244
  | BUILD_INITIAL_STRUCTURE | bool | True | None | To build a new initial structure. |
244
245
  | INITIAL_STRUCTURE_TYPE | str | hilbert | None | you can choose between: hilbert, circle, rw, confined_rw, self_avoiding_rw, helix, spiral, sphere, knot. |
@@ -255,7 +256,7 @@ Therefore, it is advisable to read the paper and understand well the meaning of
255
256
  | GENE_TSV | str | '' | None | A .tsv with genes and their locations in the genome. |
256
257
  | GENE_NAME | str | '' | None | The name of the gene of interest. |
257
258
  | GENE_ID | str | '' | None | The id of the gene of interest. |
258
- | GENE_WINDOW | int | 200000| bp | The window around the area of the gene of interest. |
259
+ | GENE_WINDOW | int | 500000| bp | The window around the area of the gene of interest. |
259
260
  | LOC_START | int | None | None | Starting region coordinate (*in case that you do not want to model the whole genome*). |
260
261
  | LOC_END | int | None | None | Ending region coordinate (*in case that you do not want to model the whole genome*). |
261
262
  | CHROM | str | None | None | Chromosome that corresponds the the modelling region of interest (*in case that you do not want to model the whole genome*). |
@@ -196,8 +196,9 @@ Therefore, it is advisable to read the paper and understand well the meaning of
196
196
  | Argument Name | Type | Value | Units | Description |
197
197
  |------------------------------|--------------|-------------|---------------|-------------|
198
198
  | PLATFORM | str | CPU | CPU | name of the platform. Available choices: CPU, OpenCL, CUDA. |
199
+ | CPU_THREADS | int | None | None | Number of CPU threads (in case that CPU is chosen as platform). |
199
200
  | DEVICE | str | None | None | device index for CUDA or OpenCL (count from 0) |
200
- | MAGIC_ARGUMENT | str | None | None | Helping function to specify parameters of simulation. Choose 'GENE', 'CHROM' or 'GW' depending on the resolution of interest. |
201
+ | MODELLING_LEVEL | str | None | None | Helping function to specify parameters of simulation. Choose 'GENE', 'CHROM' or 'GW' depending on the resolution of interest. |
201
202
  | INITIAL_STRUCTURE_PATH | str | None | None | Path to CIF file. |
202
203
  | BUILD_INITIAL_STRUCTURE | bool | True | None | To build a new initial structure. |
203
204
  | INITIAL_STRUCTURE_TYPE | str | hilbert | None | you can choose between: hilbert, circle, rw, confined_rw, self_avoiding_rw, helix, spiral, sphere, knot. |
@@ -214,7 +215,7 @@ Therefore, it is advisable to read the paper and understand well the meaning of
214
215
  | GENE_TSV | str | '' | None | A .tsv with genes and their locations in the genome. |
215
216
  | GENE_NAME | str | '' | None | The name of the gene of interest. |
216
217
  | GENE_ID | str | '' | None | The id of the gene of interest. |
217
- | GENE_WINDOW | int | 200000| bp | The window around the area of the gene of interest. |
218
+ | GENE_WINDOW | int | 500000| bp | The window around the area of the gene of interest. |
218
219
  | LOC_START | int | None | None | Starting region coordinate (*in case that you do not want to model the whole genome*). |
219
220
  | LOC_END | int | None | None | Ending region coordinate (*in case that you do not want to model the whole genome*). |
220
221
  | CHROM | str | None | None | Chromosome that corresponds the the modelling region of interest (*in case that you do not want to model the whole genome*). |
@@ -6,7 +6,7 @@ with open('README.md', 'r', encoding='utf-8') as f:
6
6
 
7
7
  setup(
8
8
  name='MultiMM', # Package name
9
- version='1.0.22', # Version of the software
9
+ version='1.0.24', # Version of the software
10
10
  description='A tool for chromatin modeling from nucleosomes to chromosomal territories.',
11
11
  long_description=long_description,
12
12
  long_description_content_type='text/markdown',
@@ -1,4 +1,4 @@
1
1
  # Importing specific functions or classes from submodules
2
2
  from .run import main
3
3
 
4
- __version__ = "1.0.22"
4
+ __version__ = "1.0.24"
@@ -133,8 +133,9 @@ available_platforms = [mm.Platform.getPlatform(i).getName() for i in range(mm.Pl
133
133
  args = ListOfArgs([
134
134
  # Platform settings
135
135
  Arg('PLATFORM', help=f"name of the platform. Available choices: {' '.join(available_platforms)}", type=str, default='CPU', val='CPU'),
136
+ Arg('CPU_THREADS', help=f"The number of CPU threads (in case you would like to specify them).", type=int, default='', val=''),
136
137
  Arg('DEVICE', help="device index for CUDA or OpenCL (count from 0)", type=str, default='', val=''),
137
- Arg('MAGIC_ARGUMENT', help="Choose 'GENE' or 'REGION' for gene or TAD level, 'CHROM' for chromosome leve, and 'GW' for genome level. It will setup some parameters for you and print you helpful comments.", type=str, default='', val=''),
138
+ Arg('MODELLING_LEVEL', help="Choose 'GENE' or 'REGION' for gene or TAD level, 'CHROM' for chromosome leve, and 'GW' for genome level. It will setup some parameters for you and print you helpful comments.", type=str, default='', val=''),
138
139
 
139
140
  # Input data
140
141
  Arg('INITIAL_STRUCTURE_PATH', help="Path to CIF file.", type=str, default='', val=''),
@@ -151,7 +152,7 @@ args = ListOfArgs([
151
152
  Arg('GENE_TSV', help="A .tsv with genes and their locations in the genome.", type=str, default='', val=''),
152
153
  Arg('GENE_NAME', help="The name of the gene of interest.", type=str, default='', val=''),
153
154
  Arg('GENE_ID', help="The id of the gene of interest.", type=str, default='', val=''),
154
- Arg('GENE_WINDOW', help="The window around of the area around the gene of interest.", type=int, default='200000', val='200000'),
155
+ Arg('GENE_WINDOW', help="The window around of the area around the gene of interest.", type=int, default='500000', val='500000'),
155
156
  Arg('ATACSEQ_PATH', help="A .bw or .BigWig file path with atacseq data. It is not required.", type=str, default='', val=''),
156
157
  Arg('OUT_PATH', help="Output folder name.", type=str, default='results', val='results'),
157
158
  Arg('LOC_START', help="Starting region coordinate.", type=int, default='', val=''),
@@ -101,7 +101,7 @@ class MultiMM:
101
101
  def convenient_argument_changer(self):
102
102
  self.args.NUC_DO_INTERPOLATION = False
103
103
  self.args.ATACSEQ_PATH = None
104
- if self.args.MAGIC_ARGUMENT=='GENE' or self.args.MAGIC_ARGUMENT=='REGION' or self.args.MAGIC_ARGUMENT=='TAD':
104
+ if self.args.MODELLING_LEVEL=='GENE' or self.args.MODELLING_LEVEL=='REGION' or self.args.MODELLING_LEVEL=='TAD':
105
105
  print('\033[91m' + 'MAGIC COMMENT: For gene level it is needed to provide a loops_path, a gene_tsv file, and a gene_name or gene_id to specify the target gene of interest.'+ '\033[0m')
106
106
  self.args.N_BEADS=1000
107
107
  self.args.SC_USE_SPHERICAL_CONTAINER=False
@@ -113,7 +113,7 @@ class MultiMM:
113
113
  self.args.SHUFFLE_CHROMS=False
114
114
  self.args.SIM_RUN_MD=True
115
115
  self.args.SIM_N_STEPS=10000
116
- elif self.args.MAGIC_ARGUMENT=='CHROMOSOME' or self.args.MAGIC_ARGUMENT=='CHROM' or self.args.MAGIC_ARGUMENT=='COMP':
116
+ elif self.args.MODELLING_LEVEL=='CHROMOSOME' or self.args.MODELLING_LEVEL=='CHROM' or self.args.MODELLING_LEVEL=='COMP':
117
117
  print('\033[91m' + 'MAGIC COMMENT: For chromosome level it is needed to provide a loops_path. Do not forget to specify the beggining and end of your chromosome. You can remove the centromers or telomers that are in the boundaries. You can optionally add an eigenvector_tsv to include block-copolymer forces.'+ '\033[0m')
118
118
  self.args.N_BEADS=20000
119
119
  self.args.SC_USE_SPHERICAL_CONTAINER=False
@@ -124,7 +124,7 @@ class MultiMM:
124
124
  self.args.CF_USE_CENTRAL_FORCE=False
125
125
  self.args.SIM_RUN_MD=True
126
126
  self.args.SIM_N_STEPS=10000
127
- elif self.args.MAGIC_ARGUMENT=='GW' or self.args.MAGIC_ARGUMENT=='GENOME':
127
+ elif self.args.MODELLING_LEVEL=='GW' or self.args.MODELLING_LEVEL=='GENOME':
128
128
  print('\033[91m' + 'MAGIC COMMENT: For gw level it is needed to provide a loops_path. You can optionally add an eigenvector_tsv to include block-copolymer forces.'+ '\033[0m')
129
129
  self.args.N_BEADS=200000
130
130
  self.args.SC_USE_SPHERICAL_CONTAINER=True
@@ -309,6 +309,8 @@ class MultiMM:
309
309
  except Exception as e:
310
310
  print(f"Failed to find {self.args.PLATFORM}: {e}. Falling back to CPU.")
311
311
  platform = mm.Platform.getPlatformByName('CPU')
312
+ if self.args.PLATFORM=='CPU' and self.args.CPU_THREADS!=None:
313
+ platform.setPropertyDefaultValue('Threads', f'{self.args.CPU_THREADS}')
312
314
 
313
315
  # Run the simulation
314
316
  self.simulation = Simulation(self.pdb.topology, self.system, self.integrator, platform)
@@ -289,6 +289,8 @@ def import_mns_from_bedpe(bedpe_file, N_beads, coords=None, chrom=None, threshol
289
289
  mns, cs = np.vstack((loops['ms'].values[counts>threshold], loops['ns'].values[counts>threshold])), counts[counts>threshold]
290
290
  mns, idxs = np.unique(mns,axis=1,return_index=True)
291
291
  cs = cs[idxs]
292
+ if cs.size == 0:
293
+ raise ValueError("The region of interest does not include loops. Please try with longer modelling region or increase the window around the gene.")
292
294
  ms, ns = mns[0,:], mns[1,:]
293
295
  ms[ms>=N_beads],ns[ns>=N_beads]=N_beads-1, N_beads-1
294
296
  ms,ns,cs = ms[ns>ms+min_loop_dist], ns[ns>ms+min_loop_dist], cs[ns>ms+min_loop_dist]
File without changes
File without changes
File without changes
File without changes