Skip to content

Commit 05fcd49

Browse files
committed
bug fix in support for organisms with a different number of chromosomes
1 parent af252e4 commit 05fcd49

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

ldsc.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,9 @@ def ldscore(args, log):
603603
parser.add_argument('--num-chr-sets', type=int, default=22,
604604
help='Number of chromosome sets for loco computations')
605605

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

607610
parser.add_argument('--no-standardize-ridge', default=False, action='store_true',
608611
help='disable Ridge standardization')

ldsc_polyfun/sumstats.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ def _merge_and_log(ld, sumstats, noun, log):
248248

249249

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

0 commit comments

Comments
 (0)