Skip to content

Commit

Permalink
added default executable shebang, fix for dfoil to no longer require …
Browse files Browse the repository at this point in the history
…the redundant "total" column
  • Loading branch information
James Pease committed Apr 7, 2015
1 parent 214512b commit ed9676f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
16 changes: 9 additions & 7 deletions dfoil.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
DFOIL: Directional introgression testing a five-taxon phylogeny
Expand Down Expand Up @@ -555,16 +556,17 @@ def main(arguments=sys.argv[1:]):
arr = line.rstrip().split()
window = DataWindow(meta=dict(
chrom=arr[0], position=int(arr[1]),
total=int(arr[2]), mode=args.mode,
mode=args.mode,
beta=(args.beta1, args.beta2, args.beta3)))
if window.meta['total'] < args.mintotal:
continue
if args.mode in ["dfoil", "partitioned"]:
window.counts = dict([(j - 3) * 2, int(arr[j])]
for j in xrange(3, 19))
window.counts = dict([(j - 2) * 2, int(arr[j])]
for j in xrange(2, 18))
elif args.mode == 'dstat':
window.counts = dict([(j - 3) * 2, int(arr[j])]
for j in xrange(3, 11))
window.counts = dict([(j - 2) * 2, int(arr[j])]
for j in xrange(2, 9))
if sum(window.counts.values()) < args.mintotal:
continue
window.meta['total'] = sum(window.counts.values())
window.dcalc(mincount=args.mincount)
window.calc_signature(pvalue_cutoffs=args.pvalue)
window_data.append(window)
Expand Down
1 change: 1 addition & 0 deletions dfoil_analyze.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
DFOIL: Directional introgression testing a five-taxon phylogeny
Expand Down
1 change: 1 addition & 0 deletions dfoil_sim.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
DFOIL: Directional introgression testing a five-taxon phylogeny
Expand Down

0 comments on commit ed9676f

Please sign in to comment.