Skip to content

Commit

Permalink
Update combineKinship.py
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanxw committed Sep 7, 2017
1 parent 1dbbbd9 commit 72ab223
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions misc/combineKinship.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
#!/usr/bin/env python
import sys, os, re
try:
from XiaoweiLib import myopen
except:
sys.path = [re.sub(r'^/home/zhanxw/', '/net/fantasia/home/zhanxw/', x) for x in sys.path]
sys.path.append('/net/nfsb/fantasia/home/zhanxw/mylib/Python/')
from XiaoweiLib import myopen

# convenient functions
def myopen(fn):
import gzip
f = gzip.open(fn)
try:
f.read(2)
f.close()
return gzip.open(fn)
except:
f.close()
return open(fn)

def usage():
print("%s -o prefix in1.kinship in2.kinship ..." % sys.argv[0] )
Expand Down

0 comments on commit 72ab223

Please sign in to comment.