maradoner 0.14.3__tar.gz → 0.15.0__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.
Potentially problematic release.
This version of maradoner might be problematic. Click here for more details.
- {maradoner-0.14.3 → maradoner-0.15.0}/PKG-INFO +1 -1
- {maradoner-0.14.3 → maradoner-0.15.0}/maradoner/__init__.py +1 -1
- {maradoner-0.14.3 → maradoner-0.15.0}/maradoner/grn.py +9 -6
- {maradoner-0.14.3 → maradoner-0.15.0}/maradoner/main.py +3 -2
- {maradoner-0.14.3 → maradoner-0.15.0}/maradoner.egg-info/PKG-INFO +1 -1
- {maradoner-0.14.3 → maradoner-0.15.0}/README.md +0 -0
- {maradoner-0.14.3 → maradoner-0.15.0}/maradoner/create.py +0 -0
- {maradoner-0.14.3 → maradoner-0.15.0}/maradoner/dataset_filter.py +0 -0
- {maradoner-0.14.3 → maradoner-0.15.0}/maradoner/export.py +0 -0
- {maradoner-0.14.3 → maradoner-0.15.0}/maradoner/fit.py +0 -0
- {maradoner-0.14.3 → maradoner-0.15.0}/maradoner/mara/__init__.py +0 -0
- {maradoner-0.14.3 → maradoner-0.15.0}/maradoner/mara/export.py +0 -0
- {maradoner-0.14.3 → maradoner-0.15.0}/maradoner/mara/fit.py +0 -0
- {maradoner-0.14.3 → maradoner-0.15.0}/maradoner/mara/main.py +0 -0
- {maradoner-0.14.3 → maradoner-0.15.0}/maradoner/mara.py +0 -0
- {maradoner-0.14.3 → maradoner-0.15.0}/maradoner/meta_optimizer.py +0 -0
- {maradoner-0.14.3 → maradoner-0.15.0}/maradoner/select.py +0 -0
- {maradoner-0.14.3 → maradoner-0.15.0}/maradoner/synthetic_data.py +0 -0
- {maradoner-0.14.3 → maradoner-0.15.0}/maradoner/utils.py +0 -0
- {maradoner-0.14.3 → maradoner-0.15.0}/maradoner.egg-info/SOURCES.txt +0 -0
- {maradoner-0.14.3 → maradoner-0.15.0}/maradoner.egg-info/dependency_links.txt +0 -0
- {maradoner-0.14.3 → maradoner-0.15.0}/maradoner.egg-info/entry_points.txt +0 -0
- {maradoner-0.14.3 → maradoner-0.15.0}/maradoner.egg-info/requires.txt +0 -0
- {maradoner-0.14.3 → maradoner-0.15.0}/maradoner.egg-info/top_level.txt +0 -0
- {maradoner-0.14.3 → maradoner-0.15.0}/setup.cfg +0 -0
- {maradoner-0.14.3 → maradoner-0.15.0}/setup.py +0 -0
|
@@ -122,7 +122,7 @@ def bayesian_fdr_control(p0, alpha=0.05):
|
|
|
122
122
|
return discoveries, threshold
|
|
123
123
|
|
|
124
124
|
def grn(project_name: str, output: str, use_hdf=False, save_stat=True,
|
|
125
|
-
fdr_alpha=0.05, prior_h1=1/100):
|
|
125
|
+
fdr_alpha=0.05, prior_h1=1/100, include_mean: bool = True):
|
|
126
126
|
data = read_init(project_name)
|
|
127
127
|
fmt = data.fmt
|
|
128
128
|
with openers[fmt](f'{project_name}.fit.{fmt}', 'rb') as f:
|
|
@@ -178,13 +178,16 @@ def grn(project_name: str, output: str, use_hdf=False, save_stat=True,
|
|
|
178
178
|
os.makedirs(folder_stat, exist_ok=True)
|
|
179
179
|
os.makedirs(folder_belief, exist_ok=True)
|
|
180
180
|
for sigma, nu, name, inds in zip(promvar.T[..., None], nus, group_names, group_inds):
|
|
181
|
-
# if name != 'anconeus':
|
|
182
|
-
# continue
|
|
183
181
|
print(name)
|
|
184
182
|
var = (B_hat * nu + sigma)
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
theta = B[..., None] * U[:, inds]
|
|
183
|
+
|
|
184
|
+
Y_ = Y[:, inds][..., None, :]
|
|
185
|
+
theta = B[..., None] * U[:, inds]
|
|
186
|
+
if include_mean:
|
|
187
|
+
Y_ = Y_ + BM
|
|
188
|
+
theta = theta + BM
|
|
189
|
+
|
|
190
|
+
|
|
188
191
|
loglr = 2 * B * (Y_ * theta).sum(axis=-1) - B_pow * (theta ** 2).sum(axis=-1)
|
|
189
192
|
del Y_
|
|
190
193
|
del theta
|
|
@@ -320,12 +320,13 @@ def _grn(name: str = Argument(..., help='Project name'),
|
|
|
320
320
|
' comparable to the expression file size.'),
|
|
321
321
|
hdf: bool = Option(True, help='Use HDF format instead of tar.gz files. Typically eats much less space'),
|
|
322
322
|
stat: bool = Option(True, help='Save statistics alongside probabilities.'),
|
|
323
|
-
prior_h1: float = Option(1/10, help='Prior belief on the expected fraction of motifs active per promoter.')
|
|
323
|
+
prior_h1: float = Option(1/10, help='Prior belief on the expected fraction of motifs active per promoter.'),
|
|
324
|
+
means: bool = Option(True, help='Include motif-specific means in both H_0 and H_1 models, otherwise only activities deviations are being tested.')):
|
|
324
325
|
t0 = time()
|
|
325
326
|
p = Progress(SpinnerColumn(speed=0.5), TextColumn("[progress.description]{task.description}"), transient=True)
|
|
326
327
|
p.add_task(description="Building GRN...", total=None)
|
|
327
328
|
p.start()
|
|
328
|
-
grn(name, output=folder, use_hdf=hdf, save_stat=stat, prior_h1=prior_h1)
|
|
329
|
+
grn(name, output=folder, use_hdf=hdf, save_stat=stat, prior_h1=prior_h1, include_mean=means)
|
|
329
330
|
p.stop()
|
|
330
331
|
dt = time() - t0
|
|
331
332
|
rprint(f'[green][bold]✔️[/bold] Done![/green]\t time: {dt:.2f} s.')
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|