chip-job-chr-convert 1.03 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env python

import pymysql
import argparse
import os

parser = argparse.ArgumentParser(description="Replace chromosome locus with number.")
parser.add_argument("-b", "--bed", dest="bed", required=True, help="Input bed file.")
parser.add_argument("-o", "--out", dest="out", required=True, help="Output file.")
parser.add_argument("-c", "--c", dest="chr", default=False, action="store_true", help="If specified convert from name to chr number, otherwise convert from chr number to name.")
parser.add_argument("-d", "--db", dest="db", default="hg38", help="Database to load conversion from.")
parser.add_argument("-s", "--server", dest="server", default="genome-mysql.cse.ucsc.edu", help="Location of mysql server.")
parser.add_argument("-u", "--user", dest="user", default="genome", help="Username for db login.")
parser.add_argument("-p", "--password", dest="password", default="", help="Password for db login.")
parser.add_argument("-t", "--table", dest="table", default="ucscToINSDC", help="Table to retrieve locus -> number info from.")