Mercurial > repos > mvdbeek > dapars
comparison dapars.py @ 14:ea5d573d6d40 draft
planemo upload for repository https://github.com/mvdbeek/dapars commit b1b007c561ea6c9db145c88b6b128d66ecd05e24-dirty
author | mvdbeek |
---|---|
date | Fri, 30 Oct 2015 06:58:57 -0400 |
parents | 538c4e2b423e |
children | 8af6d4ad2f0a |
comparison
equal
deleted
inserted
replaced
13:538c4e2b423e | 14:ea5d573d6d40 |
---|---|
254 i = k + num_control | 254 i = k + num_control |
255 res["treatment_{i}_coverage_long".format(i=k)] = float(long_coverage_vector[i]) | 255 res["treatment_{i}_coverage_long".format(i=k)] = float(long_coverage_vector[i]) |
256 res["treatment_{i}_coverage_short".format(i=k)] = float(short_coverage_vector[i]) | 256 res["treatment_{i}_coverage_short".format(i=k)] = float(short_coverage_vector[i]) |
257 res["treatment_{i}_percent_long".format(i=k)] = percentage_long[i] | 257 res["treatment_{i}_percent_long".format(i=k)] = percentage_long[i] |
258 res["t_stat"], res["p_value"] = stat_test(percentage_long[:num_control], percentage_long[num_control:]) | 258 res["t_stat"], res["p_value"] = stat_test(percentage_long[:num_control], percentage_long[num_control:]) |
259 control_mean_percent = np.mean(np.array(percentage_long[:num_control])) | 259 control_mean_percent = np.mean(percentage_long[:num_control]) |
260 treatment_mean_percent = np.mean(np.array(percentage_long[num_control:])) | 260 treatment_mean_percent = np.mean(percentage_long[num_control:]) |
261 res["chr"] = utr_d["chr"] | 261 res["chr"] = utr_d["chr"] |
262 res["start"] = utr_d["start"] | 262 res["start"] = utr_d["start"] |
263 res["end"] = utr_d["end"] | 263 res["end"] = utr_d["end"] |
264 res["strand"] = utr_d["strand"] | 264 res["strand"] = utr_d["strand"] |
265 if is_reverse: | 265 if is_reverse: |
378 | 378 |
379 def stat_test(a,b): | 379 def stat_test(a,b): |
380 return stats.ttest_ind(a,b) | 380 return stats.ttest_ind(a,b) |
381 | 381 |
382 def gene_str_to_link(str): | 382 def gene_str_to_link(str): |
383 return "<a href=\"{str}.svg\" type=\"image/svg+xml\" target=\"_blank\">{str}</a>".format(str=str) | 383 return "<a href=\"{str}.svg\" type=\"image/svg+xml\">{str}</a>".format(str=str) |
384 | |
384 | 385 |
385 if __name__ == '__main__': | 386 if __name__ == '__main__': |
386 args = parse_args() | 387 args = parse_args() |
387 find_utr = UtrFinder(args) | 388 find_utr = UtrFinder(args) |
388 | 389 |