Mastering Python for Bioinformatics by Ken Youens-Clark

Mastering Python for Bioinformatics by Ken Youens-Clark

Author:Ken Youens-Clark
Language: eng
Format: epub
Publisher: O'Reilly Media
Published: 2021-05-11T00:00:00+00:00


$ new.py -fp 'Find locations of N-glycosylation motif' mprt.py Done, see new script "mprt.py".

You should define a positional file argument and an optional download directory as the arguments to the program:

class Args(NamedTuple): """ Command-line arguments """ file: TextIO download_dir: str def get_args() -> Args: """Get command-line arguments""" parser = argparse.ArgumentParser( description='Find location of N-glycosylation motif', formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('file', help='Input text file of UniProt IDs', metavar='FILE', type=argparse.FileType('rt')) parser.add_argument('-d', '--download_dir', help='Directory for downloads', metavar='DIR', type=str, default='fasta') args = parser.parse_args() return Args(args.file, args.download_dir)



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.