Skip to content

Commit 688f5b1

Browse files
committed
update README
1 parent 9415434 commit 688f5b1

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ concept_fscores_dataframe, motif_cav_trainers, bed_cav_trainer = run_tpcav(
7272
num_motif_insertions=[4, 8],
7373
bed_seq_file=bed_seq_concept,
7474
output_dir="test_run_tpcav_output/",
75-
input_transform_func=transform_fasta_to_one_hot_seq)
75+
input_transform_func=transform_fasta_to_one_hot_seq,
76+
p=4) # number of concurrent SGDClassifier can be run at the same time, increase it if you have available CPU power, it speeds up training significantly
7677

7778
#==================== Compuate layer attributions of target testing regions ================================
7879
# retrieve the tpcav model
@@ -91,6 +92,10 @@ attributions = tpcav_model.layer_attributions(pack_data_iters(random_regions_1),
9192
# compute TPCAV scores for the concept
9293
# here uses bed_cav_trainer that contains the concepts provided from bed file
9394
bed_cav_trainer.tpcav_score_all_concepts_log_ratio(attributions)
95+
96+
# save the trainers for future use
97+
torch.save(motif_cav_trainers, "motif_cav_trainers.pt")
98+
torch.save(bed_cav_trainer, "bed_cav_trainer.pt")
9499
```
95100

96101
## Output

0 commit comments

Comments
 (0)