Skip to content

Commit

Permalink
Merge pull request #36 from COMBINE-lab/develop
Browse files Browse the repository at this point in the history
fix: pandas version & subcommand alias
  • Loading branch information
rob-p authored Apr 17, 2023
2 parents fb7602d + fa62eb6 commit 9b81eae
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
19 changes: 12 additions & 7 deletions bin/pyroe
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,21 @@ if __name__ == "__main__":
parser.add_argument(
"-v", "--version", action="version", version=f"pyroe {__version__}"
)

subparsers = parser.add_subparsers(
title="subcommands",
dest="command",
description="valid subcommands",
help="additional help",
)

# make-splici
parser_makeSplici = subparsers.add_parser(
"make-spliced+intronic",
"make-spliced+intronic",
help="Make spliced + intronic reference",
aliases=['make-splici']
aliases=["make-splici"],
)
parser_makeSplici.set_defaults(command="make-spliced+intronic")
parser_makeSplici.add_argument(
"genome_path",
metavar="genome-path",
Expand Down Expand Up @@ -105,8 +106,9 @@ if __name__ == "__main__":
parser_makeSpliceu = subparsers.add_parser(
"make-spliced+unspliced",
help="Make spliced + unspliced reference",
aliases=['make-spliceu']
aliases=["make-spliceu"],
)
parser_makeSpliceu.set_defaults(command="make-spliced+unspliced")
parser_makeSpliceu.add_argument(
"genome_path",
metavar="genome-path",
Expand Down Expand Up @@ -174,6 +176,7 @@ if __name__ == "__main__":
epilog=epilog,
formatter_class=RawTextHelpFormatter,
)
parser_fetchQuant.set_defaults(command="fetch-quant")
parser_fetchQuant.add_argument(
"dataset_ids",
metavar="dataset-ids",
Expand Down Expand Up @@ -206,6 +209,7 @@ if __name__ == "__main__":
parser_id_to_name = subparsers.add_parser(
"id-to-name", help="Generate a gene id to gene name mapping file from a GTF."
)
parser_id_to_name.set_defaults(command="id-to-name")
parser_id_to_name.add_argument("gtf_file", help="The GTF input file.")
parser_id_to_name.add_argument(
"output", help="The path to where the output tsv file will be written."
Expand All @@ -220,6 +224,7 @@ if __name__ == "__main__":
parser_convert = subparsers.add_parser(
"convert", help="Convert alevin-fry quantification result to another format."
)
parser_convert.set_defaults(command="convert")
parser_convert.add_argument(
"quant_dir",
metavar="quant_dir",
Expand Down Expand Up @@ -250,7 +255,7 @@ if __name__ == "__main__":

# Execute the parse_args() method
args = parser.parse_args()
if args.command == "make-splici":
if args.command == "make-spliced+intronic":
make_splici_txome(
genome_path=args.genome_path,
gtf_path=args.gtf_path,
Expand All @@ -265,7 +270,7 @@ if __name__ == "__main__":
bt_path=args.bt_path,
no_flanking_merge=args.no_flanking_merge,
)
elif args.command == "make-spliceu":
elif args.command == "make-spliced+unspliced":
make_spliceu_txome(
genome_path=args.genome_path,
gtf_path=args.gtf_path,
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = pyroe
version = 0.9.0
version = 0.9.1
author = Dongze He, Rob Patro
author_email = [email protected], [email protected]
description = utilities of alevin-fry
Expand All @@ -21,7 +21,7 @@ scripts =
python_requires = >=3.7
include_package_data = True
install_requires =
pandas >= 1.3.0
pandas >= 1.3.0, < 2.0.0
pyranges >= 0.0.120
biopython >= 1.77
packaging >= 21.0
Expand Down
2 changes: 1 addition & 1 deletion src/pyroe/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.9.0"
__version__ = "0.9.1"

from pyroe.load_fry import load_fry
from pyroe.make_txome import make_splici_txome, make_spliceu_txome
Expand Down

0 comments on commit 9b81eae

Please sign in to comment.