get_gb_records¶
Pipeline to retrieve GenBank records using accessions stored in the MySQL database.
- pdm_utils.pipelines.get_gb_records.copy_gb_data(ncbi_handle, acc_id_dict, records_path, file_type, verbose=False)¶
Save retrieved records to file.
- pdm_utils.pipelines.get_gb_records.execute_get_gb_records(alchemist, file_type, folder_path=None, folder_name='20220119_gb_records', config=None, values=None, verbose=False, force=False, filters='', groups=[])¶
Executes the entirety of the get_gb_records pipeline
- Parameters
alchemist (AlchemyHandler) – A connected and fully build AlchemyHandler object.
folder_path (Path) – Path to a valid dir for new dir creation.
folder_name (str) – A name for the export folder.
file_type (str) – File type to be exported.
config (ConfigParser) – ConfigParser object containing NCBI credentials.
force (bool) – A boolean to toggle aggresive building of directories.
values (list[str]) – List of values to filter database results.
verbose (bool) – A boolean value to toggle progress print statemtns.
filters – A List of lists with filter value,grouped by ORs.
groups (list[str]) – A list of supported MySQL column names to goup by.
- pdm_utils.pipelines.get_gb_records.main(unparsed_args_list)¶
Run main get_gb_records pipeline.
- pdm_utils.pipelines.get_gb_records.parse_args(unparsed_args_list)¶
Parses export_db arguments and stores them with an argparse object.
- Parameters
unparsed_args_list (list[str]) – Input a list of command line args.
- Returns
ArgParse module parsed args.