2096509ab88749e811913cd2f07239f4972d4f18 max Wed Sep 9 07:21:43 2026 -0700 genark: make addContrib's release tier a positional argument, not --tier diff --git src/utils/genark/genark src/utils/genark/genark index c645c735964..030f75ba1be 100755 --- src/utils/genark/genark +++ src/utils/genark/genark @@ -1,22 +1,23 @@ #!/usr/bin/env python3 """genark - utilities to manage UCSC GenArk assembly hubs. This is a general, subcommand-based tool. Subcommands will be added over time. Subcommands: - addContrib <name> Install a contributed track collection into the GenArk + addContrib <name> [tier] + Install a contributed track collection into the GenArk assembly hubs. <name> is a subdirectory of /hive/data/genomes/asmHubs/contrib/ that is laid out as one directory per assembly accession (GCA_*/GCF_*) plus a shared docs/ directory, e.g.: contrib/<name>/GCA_000000000.0/trackDb.txt contrib/<name>/GCA_000000000.0/*.bb (and/or *.bw) contrib/<name>/docs/*.html For each accession it writes into that assembly's GenArk *build directory* (asmHubs/{genbankBuild,refseqBuild}/...) -- never the served /gbdb/genark or asmHubs/<acc> symlink trees, which the build system regenerates. There it: - creates <buildDir>/contrib/<name>/ with symlinks to the collection's data files (.bb/.bw) and doc pages; @@ -766,39 +767,40 @@ " (dry, -n)" if args.no_download else "")) if totFail: sys.exit(1) def main(): ap = argparse.ArgumentParser( prog="genark", description="Manage UCSC GenArk assembly hubs.") ap.add_argument("--dry-run", action="store_true", help="show what would be done without changing anything") sub = ap.add_subparsers(dest="cmd", required=True) p = sub.add_parser("addContrib", help="install a contrib track collection into the assembly hubs") p.add_argument("name", help="contrib subdirectory name under %s" % CONTRIB) - p.add_argument("--remove", action="store_true", - help="uninstall: remove the symlinks, the hub.txt block, and the " - "collection's entry in both release lists") - p.add_argument("--tier", choices=["alpha", "beta", "public"], default="alpha", + p.add_argument("tier", nargs="?", choices=["alpha", "beta", "public"], + default="alpha", help="how far to release the collection. alpha (default) installs it " "and wires alpha.hub.txt, which is hgwdev only. beta adds it to " "betaGenArk.txt, public adds it to publicGenArk.txt as well; " "those two lists are what mkGenomes.pl reads when it builds the " "beta and public hub.txt tiers.") + p.add_argument("--remove", action="store_true", + help="uninstall: remove the symlinks, the hub.txt block, and the " + "collection's entry in both release lists") p.set_defaults(func=addContrib) c = sub.add_parser("checkContrib", help="run hubCheck on assembly hubs carrying the collection") c.add_argument("name", help="contrib subdirectory name under %s" % CONTRIB) c.add_argument("accession", nargs="*", help="specific accessions to check (default: a random sample)") c.add_argument("--sample", type=int, default=5, help="number of random assemblies to check (default 5)") c.add_argument("--all", action="store_true", help="check every assembly") c.add_argument("--noTracks", action="store_true", help="structure only, do not fetch track data (faster)") c.add_argument("--timeout", type=int, default=300, help="per-assembly hubCheck timeout in seconds (default 300)") c.set_defaults(func=checkContrib)