Skip to content

Commit

Permalink
fix bug when using only a single annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
omerwe committed Apr 27, 2022
1 parent 8c4927f commit 594df4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ldsc_polyfun/irwls.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def irwls(cls, x, y, update_func, n_blocks, w, slow=False, separators=None):
x, y, n_blocks, separators=separators)
else:
jknife = jk.LstsqJackknifeFast(
x, y, n_blocks, separators=separators)
x, y, n_blocks=n_blocks, separators=separators)

return jknife

Expand Down
4 changes: 2 additions & 2 deletions ldsc_polyfun/jackknife.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def delete_values(cls, x, y, func, s):
return np.concatenate(d, axis=0)


def __init__(self, x, y, is_large_chi2, n_blocks=None, nn=False, separators=None, chr_num=None, evenodd_split=False, nnls_exact=False):
def __init__(self, x, y, is_large_chi2=False, n_blocks=None, nn=False, separators=None, chr_num=None, evenodd_split=False, nnls_exact=False):

Jackknife.__init__(self, x, y, n_blocks, separators)

Expand Down Expand Up @@ -323,7 +323,7 @@ def __init__(self, x, y, is_large_chi2, n_blocks=None, nn=False, separators=None

class LstsqJackknifeFast(Jackknife):

def __init__(self, x, y, is_large_chi2, n_blocks=None, separators=None, chr_num=None, evenodd_split=False):
def __init__(self, x, y, is_large_chi2=False, n_blocks=None, separators=None, chr_num=None, evenodd_split=False):

#compute jackknife estimates using all SNPs
Jackknife.__init__(self, x, y, n_blocks, separators)
Expand Down

0 comments on commit 594df4f

Please sign in to comment.