From 37e4bd75356adb137c0714ac3d572fb3a3707d82 Mon Sep 17 00:00:00 2001 From: Haibao Tang Date: Tue, 30 Apr 2024 17:59:26 -0700 Subject: [PATCH] run black --- jcvi/apps/align.py | 4 +--- jcvi/apps/uclust.py | 4 +--- jcvi/assembly/allmaps.py | 12 +++--------- jcvi/assembly/syntenypath.py | 4 +--- jcvi/compara/catalog.py | 4 +--- jcvi/compara/synteny.py | 4 +--- jcvi/formats/base.py | 4 +--- jcvi/formats/bed.py | 4 +--- jcvi/formats/fasta.py | 4 +--- jcvi/graphics/grabseeds.py | 4 +--- jcvi/projects/str.py | 12 +++--------- 11 files changed, 15 insertions(+), 45 deletions(-) diff --git a/jcvi/apps/align.py b/jcvi/apps/align.py index 2153012f..6e96831b 100644 --- a/jcvi/apps/align.py +++ b/jcvi/apps/align.py @@ -216,9 +216,7 @@ def nucmer(args): from jcvi.formats.base import split p = OptionParser(nucmer.__doc__) - p.add_option( - "--chunks", type=int, help="Split both query and subject into chunks" - ) + p.add_option("--chunks", type=int, help="Split both query and subject into chunks") p.set_params(prog="nucmer", params="-l 100 -c 500") p.set_cpus() opts, args = p.parse_args(args) diff --git a/jcvi/apps/uclust.py b/jcvi/apps/uclust.py index 6174a2b8..0d0c3f73 100644 --- a/jcvi/apps/uclust.py +++ b/jcvi/apps/uclust.py @@ -556,9 +556,7 @@ def consensus(args): errors according to error rate, calls consensus. """ p = OptionParser(consensus.__doc__) - p.add_option( - "--ploidy", default=2, type=int, help="Number of haplotypes per locus" - ) + p.add_option("--ploidy", default=2, type=int, help="Number of haplotypes per locus") add_consensus_options(p) p.set_verbose() opts, args = p.parse_args(args) diff --git a/jcvi/assembly/allmaps.py b/jcvi/assembly/allmaps.py index dd2ae30c..fae00648 100644 --- a/jcvi/assembly/allmaps.py +++ b/jcvi/assembly/allmaps.py @@ -1395,12 +1395,8 @@ def path(args): ) p.add_option("--seqid", help="Only run partition with this seqid") p.add_option("--partitions", help="Use predefined partitions of LGs") - p.add_option( - "--links", default=10, type=int, help="Only plot matchings more than" - ) - p.add_option( - "--mincount", default=1, type=int, help="Minimum markers on a contig" - ) + p.add_option("--links", default=10, type=int, help="Only plot matchings more than") + p.add_option("--mincount", default=1, type=int, help="Minimum markers on a contig") p.add_option( "--noplot", default=False, @@ -1783,9 +1779,7 @@ def add_allmaps_plot_options(p): choices=distance_choices, help="Plot markers based on distance", ) - p.add_option( - "--links", default=10, type=int, help="Only plot matchings more than" - ) + p.add_option("--links", default=10, type=int, help="Only plot matchings more than") p.add_option( "--panels", default=False, action="store_true", help="Add panel labels A/B" ) diff --git a/jcvi/assembly/syntenypath.py b/jcvi/assembly/syntenypath.py index 034afe74..94ca1e7d 100644 --- a/jcvi/assembly/syntenypath.py +++ b/jcvi/assembly/syntenypath.py @@ -140,9 +140,7 @@ def bed(args): action="store_true", help="Switch reference and aligned map elements", ) - p.add_option( - "--scale", type=float, help="Scale the aligned map distance by factor" - ) + p.add_option("--scale", type=float, help="Scale the aligned map distance by factor") p.set_beds() p.set_outfile() opts, args = p.parse_args(args) diff --git a/jcvi/compara/catalog.py b/jcvi/compara/catalog.py index be3945cf..1a455002 100644 --- a/jcvi/compara/catalog.py +++ b/jcvi/compara/catalog.py @@ -509,9 +509,7 @@ def omgprepare(args): p = OptionParser(omgprepare.__doc__) p.add_option("--norbh", action="store_true", help="Disable RBH hits") - p.add_option( - "--pctid", default=0, type=int, help="Percent id cutoff for RBH hits" - ) + p.add_option("--pctid", default=0, type=int, help="Percent id cutoff for RBH hits") p.add_option("--cscore", default=90, type=int, help="C-score cutoff for RBH hits") p.set_stripnames() p.set_beds() diff --git a/jcvi/compara/synteny.py b/jcvi/compara/synteny.py index 8deed8ea..9b048356 100755 --- a/jcvi/compara/synteny.py +++ b/jcvi/compara/synteny.py @@ -1454,9 +1454,7 @@ def mcscan(args): tandem cluster as one line, tab separated. """ p = OptionParser(mcscan.__doc__) - p.add_option( - "--iter", default=100, type=int, help="Max number of chains to output" - ) + p.add_option("--iter", default=100, type=int, help="Max number of chains to output") p.add_option( "--ascii", default=False, diff --git a/jcvi/formats/base.py b/jcvi/formats/base.py index 47b1b03f..0d8b6b12 100644 --- a/jcvi/formats/base.py +++ b/jcvi/formats/base.py @@ -785,9 +785,7 @@ def group(args): p = OptionParser(group.__doc__) p.set_sep() - p.add_option( - "--groupby", default=None, type=int, help="Default column to groupby" - ) + p.add_option("--groupby", default=None, type=int, help="Default column to groupby") p.add_option( "--groupsep", default=",", help="Separator to join the grouped elements" ) diff --git a/jcvi/formats/bed.py b/jcvi/formats/bed.py index f9d52bdc..33872f4b 100755 --- a/jcvi/formats/bed.py +++ b/jcvi/formats/bed.py @@ -2440,9 +2440,7 @@ def flanking(args): p.add_option( "--coord", default=None, type=int, help="coordinate of the position in query." ) - p.add_option( - "-n", default=10, type=int, help="number of flanking features to get" - ) + p.add_option("-n", default=10, type=int, help="number of flanking features to get") p.add_option( "--side", default="both", diff --git a/jcvi/formats/fasta.py b/jcvi/formats/fasta.py index d288f9e1..a70272cb 100644 --- a/jcvi/formats/fasta.py +++ b/jcvi/formats/fasta.py @@ -540,9 +540,7 @@ def qual(args): from jcvi.formats.sizes import Sizes p = OptionParser(qual.__doc__) - p.add_option( - "--qv", default=31, type=int, help="Dummy qv score for extended bases" - ) + p.add_option("--qv", default=31, type=int, help="Dummy qv score for extended bases") p.set_outfile() opts, args = p.parse_args(args) diff --git a/jcvi/graphics/grabseeds.py b/jcvi/graphics/grabseeds.py index c5fc9be6..ae4f179f 100644 --- a/jcvi/graphics/grabseeds.py +++ b/jcvi/graphics/grabseeds.py @@ -297,9 +297,7 @@ def add_seeds_options(p, args): g2.add_option( "--maxsize", default=50, type=float, help="Max percentage of object to image" ) - g2.add_option( - "--count", default=100, type=int, help="Report max number of objects" - ) + g2.add_option("--count", default=100, type=int, help="Report max number of objects") g2.add_option( "--watershed", default=False, diff --git a/jcvi/projects/str.py b/jcvi/projects/str.py index 41866cd9..538e9099 100644 --- a/jcvi/projects/str.py +++ b/jcvi/projects/str.py @@ -2044,9 +2044,7 @@ def compare2(args): Compare performances of various variant callers on simulated STR datasets. """ p = OptionParser(compare2.__doc__) - p.add_option( - "--maxinsert", default=300, type=int, help="Maximum number of repeats" - ) + p.add_option("--maxinsert", default=300, type=int, help="Maximum number of repeats") add_simulate_options(p) opts, args, iopts = p.set_image_options(args, figsize="10x5") @@ -2101,9 +2099,7 @@ def power(args): This compares the power of various evidence types. """ p = OptionParser(power.__doc__) - p.add_option( - "--maxinsert", default=300, type=int, help="Maximum number of repeats" - ) + p.add_option("--maxinsert", default=300, type=int, help="Maximum number of repeats") add_simulate_options(p) opts, args, iopts = p.set_image_options(args, figsize="10x10", format="png") @@ -2200,9 +2196,7 @@ def tredparse(args): Adds coverage comparisons as panel C and D. """ p = OptionParser(tredparse.__doc__) - p.add_option( - "--maxinsert", default=300, type=int, help="Maximum number of repeats" - ) + p.add_option("--maxinsert", default=300, type=int, help="Maximum number of repeats") add_simulate_options(p) opts, args, iopts = p.set_image_options(args, figsize="10x10")