Skip to content

Commit 01f982a

Browse files
committed
--expand-mac takes a MAC and converts to allele list
1 parent f2e6fcc commit 01f982a

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

scripts/pyard

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,12 @@ if __name__ == "__main__":
7070
help="Validate the provided GL String",
7171
)
7272
parser.add_argument("--cwd", dest="cwd", help="Perform CWD redux")
73-
parser.add_argument("--lookup-mac", dest="lookup_mac", help="Lookup Mac ")
73+
parser.add_argument(
74+
"--expand-mac", dest="expand_mac", help="Expand MAC to Allele List"
75+
)
76+
parser.add_argument(
77+
"--lookup-mac", dest="lookup_mac", help="Lookup MAC for an Allele List"
78+
)
7479

7580
args = parser.parse_args()
7681

@@ -90,6 +95,15 @@ if __name__ == "__main__":
9095
print(f"{mapping[0]} = {'/'.join(mapping[1])}")
9196
sys.exit(0)
9297

98+
# Handle --expand-mac option
99+
if args.expand_mac:
100+
try:
101+
allele_list = ard.expand_mac(args.expand_mac)
102+
print(allele_list)
103+
except InvalidMACError as e:
104+
print(e.message, file=sys.stderr)
105+
sys.exit(0)
106+
93107
# Handle --lookup-mac option
94108
if args.lookup_mac:
95109
try:

0 commit comments

Comments
 (0)