Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
asistradition committed Oct 30, 2023
1 parent c9bb190 commit f7c1aad
Show file tree
Hide file tree
Showing 7 changed files with 1,219 additions and 415 deletions.
11 changes: 5 additions & 6 deletions inferelator_prior/encode_to_prior.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ def main():
long_df, wide_df = encode_prior(
args.linked,
args.mask,
return_long=args.wide
)

wide_df.to_csv(
Expand Down Expand Up @@ -97,7 +96,7 @@ def encode_prior(
:param overlap_requirement: How much of the TF-ChIP peak has to overlap
with the regulatory region, defaults to 0.75
:type overlap_requirement: float, optional
:return: Long TF
:return: Wide TF
:rtype: _type_
"""

Expand Down Expand Up @@ -137,19 +136,19 @@ def encode_prior(
axis=0
)

wide_prior = all_prior.pivot_table(
score_prior = all_prior.pivot_table(
values=BED_SIGNAL_COL,
index=GENE_COL,
columns=ENCODE_TF_COL,
fill_value=0,
aggfunc='sum'
)

wide_prior.index.name = None
wide_prior.columns.name = None
score_prior.index.name = None
score_prior.columns.name = None

wide_prior = build_prior_from_motifs(
wide_prior,
score_prior,
num_workers=None,
seed=random_seed,
do_threshold=do_thresholding
Expand Down
Loading

0 comments on commit f7c1aad

Please sign in to comment.