Skip to content

Commit

Permalink
fix: help genome alias table and remote cache assets
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Routsong committed Jan 12, 2024
1 parent d4a439d commit 47814bc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions config/remote.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"bcl2fastq": "docker://umccr/bcl2fastq:latest",
"weave": "docker://rroutsong/weave_ngsqc:0.0.1",
"bclconvert": "docker://rroutsong/weave_bclconvert:0.0.3",
"disambiguate": "docker://quay.io/biocontainers/ngs-disambiguate:2018.05.03--hf393df8_7",
"kraken": "https://genome-idx.s3.amazonaws.com/kraken/k2_pluspfp_16gb_20231009.tar.gz",
"kaiju": "https://kaiju-idx.s3.eu-central-1.amazonaws.com/2023/kaiju_db_nr_euk_2023-05-10.tgz",
"fastq_screen": "filelist://www.bioinformatics.babraham.ac.uk/projects/fastq_screen/genome_locations.txt"
Expand Down
5 changes: 3 additions & 2 deletions scripts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import os
import yaml
import sys
import textwrap
from argparse import ArgumentTypeError
from dateutil.parser import parse as date_parser
from subprocess import Popen, PIPE, STDOUT
Expand Down Expand Up @@ -41,8 +42,8 @@ def default(self, obj):


def get_alias_table():
pp_tbl = lambda x: "\n".join([y.lstrip().rstrip() for y in x.split('\n')])
return pp_tbl("""+----------------+-------------------------------------------+
return textwrap.dedent("""Genome short name alias table:
+----------------+-------------------------------------------+
| Organism | Genomes supported (aka) |
+----------------+-------------------------------------------+
| HUMAN | hg19(grch37) / hg38(grch38) |
Expand Down
8 changes: 4 additions & 4 deletions weave
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ def unlock_dir(sub_args):

# ~~~~ argument parsing commands ~~~~
if __name__ == '__main__':
main_parser = argparse.ArgumentParser(prog='weave')
main_parser = argparse.ArgumentParser(prog='weave', formatter_class=argparse.RawTextHelpFormatter, epilog=utils.get_alias_table())
sub_parsers = main_parser.add_subparsers(help='run subcommand help')

parser_run = sub_parsers.add_parser('run')
parser_run = sub_parsers.add_parser('run', formatter_class=argparse.RawTextHelpFormatter, epilog=utils.get_alias_table())
parser_run.add_argument('rundir', metavar='<run directory>', nargs="+", type=utils.valid_run_input,
help='Full & complete run id (format YYMMDD_INSTRUMENTID_TIME_FLOWCELLID) or absolute paths')
parser_run.add_argument('-s', '--seq_dir', metavar='<sequencing directory>', default=None, type=str,
Expand All @@ -106,9 +106,9 @@ if __name__ == '__main__':
# disambiguate arguments
parser_run.add_argument('-t', '--host', type=files.valid_fasta, default=None,
help='Execute pipeline locally without a dispatching executor.')
alias_table = "\n" + utils.get_alias_table() + "\n"

parser_run.add_argument('-p', '--pathogen', type=files.valid_fasta, default=None,
help='Execute pipeline locally without a dispatching executor. ' + alias_table)
help='Execute pipeline locally without a dispatching executor.')

parser_cache = sub_parsers.add_parser('cache')
parser_cache.add_argument('cachedir', metavar='<cache directory>', type=cache.valid_dir,
Expand Down

0 comments on commit 47814bc

Please sign in to comment.