Your program must use command line options: $ python3 gene_information_query.py --help Your program submission must have a subdirectory assignment5 folder inside your assignment5 working directory (like I did in assignment #4- see below). Note the __init__.py, there are 3 of them.assignment5 ├── assignment5 │ ├── __init__.py │ ├── confi
Your program must use command line options:
$ python3 gene_information_query.py --help
- Your program submission must have a subdirectory assignment5 folder inside your assignment5 working directory (like I did in assignment #4- see below). Note the __init__.py, there are 3 of them.assignment5 ├── assignment5 │ ├── __init__.py │ ├── config.py │ └── my_io.py ├── gene_information_query.py └── tests ├── __init__.py └── unit ├── __init__.py ├── test_config.py └── test_my_io.py
- Implement an assignment5.my_io.py to open any files. And also a test script (test_my_io.py) for the module to be tested by pytest.
- Implement an assignment5.config.py module to be a small configuration module. Also write a test script (test_config.py) for the module to be tested by pytest.
- You can use modules argparse (Links to an external site.), os (Links to an external site.), re (Links to an external site.), sys, (Links to an external site.)or collections (Links to an external site.) if you like. You cannot use any other Python module
- See additional notes at the bottom of the page.
-
Write a function (call it modify_host_name) that receives one argument: 1). A host name. This function take the host name and checks for the available conversions from common to scientific names and return the scientific name (this will be the eventual species to be used in the directory name). This function should call get_host_keywords to get the dictionary of mapped terms from the assignment5.config.py module. If the host passed in does not exist then it should call the function _print_host_directories (see below) to alert the user what directories do exist (see outputs below) and the exit the program.
2). Write another function (Put this in my_io.py) (call it is_valid_gene_file_name) which receives one argument. 1). A file name. This function will check to make sure the given file name exists, if it does it return True else it will return FalseSee the os.path.exists (Links to an external site.) in Python
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 3 images