tpcav 0.2.0__py3-none-any.whl → 0.2.1__py3-none-any.whl

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.
tpcav/cavs.py CHANGED
@@ -409,8 +409,11 @@ def run_tpcav(
409
409
  output_dir: str = "tpcav/",
410
410
  num_samples_for_pca=10,
411
411
  num_samples_for_cav=1000,
412
+ input_window_length=1024,
413
+ batch_size=8,
412
414
  bws=None,
413
415
  input_transform_func=helper.fasta_chrom_to_one_hot_seq,
416
+ p=4
414
417
  ):
415
418
  """
416
419
  One-stop function to compute CAVs on motif concepts and bed concepts, compute AUC of motif concept f-scores after correction
@@ -427,12 +430,12 @@ def run_tpcav(
427
430
  for nm in num_motif_insertions:
428
431
  builder = ConceptBuilder(
429
432
  genome_fasta=genome_fasta,
430
- input_window_length=1024,
433
+ input_window_length=input_window_length,
431
434
  bws=bws,
432
435
  num_motifs=nm,
433
436
  include_reverse_complement=True,
434
437
  min_samples=num_samples_for_cav,
435
- batch_size=8,
438
+ batch_size=batch_size,
436
439
  )
437
440
  # use random regions as control
438
441
  builder.build_control()
@@ -449,12 +452,12 @@ def run_tpcav(
449
452
  if bed_seq_file is not None or bed_chrom_file is not None:
450
453
  bed_builder = ConceptBuilder(
451
454
  genome_fasta=genome_fasta,
452
- input_window_length=1024,
455
+ input_window_length=input_window_length,
453
456
  bws=bws,
454
457
  num_motifs=0,
455
458
  include_reverse_complement=True,
456
459
  min_samples=num_samples_for_cav,
457
- batch_size=8,
460
+ batch_size=batch_size,
458
461
  )
459
462
  # use random regions as control
460
463
  bed_builder.build_control()
@@ -493,7 +496,7 @@ def run_tpcav(
493
496
  [motif_concept,],
494
497
  num_samples_for_cav,
495
498
  output_dir=str(output_path / f"cavs_{nm}_motifs/"),
496
- num_processes=4,
499
+ num_processes=p,
497
500
  )
498
501
  motif_cav_trainers[nm] = cav_trainer
499
502
  if bed_builder is not None:
@@ -505,7 +508,7 @@ def run_tpcav(
505
508
  bed_builder.concepts,
506
509
  num_samples_for_cav,
507
510
  output_dir=str(output_path / f"cavs_bed_concepts/"),
508
- num_processes=4,
511
+ num_processes=p,
509
512
  )
510
513
  else:
511
514
  bed_cav_trainer = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tpcav
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Testing with PCA projected Concept Activation Vectors
5
5
  Author-email: Jianyu Yang <yztxwd@gmail.com>
6
6
  License-Expression: MIT AND (Apache-2.0 OR BSD-2-Clause)
@@ -1,12 +1,12 @@
1
1
  tpcav/__init__.py,sha256=CpHijSyE1HMy8dlvdSaYrwN9gYMGDEJGDdsneNWnqdA,996
2
- tpcav/cavs.py,sha256=lqw-V45FCiCNUC8w7payuSPsbMBFy_qcOZaqPGA68js,19195
2
+ tpcav/cavs.py,sha256=qXeNiTqlrCPb824ivVvZNrhHSZ6YRx2xmjdZ9JTlAgM,19299
3
3
  tpcav/concepts.py,sha256=_ht4UTu2EVJh52JGnKT3PEgDHk4Q-JCpNuHfFOVmzCw,12884
4
4
  tpcav/helper.py,sha256=CcNFJEFG00pujUrthBoMInpIBz1mWIG3y5fztaiHO-c,9917
5
5
  tpcav/logging_utils.py,sha256=wug7O_5IjxjhOpQr-aq90qKMEUp1EgcPkrv26d8li6Q,281
6
6
  tpcav/tpcav_model.py,sha256=XgNLPXr6_B-Dyb7RdgsUsFnrSK6oNjqqFPOjpz1wXmM,16564
7
7
  tpcav/utils.py,sha256=s2TfC-YoH_xa73WuMqvtpuqzx6g3ne12hE90Yg9hToY,21502
8
- tpcav-0.2.0.dist-info/licenses/LICENSE,sha256=uC-2s0ObLnQzWFKH5aokHXo6CzxlJgeI0P3bIUCZgfU,1064
9
- tpcav-0.2.0.dist-info/METADATA,sha256=tz5MWTr_-veczwEOPDGUzLEwy3XU9WLlSw4IPOzddc0,3502
10
- tpcav-0.2.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
11
- tpcav-0.2.0.dist-info/top_level.txt,sha256=I9veSE_WsuFYrXlcfRevqtatDyWWZNsWA3dV0CeBXVg,6
12
- tpcav-0.2.0.dist-info/RECORD,,
8
+ tpcav-0.2.1.dist-info/licenses/LICENSE,sha256=uC-2s0ObLnQzWFKH5aokHXo6CzxlJgeI0P3bIUCZgfU,1064
9
+ tpcav-0.2.1.dist-info/METADATA,sha256=XaYcUWr6humOfiUhwgKrccufSqDl_XiAutlO_wCf4lo,3502
10
+ tpcav-0.2.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
11
+ tpcav-0.2.1.dist-info/top_level.txt,sha256=I9veSE_WsuFYrXlcfRevqtatDyWWZNsWA3dV0CeBXVg,6
12
+ tpcav-0.2.1.dist-info/RECORD,,
File without changes