Skip to content

Commit 103a7c5

Browse files
committed
fix errors in tests of example data
1 parent 08de83b commit 103a7c5

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ def include_dirs(self, dirs):
5656

5757
setup(name='snipar',
5858
version='0.0.20',
59-
description='Library and command line scripts for inferring identity-by-descent (IBD) segments shared between siblings, imputing missing parental genotypes, and for performing family based genome-wide association and polygenic score analyses.',
59+
description='Library and command line scripts for inferring identity-by-descent (IBD) segments shared between siblings, imputing missing parental genotypes, performing family based genome-wide association and polygenic score analyses.',
6060
long_description = long_description,
6161
long_description_content_type="text/markdown",
6262
url='https://github.com/alexTISYoung/snipar',
6363
download_url='https://pypi.org/project/snipar/files',
64-
author='Alexander I. Young, Moeen Nehzati',
64+
author='Alexander Strudwick Young, Moeen Nehzati, Junming Guan',
6565
author_email='[email protected]',
6666
license='MIT',
6767
include_package_data=True,

snipar/example/example_data/estimate_sim_effects.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
breg[i,1] = 1/np.var(b[:,i])
2626
breg[i,0] = np.cov(b[:,i],ests[:,i])[0,1]*breg[i,1]
2727
sigma2 = np.var(ests[:,i]-breg[i,0]*b[:,i])
28-
breg[i,1] = np.sqrt(sigma2*breg[i,1]/np.float(b.shape[0]))
28+
breg[i,1] = np.sqrt(sigma2*breg[i,1]/float(b.shape[0]))
2929

3030
breg[3,0] = np.cov(avg_parental[:,0],(b[:,1]+b[:,2])/2.0)[0,1]/np.var((b[:,1]+b[:,2])/2.0)
3131
sigma2 = np.var(avg_parental[:,0]-breg[3,0]*(b[:,1]+b[:,2])/2.0)
@@ -40,7 +40,7 @@
4040
breg[i,1] = 1/np.var(b[:,i])
4141
breg[i,0] = np.cov(b[:,i],ests[:,i])[0,1]*breg[i,1]
4242
sigma2 = np.var(ests[:,i]-breg[i,0]*b[:,i])
43-
breg[i,1] = np.sqrt(sigma2*breg[i,1]/np.float(b.shape[0]))
43+
breg[i,1] = np.sqrt(sigma2*breg[i,1]/float(b.shape[0]))
4444

4545

4646

snipar/tests/test_example.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ def test_example(self):
1111
commands2 = [
1212
"ibd.py --bed chr_@ --king king.kin0 --agesex agesex.txt --out chr_@ --threads 4 --ld_out",#TODO add option of supressing logging in snipar
1313
"impute.py --ibd [email protected] --bed chr_@ --king king.kin0 --agesex agesex.txt --out chr_@ --threads 4 -silent_progress",
14-
"gwas.py phenotype.txt --bed chr_@ --imp chr_@ --threads 4",
14+
"gwas.py phenotype.txt --bed chr_@ --imp chr_@ --threads 4 --out chr_@",
1515
"python estimate_sim_effects.py chr_1.sumstats.hdf5 phenotype.effects.txt",
1616
"correlate.py chr_@ effect --ldscores chr_@",
17-
"pgs.py direct --bed chr_@ --imp chr_@ --weights direct_weights.txt",
17+
"pgs.py direct --bed chr_@ --imp chr_@ --weights direct_weights.txt --A1 nt1 --A2 nt2 --beta_col ldpred_beta --SNP sid",
1818
]
1919
stdout = subprocess.DEVNULL
2020
if self.log:

0 commit comments

Comments
 (0)