chip-job-peakranger-format 902 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python
import argparse
import math
import sys
import os

# Peakranger has very different output than expected:
# chr1    180330013   180330834   ranger_fdrPassed_0_pval_2.00647e-193_fdr_2.79703e-190   2.79703e-190    +
# chr1    106321435   106322114   ranger_fdrPassed_1_pval_5.1557e-147_fdr_3.59352e-144    3.59352e-144    +
# chr1    37474619    37475638    ranger_fdrPassed_2_pval_5.45776e-144_fdr_2.53604e-141   2.53604e-141    +
# There is no calculated score, the pval needs to be stripped from a different
# column, and the strand is on the end instead of the 6th column

parser = argparse.ArgumentParser(description = "Format peakranger output files.")
parser.add_argument("--input", "-i", dest="input", required=True, help="Input result file from peakranger.")
parser.add_argument("--output", "-o", dest="output", required=True, help="Output file to write formatted results.")