Skip to content

Commit

Permalink
bug fix in support for organisms with a different number of chromosomes
Browse files Browse the repository at this point in the history
  • Loading branch information
omerwe committed May 5, 2024
1 parent af252e4 commit 05fcd49
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ldsc.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,9 @@ def ldscore(args, log):
parser.add_argument('--num-chr-sets', type=int, default=22,
help='Number of chromosome sets for loco computations')

parser.add_argument('--num-chr', type=int, default=22,
help='Number of chromosomes for the target organism (default is 22)')


parser.add_argument('--no-standardize-ridge', default=False, action='store_true',
help='disable Ridge standardization')
Expand Down
1 change: 1 addition & 0 deletions ldsc_polyfun/sumstats.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ def _merge_and_log(ld, sumstats, noun, log):


def _read_ld_sumstats(args, log, fh, alleles=True, dropna=True):
_N_CHR = args.num_chr
sumstats = _read_sumstats(args, log, fh, alleles=alleles, dropna=dropna)
ref_ld = _read_ref_ld(args, log)
n_annot = len(ref_ld.columns) - 2 #Changed to -2 because we also have chromosome column now
Expand Down

0 comments on commit 05fcd49

Please sign in to comment.