Skip to content

Commit

Permalink
refactor(scar): not output native frequencies by default
Browse files Browse the repository at this point in the history
  • Loading branch information
CaibinSh committed Aug 7, 2024
1 parent 6529b97 commit 4ba263a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scar/main/_scar.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ def inference(
cutoff=3,
round_to_int="stochastic_rounding",
clip_to_obs=False,
get_native_frequencies=True,
get_native_frequencies=False,
moi=None,
):
"""inference infering the expected native signals, noise ratios, Bayesfactors and expected native frequencies
Expand Down Expand Up @@ -605,7 +605,8 @@ def inference(
n_features = self.n_features
sample_size = self.raw_count.shape[0]

native_counts = sparse.lil_matrix((sample_size, n_features), dtype=np.int64)
dt = np.int64 if round_to_int=="stochastic_rounding" else np.float32
native_counts = sparse.lil_matrix((sample_size, n_features), dtype=dt)
noise_ratio = sparse.lil_matrix((sample_size, 1), dtype=np.float32)

native_frequencies = sparse.lil_matrix((sample_size, n_features), dtype=np.float32) if get_native_frequencies else None
Expand Down

0 comments on commit 4ba263a

Please sign in to comment.