Skip to content

Commit

Permalink
Merge pull request #12 from jadolfbr/main
Browse files Browse the repository at this point in the history
Added numbering scheme option to command line for nanobodies and anti…
  • Loading branch information
brennanaba authored Jan 25, 2023
2 parents ab1fc70 + 2bc509a commit 2bde95f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 2 additions & 4 deletions ImmuneBuilder/ABodyBuilder2.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def command_line_interface():
Supervisor: Charlotte Deane ||
"""

schemes = ('kabat','aho','wolfguy','imgt','a','c','chothia','i','k','m','w','martin')
schemes = ('imgt','chothia','kabat','aho','wolfguy','martin')
parser = argparse.ArgumentParser(prog="ABodyBuilder2", description=description, formatter_class=argparse.RawDescriptionHelpFormatter)

parser.add_argument("-H", "--heavy_sequence", help="Heavy chain amino acid sequence", default=None)
Expand All @@ -148,9 +148,7 @@ def command_line_interface():
parser.add_argument("-o", "--output", help="Path to where the output model should be saved. Defaults to the same directory as input file.", default=None)
parser.add_argument("--to_directory", help="Save all unrefined models and the top ranked refined model to a directory. "
"If this flag is set the output argument will be assumed to be a directory", default=False, action="store_true")
parser.add_argument("-n", "--numbering_scheme", help="The numbering scheme used for output antibody structures. i, k, c, m, w"
" and a are shorthand for IMGT, Kabat, Chothia, Martin (Extended Chothia), Wolfguy and Aho respectively."
" Default is IMGT", default='imgt', choices=schemes)
parser.add_argument("-n", "--numbering_scheme", help="The scheme used to number output antibody structures. Available numbering schemes are: imgt, chothia, kabat, aho, wolfguy and martin. Default is imgt.", default='imgt')
parser.add_argument("-v", "--verbose", help="Verbose output", default=False, action="store_true")

args = parser.parse_args()
Expand Down
4 changes: 3 additions & 1 deletion ImmuneBuilder/NanoBodyBuilder2.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ def command_line_interface():
parser.add_argument("-o", "--output", help="Path to where the output model should be saved. Defaults to the same directory as input file.", default=None)
parser.add_argument("--to_directory", help="Save all unrefined models and the top ranked refined model to a directory. "
"If this flag is set the output argument will be assumed to be a directory", default=False, action="store_true")
parser.add_argument("-n", "--numbering_scheme", help="The scheme used to number output nanobody structures. Available numbering schemes are: imgt, chothia, kabat, aho, wolfguy and martin. Default is imgt.", default='imgt')

parser.add_argument("-v", "--verbose", help="Verbose output", default=False, action="store_true")

args = parser.parse_args()
Expand All @@ -167,7 +169,7 @@ def command_line_interface():
print("Running sequence through deep learning model...", flush=True)

try:
antibody = NanoBodyBuilder2().predict(seqs)
antibody = NanoBodyBuilder2(numbering_scheme=args.numbering_scheme).predict(seqs)
except AssertionError as e:
print(e, flush=True)
sys.exit(1)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='ImmuneBuilder',
version='0.0.6',
version='0.0.7',
description='Set of functions to predict the structure of immune receptor proteins',
license='BSD 3-clause license',
maintainer='Brennan Abanades',
Expand Down

0 comments on commit 2bde95f

Please sign in to comment.