Skip to content

Commit 1a9cf19

Browse files
committed
Allow the users to decide if they want the absolute betas
closes #279
1 parent 4b8d22f commit 1a9cf19

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: scripts/summarise_annotations.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ def get_options():
1919
parser.add_argument('--unadj-p',
2020
action='store_true',
2121
help='Use the unadjusted p-value (set if adjusted p-value not available)')
22+
parser.add_argument('--no-absolute-beta',
23+
action='store_true',
24+
help='Do not use the absolute value for the betas')
2225

2326
return parser.parse_args()
2427

@@ -55,7 +58,9 @@ def update_summary(summary, gene, pval, af, beta):
5558
sys.stderr.write("No adjusted p-value found; try with --unadj-p\n")
5659
else:
5760
pvalue = float(anot_fields[3])
58-
beta = abs(float(anot_fields[4]))
61+
beta = float(anot_fields[4])
62+
if not options.no_absolute_beta:
63+
beta = abs(beta)
5964
# double check that there are actual hits here
6065
if anot_fields[-1].count(';') == 0:
6166
sys.stderr.write('K-mer %s seemingly has no '

0 commit comments

Comments
 (0)