scripts/last-dotplot
changeset 866 5182d8528ce9
parent 863 6a4915d5b5cb
child 875 592295375eb1
     1.1 --- a/scripts/last-dotplot	Fri Jun 02 18:40:29 2017 +0900
     1.2 +++ b/scripts/last-dotplot	Thu Jun 15 13:42:42 2017 +0900
     1.3 @@ -21,8 +21,9 @@
     1.4      return open(fileName)
     1.5  
     1.6  def warn(message):
     1.7 -    prog = os.path.basename(sys.argv[0])
     1.8 -    sys.stderr.write(prog + ": " + message + "\n")
     1.9 +    if opts.verbose:
    1.10 +        prog = os.path.basename(sys.argv[0])
    1.11 +        sys.stderr.write(prog + ": " + message + "\n")
    1.12  
    1.13  def croppedBlocks(blocks, range1, range2):
    1.14      cropBeg1, cropEnd1 = range1
    1.15 @@ -185,6 +186,11 @@
    1.16      if sortOpt == 1:
    1.17          seqNames.sort(key=natural_sort_key)
    1.18      seqSizes = [seqLimits[i][1] - seqLimits[i][0] for i in seqNames]
    1.19 +    for i in seqNames:
    1.20 +        r = seqLimits[i]
    1.21 +        out = i, str(r[0]), str(r[1])
    1.22 +        warn("\t".join(out))
    1.23 +    warn("")
    1.24      if sortOpt == 2:
    1.25          seqRecords = sorted(zip(seqSizes, seqNames), reverse=True)
    1.26          seqSizes = [i[0] for i in seqRecords]
    1.27 @@ -545,6 +551,8 @@
    1.28     or: ..."""
    1.29      description = "Draw a dotplot of pair-wise sequence alignments in MAF or tabular format."
    1.30      op = optparse.OptionParser(usage=usage, description=description)
    1.31 +    op.add_option("-v", "--verbose", action="count",
    1.32 +                  help="show progress messages & data about the plot")
    1.33      op.add_option("-1", "--seq1", metavar="PATTERN", action="append",
    1.34                    default=[],
    1.35                    help="which sequences to show from the 1st genome")