Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def adapters_from_args(args) -> Tuple[List[Adapter], List[Adapter]]:
adapter_parser = AdapterParser(
max_error_rate=args.error_rate,
min_overlap=args.overlap,
read_wildcards=args.match_read_wildcards,
adapter_wildcards=args.match_adapter_wildcards,
indels=args.indels,
)
try:
adapters = adapter_parser.parse_multi(args.adapters)
adapters2 = adapter_parser.parse_multi(args.adapters2)
except (FileNotFoundError, ValueError) as e:
raise CommandLineError(e)
warn_duplicate_adapters(adapters)
warn_duplicate_adapters(adapters2)
if args.debug == "trace":
for adapter in adapters + adapters2:
adapter.enable_debug()
return adapters, adapters2
def adapters_from_args(args) -> Tuple[List[Adapter], List[Adapter]]:
adapter_parser = AdapterParser(
max_error_rate=args.error_rate,
min_overlap=args.overlap,
read_wildcards=args.match_read_wildcards,
adapter_wildcards=args.match_adapter_wildcards,
indels=args.indels,
)
try:
adapters = adapter_parser.parse_multi(args.adapters)
adapters2 = adapter_parser.parse_multi(args.adapters2)
except (FileNotFoundError, ValueError) as e:
raise CommandLineError(e)
warn_duplicate_adapters(adapters)
warn_duplicate_adapters(adapters2)
if args.debug == "trace":
for adapter in adapters + adapters2:
adapter.enable_debug()
return adapters, adapters2