4f577798b6f2ace7507b711d3189e42650ca7f83 max Wed Oct 30 22:04:47 2019 -0700 docs for chromFixer, refs #24407 diff --git src/utils/chromFixer/chromFixer src/utils/chromFixer/chromFixer index bbf8216..657647a 100755 --- src/utils/chromFixer/chromFixer +++ src/utils/chromFixer/chromFixer @@ -7,35 +7,35 @@ from urllib2 import urlopen # py3 try: from cStringIO import StringIO # py2 except ImportError: from io import StringIO # py3 # ==== functions ===== def parseArgs(): " setup logging, parse command line arguments and options. -h shows auto-generated help page " parser = optparse.OptionParser("""usage: %prog [options] filename - change NCBI or Ensembl chromosome names to UCSC names using the chromAlias table of the genome browser. Examples: %prog -i test.bed -o test.ucsc.bed -g hg19 %prog -g mm10 --get %prog -i test2.bed -o test2.ucsc.bed -a mm10.chromAlias.tsv - cat test.bed | %prog -a mm10.chromAlias.tsv > test.ucsc.edb + cat test.bed | %prog -a mm10.chromAlias.tsv > test.ucsc.bed """) - parser.add_option("-g", "--genomeDb", dest="db", action="store", help="a UCSC assembly ID, like hg19, mm10 or similar. Not required if -a is used.") - parser.add_option("-a", "--chromAlias", dest="aliasFname", action="store", help="a UCSC chromAlias table in tab-sep format.") + parser.add_option("-g", "--genomeDb", dest="db", action="store", help="a UCSC assembly ID, like hg19, hg38 or similar. Not required if -a is used. ") + parser.add_option("-a", "--chromAlias", dest="aliasFname", action="store", help="a UCSC chromAlias table in tab-sep format. The alias tables for hg19 or hg38 are hardcoded in the script, they do not require a chromAlias table..") parser.add_option("-i", "--in", dest="inFname", action="store", help="input filename, default: /dev/stdin") parser.add_option("-o", "--out", dest="outFname", action="store", help="output filename, default: /dev/stdout") parser.add_option("", "--get", dest="doDownload", action="store_true", help="download a chrom alias table from UCSC for --genomeDb into the current directory and exit") parser.add_option("-d", "--debug", dest="debug", action="store_true", help="show debug messages") #parser.add_option("", "--test", dest="test", action="store_true", help="do something") (options, args) = parser.parse_args() if options.db is None and options.aliasFname is None: parser.print_help() exit(1) if options.debug: logging.basicConfig(level=logging.DEBUG) else: logging.basicConfig(level=logging.INFO)