Mercurial > repos > iuc > heinz
annotate heinz_scoring.py @ 0:e41ec5af7472 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
author | iuc |
---|---|
date | Thu, 02 Aug 2018 11:57:44 -0400 |
parents | |
children | 5f589c91566e |
rev | line source |
---|---|
0
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
1 #!/usr/bin/env python |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
2 """Calculate scores for Heinz. |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
3 |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
4 This script transform a p-value into a score: |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
5 1. Use alpha and lambda to calculate a threshold P-value. |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
6 2. Calculate a score based on each P-value by alpha and the threshold. |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
7 |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
8 For more details, please refer to the paper doi:10.1093/bioinformatics/btn161 |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
9 |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
10 Input: |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
11 P-values from DESeq2 result: first column: names, second column P-values |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
12 Output: |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
13 Scores, which will be used as the input of Heinz. |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
14 First column: names, second column: scores. |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
15 |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
16 Python 3 is required. |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
17 """ |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
18 # Implemented by: Chao (Cico) Zhang |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
19 # Homepage: https://Hi-IT.org |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
20 # Date: 14 Mar 2017 |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
21 # Last modified: 23 May 2018 |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
22 |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
23 import argparse |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
24 import sys |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
25 |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
26 import numpy as np |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
27 import pandas as pd |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
28 |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
29 |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
30 parser = argparse.ArgumentParser(description='Transform a P-value into a ' |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
31 'score which can be used as the input of ' |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
32 'Heinz') |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
33 parser.add_argument('-n', '--node', required=True, dest='nodes', |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
34 metavar='nodes_pvalue.txt', type=str, |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
35 help='Input file of nodes with P-values') |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
36 parser.add_argument('-f', '--fdr', required=True, dest='fdr', |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
37 metavar='0.007', type=float, help='Choose a value of FDR') |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
38 parser.add_argument('-m', '--model', required=False, dest='param_file', |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
39 metavar='param.txt', type=str, |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
40 help='A txt file contains model params as input') |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
41 parser.add_argument('-a', '--alpha', required=False, dest='alpha', |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
42 metavar='0.234', type=float, default=0.5, |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
43 help='Single parameter alpha as input if txt input is ' |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
44 'not provided') |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
45 parser.add_argument('-l', '--lambda', required=False, dest='lam', |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
46 metavar='0.345', type=float, default=0.5, |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
47 help='Single parameter lambda as input if txt input is ' |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
48 'not provided') |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
49 parser.add_argument('-o', '--output', required=True, dest='output', |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
50 metavar='scores.txt', type=str, |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
51 help='The output file to store the calculated scores') |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
52 args = parser.parse_args() |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
53 |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
54 # Check if the parameters are complete |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
55 if args.output is None: |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
56 sys.exit('Output file is not designated.') |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
57 |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
58 if args.nodes is None: |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
59 sys.exit('Nodes with p-values must be provided.') |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
60 |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
61 if args.fdr is None: |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
62 sys.exit('FDR must be provided') |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
63 |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
64 if args.fdr >= 1 or args.fdr <= 0: |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
65 sys.exit('FDR must greater than 0 and smaller than 1') |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
66 |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
67 # run heinz-print according to the input type |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
68 if args.param_file is not None: # if BUM output is provided |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
69 with open(args.param_file) as p: |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
70 params = p.readlines() |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
71 lam = float(params[0]) # Maybe this is a bug |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
72 alpha = float(params[1]) # Maybe this is a bug |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
73 # if BUM output is not provided |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
74 elif args.alpha is not None and args.lam is not None: |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
75 lam = args.lam |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
76 alpha = args.alpha |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
77 else: # The input is not complete |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
78 sys.exit('The parameters of the model are incomplete.') |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
79 |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
80 # Calculate the threshold P-value |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
81 pie = lam + (1 - lam) * alpha |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
82 p_threshold = np.power((pie - lam * args.fdr) / (args.fdr - lam * args.fdr), |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
83 1 / (alpha - 1)) |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
84 print(p_threshold) |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
85 # Calculate the scores |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
86 input_pvalues = pd.read_csv(args.nodes, sep='\t', names=['node', 'pvalue']) |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
87 input_pvalues.loc[:, 'score'] = input_pvalues.pvalue.apply(lambda x: |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
88 (alpha - 1) * |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
89 (np.log(x) - |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
90 np.log( |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
91 p_threshold))) |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
92 # print(input_pvalues.loc[:, ['node', 'score']]) |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
93 input_pvalues.loc[:, ['node', 'score']].to_csv(args.output, sep='\t', |
e41ec5af7472
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/heinz commit b0b2c64a46bdd9beebdfb7fc5312f75346483763
iuc
parents:
diff
changeset
|
94 index=False, header=False) |