Skip to content

Commit

Permalink
lint(call): fix type hinting
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Oct 27, 2023
1 parent 7a4c7c8 commit a6af2e1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions strkit/call/allele.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ def fit_gmm(

class CallDict(TypedDict):
call: Union[NDArray[np.int32], NDArray[np.float_]]
call_95_cis: Union[NDArray[NDArray[np.int32]], NDArray[NDArray[np.float_]]]
call_99_cis: Union[NDArray[NDArray[np.int32]], NDArray[NDArray[np.float_]]]
call_95_cis: Union[NDArray[np.int32], NDArray[np.float_]] # 2D arrays
call_99_cis: Union[NDArray[np.int32], NDArray[np.float_]] # 2D arrays
peaks: NDArray[np.float_]
peak_weights: NDArray[np.float_]
peak_stdevs: NDArray[np.float_]
Expand Down Expand Up @@ -203,11 +203,13 @@ def call_alleles(
call = np.array([cn] * n_alleles)
call_cis = np.array([[cn, cn] for _ in range(n_alleles)])

peaks: NDArray[np.float_] = np.array([cn] * n_alleles, dtype=np.float_)

return {
"call": _array_as_int(call) if force_int else call,
"call_95_cis": _array_as_int(call_cis) if force_int else call,
"call_99_cis": _array_as_int(call_cis) if force_int else call,
"peaks": np.array([cn] * n_alleles, dtype=np.float_),
"peaks": peaks,
"peak_weights": np.array([1.0] * n_alleles) / n_alleles,
"peak_stdevs": np.array([0.0] * n_alleles),
"modal_n_peaks": 1, # 1 peak, since we have 1 value
Expand Down

0 comments on commit a6af2e1

Please sign in to comment.