Package: cazy-webscraper
cazy_webscrapercazy_webscrapercazy_webscraperis an application and Python3 package for the automated retrieval of protein data from theCAZydatabase. The code is distributed under the MIT license.
The full documentation can be found atRead the Docs.For full details see our publication inMicrobial Genomics, which includes example analyses.Hobbs, E. E. M, Gloster, T. M., Pritchard, L. (2023) cazy_webscraper: local compilation and interrogation of comprehensive CAZyme datasets,Microbial Genomics, 9(8).https://doi.org/10.1099/mgen.0.001086cazy_webscraperretrieves protein data from theCAZy databaseand stores the data in a local SQLite3 database.This enables users to integrate the dataset into analytical pipelines, and interrogate the data in a manner unachievable through the CAZy website.Data can be retrieved for user defined datasets of interest.cazy_webscrapercan recover specified CAZy Classes and/or CAZy families. These queries can be filtered by taxonomy at Kingdoms, genus, species or strain level. Successive CAZy queries can be collated into a single local database. A log of each query is recorded in the database for transparency, reproducibility and shareablity.Using theexpandsubcommand, a user can expand the core dataset.Specifically,cazy_webscrapercan be used to retrieve data from the following external databases for CAZymes in the local CAZyme database that meet user specified criteria, and adds the downloaded data to the local CAZyme database:GenBank:Protein sequencesLatest taxonomic classification - including complete lineage (including phylum, class, order and family) (version >=2.1.2)Latest genomic assembly data (GenBank and RefSeq (when available) version accession and ID numbers) (version >=2.1.3)UniProt:UniProt ID/accessionProtein nameEC numbersPDB accessionsProtein sequence (and date sequence was last updated)Taxonomic classification (genus and species)Research Collaboratory for Structural Bioinformatics (RCSB) Protein Data Bank (PDB):Protein structure filesStructure files are written to disk,notstored in the local CAZyme databaseGenome Taxonomy Database (GTDB):Retrieve the latest archaeal and bacterial taxonomic classifications (including complete lineages from kingdom to species) - available incazy_webscraperverion >= 2.2.0.cazy_webscraperfaciltates extracting information from the local CAZyme database.Protein sequences (retrieved from GenBank and/or UniProt) from the local CAZyme database for CAZymes matching the user specified criteria, and write to:A single multisequence FASTA fileA FASTA file per extracted protein sequenceA local BLASTP databaseThecazy_webscraperAPI facilitates interoggating the local CAZyme database.Please see thefull documentation at ReadTheDocs.UpdatesNew in version 2.3.0Downloading protein data from UniProt is several magnitudes faster than before - and should have fewer issues with using older version ofbioservicesUsesbioservicesmapping to map directly from NCBI protein version accession to UniProtcw_get_uniprot_datanot longer calls to NCBI and thus no longer requires an email address as a positional argumentUpdated database schema: ChangedGenbanks 1--* UniprotstoGenbanks *--1 Uniprots.Uniprots.uniprot_idis now listed in theGenbankstable, instead of listingGenbanks.genbank_idin theUniprotstableRetrieve taxonomic classifications from UniProtUse the--taxonomy/-tflag to retrieve the scientific name (genus and species) for proteins of interestAdds downloaded taxonomic information to theUniprotsTaxstableImproved clarrification of deleting old records when usingcw_get_uniprot_dataSeparate arguments to delete Genbanks-EC number and Genbanks-PDB accession relationships that are no longer listed in UniProt for those proteins in the local CAZyme database for proteins whom data is downloaded from UniProtNew args:--delete_old_ec_relationships= deletes Genbank(protein)-EC number relationships no longer in UniProt--delete_old_ecs= deletes EC numbers in the local db not linked to any proteins--delete_old_pdb_relationships= deletes Genbank(protein)-PDB relationships no longer in UniProt--delete_old_pdbs= deletes PDB accessions in the local db not linked to any proteinsRetrieve the local db schemaNew commandcw_get_db_schemaadded.Retrieves the SQLite schema of a local CAZyme database and prints it to the terminalAdded option to skip retrieving the latest taxonomic classifications NCBI taxonomiesBy default, when retreiving data from CAZy,cazy_webscraperretrieves the latest taxonomic classifications for proteins listed under multiple taxTo increase scrapping time, and to reduce burden on the NCBI-Entrez server, if this data is not needed (e.g. GTDB taxs will be use) this step can be skipped by using the new--skip_ncbi_taxflag.When skipping retrieval of the latest taxa classifications from NCBI,cazy_webscraperwill add the first taxa retrieved from CAZy for those proteins listed under mutliple taxaDocumentationThe full documentation can be found atRead the Docs.Our paper: Implementation and demonstration of useFor a full description of the operation and examples of use, please see our paper in (BioRxiv)[https://www.biorxiv.org/content/10.1101/2022.12.02.518825v1.full].Hobbs, E. E. M., Gloster, T. M., and Pritchard, L. (2022) 'cazy_webscraper: local compilation and interrogation of comprehensive CAZyme datasets',bioRxiv,https://doi.org/10.1101/2022.12.02.518825Database structureYou can view the database schemahereand find a PDF of the database schemahere.ContributionsWe welcome contributions and suggestions. You can raise issues at this repository, or fork the repository and submit pull requests, at the links below:IssuesPull RequestsTable of Contentscazy_webscraperCitationBest practiceDocumentationInstallationQuick startCommand summaryCreating a local CAZyme databaseCombining configuration filtersDefault CAZy class synonymsRetrieve data from UniProtConfiguring UniProt data retrievalRetrieving protein sequences from GenBankConfiguring GenBank protein sequence data retrievalExtracting protein sequences from the local CAZyme database and building a BLAST databaseConfiguring extracting sequences from a local CAZyme dbRetrieving protein structure files from PDBConfiguring PDB protein structure file retrievalRetrieving NCBI taxonomiesConfiguring retrieving NCBI taxonomiesRetrieving genomic assembly data from NCBIConfiguring retrieving genomic assembly dataRetrieving GTDB taxonomiesConfiguring retrieving GTDB taxonomiesThecazy_webscraperAPI or Interrogating the local CAZyme databaseConfiguringcazy_webscraperusing a YAML fileCAZy coverage of GenBankConfigure calculating CAZy coverage of GenBankIntegrating a local CAZyme databaseDatabase schemaContributionsLicense and copyrightFeatures in the pipeline:Retrieve and stored PubMed IDs in the local CAZyme databaseFix any remaining bugs we can find (if you find a bug, please report it and provide as detailed bug report as possible!)Increase unit test coverageAutomate analysing the taxonomic distribution across CAZy and datasets of interest, including generating a final reportCitationIf you usecazy_webscraper, please cite the following publication:Hobbs, E. E. M, Gloster, T. M., Pritchard, L. (2023) cazy_webscraper: local compilation and interrogation of comprehensive CAZyme datasets,Microbial Genomics, 9(8).https://doi.org/10.1099/mgen.0.001086The supplementary information for this manuscript is available via the BioRxiv server, and in themanuscriptdirectory in this repository.cazy_webscraper depends on a number of tools. To recognise the contributions that the
authors and developers have made, please also cite the following:When making an SQLite database:Hipp, R. D. (2020) SQLite, available:https://www.sqlite.org/index.html.Retrieving taxonomic, genomic or sequence data from NCBI:Cock, P.J.A., Antao, T., Chang, J.T., Chapman, B.A., Cox, C.J., Dalke, A., et al (2009) Biopython: freely available Python tools for computational molecular biology and bioinformatics, Bioinformatics, 25(11), 1422-1423.
Wheeler,D.L., Benson,D.A., Bryant,S., Canese,K., Church,D.M., Edgar,R., Federhen,S., Helmberg,W., Kenton,D., Khovayko,O. et al (2005) Database resources of the National Centre for Biotechnology Information: Update, Nucleic Acid Research, 33, D39-D45Retrieving data from UniProt:Cokelaer, T., Pultz, D., Harder, L. M., Serra-Musach, J., Saez-Rodriguez, J. (2013) BioServices: a common Python package to access biological Web Services programmatically, Bioinformatics, 19(24), 3241-3242.Downloading protein structure files from RSCB PDB:Berman, H.M., Westbrook, J., Feng, Z., Gilliland, G., Bhat, T.N., Weissig, H., et al (2022) The Protein Data Bank, Nucleic Acids Research, 28(1), 235-242.
Hamelryck, T., Manderick, B. (2003), PDB parser and structure class implemented in Python. Bioinformatics, 19 (17), 2308–2310Retrieving and using taxonomic data from GTDB:Parks, D.H., Chuvochina, M., Rinke, C., Mussig, A.J., Chaumeil, P., Hugenholtz, P. (2022) GTDB: an ongoing census of bacterial and archaeal diversity through a phylogenetically consistent, rank normalized and complete genome-based taxonomy, Nucleic Acids Research, 50(D1), D785-D794.Best practiceWhen performing a series of many automated calls to a server it is best to do this when traffic is lowest, such as at weekends or overnightat the server.DocumentationPlease see thefull documentation at ReadTheDocs.Installationcazy_webscrapercan be installed viacondaorpip:condainstall-cbiocondacazy_webscraperPlease see thecondadocumentationandbiocondadocumentationfor further details.pipinstallcazy_webscraperPlease see thepipdocumentationfor further details.QuickstartWe have produced a "Getting Started Withcazy_webscraper"poster.To download all of CAZy and save the database in the default location (the cwd) with the default name (cazy_webscraper_<date>_<time>.db) use the following command:cazy_webscraper<user_email>Version and citationTo retrieve the version, use the following command:cazy_webscraper-Vorcazy_webscraper--versionTo retrieve the citation to use:cazy_webscraper-Corcazy_webscraper--citationCommand summaryBelow are the list of commands (excluding required and optional arguments) included incazy_webscraper.CAZyTo retrieve data from CAZy and compile and SQLite database usingcazy_webscrapercommand.UniProtTo retrieve protein data from UniProt, use thecw_get_uniprot_datacommand.The following data can be retrieved:UniProt accessionProtein nameEC numbersPDB accessionProtein sequencesGenBankTo retrieve protein sequences from GenBank use thecw_get_genbank_seqscommand.Extract sequencesTo extract GenBank and/or UniProt protein sequences from a local CAZyme database, use thecw_extract_db_seqscommand.PDBTo protein structure files from PDB use thecw_get_pdb_structurescommand.Note:PDB structure files are retrieved for the PDB accessions that areina local CAZyme database created usingcazy_webscraper. A freshly built CAZyme database only contains NCBI protein accessions, taxonomic kingdoms, source organisms, and CAZy family annotations. Therefore, thecw_get_uniprot_datacommand must be used to retrieve PDB accessions from the UniProt databasepriorto using thecw_get_pdb_structurescommand.Interrogate the databaseTo interrogate the database, use thecw_query_databasecommand.Local CAZyme database schemaThe schema of a local CAZyme database can be retrieved usingcazy_webscraper:cw_get_db_schema<pathtolocalCAZymedatabase>Alternatively,sqlite3can be used to retrieve the schema:sqlite3<pathtolocalCAZymedatabase>.schemaA visual representation of the db schema when usingcazy_webscraperversion >= 2.3.0 can be foundhere.Creating a local CAZyme databaseCommand line options forcazy_webscraper, which is used to scrape CAZy and compile a local SQLite database.
Options are written in alphabetical order.email- [REQUIRED] User email address. This is required by NCBI Entrez for querying the Entrez server.Email address is not required when printing out the citation and version number information--cache_dir- Path to cache dir to be used instead of default cache dir path.--cazy_data- Path to a txt file downloaded from CAZy containing a CAZy db data dump.--cazy_synonyms- Path to a JSON file containing accepted CAZy class synonsyms if the default are not sufficient.--classes- list of classes from which all families are to be scrape.--config,-c- Path to a configuration YAML file. Default: None.--citation,-C- Print thecazy_webscrapercitation. When called, the program terminates after printng the citation and CAZy isnotscraped.--db_output,-o- Path to write out anewlocal CAZyme database.--database,-d- Path to anexistingslocal CAZyme database to add newly scraped too. Default: None.Do not use--db_outputand--databaseat the same time.If--db_outputand--databasearenotcalled,cazy_webscraperwrites out a local CAZyme database to the cwd with the standardised namecazy_webscraper_<date>_<time>.db--delete_old_relationships- Detele old CAZy family annotations of GenBank accessions. These are CAZy family annotations of a given GenBank accession are in the local database but the accession is not longer associated with those CAZy families, so delete old accession-family relationships.--families- List of CAZy (sub)families to scrape.--force,-f- force overwriting existing output file. Default: False.--genera- List of genera to restrict the scrape to. Default: None, filter not applied to scrape.--kingdoms- List of taxonomic kingdoms to restrict the scrape to. Default: None, filter is not applied.--log,-l- Target path to write out a log file. If not called, no log file is written. Default: None (no log file is written out).--nodelete,-n- When called content in an existing output directory is not deleted._When the--db_outputflag is used,cazy_webscraperwill create any necessary parent directories. If the direct/immediate parent directory of the database exists, by defaultcazy_webscraperwill delete the content in this parent directory.--ncbi_batch_size- The number of protein IDs submitted per batch to NCBI, when retrieving taxonomic classifications. Default 200.--nodelete_cache- When called, content in the existing cache dir willnotbe deleted. Default: False (existing content is deleted).--nodelete_log- When called, content in the existing log dir willnotbe deleted. Default: False (existing content is deleted).--retries,-r- Define the number of times to retry making a connection to CAZy if the connection should fail. Default: 10.--skip-ncbi_tax- Skip retrieving the latest taxonomic information for NCBI were multiple taxonomic classifications are retrieved from CAZy for a protein. The first taxonomy retrieved from CAZy will be added to the local CAZyme database. Default False - the first taxon listed for each protein is added to the local CAZyme database.--sql_echo- Set SQLite engine echo parameter to True, causing SQLite to print log messages. Default: False.--subfamilies,-s- Enable retrival of CAZy subfamilies, otherwiseonlyCAZy family annotations will be retrieved. Default: False.--species- List of species written as Genus Species) to restrict the scraping of CAZymes to. CAZymes will be retrieved forallstrains of each given species.--strains- List of specific species strains to restrict the scraping of CAZymes to.--timeout,-t- Connection timout limit (seconds). Default: 45.--validate, - Retrieve CAZy family population sizes from the CAZy website and check against the number of family members added to the local CAZyme database, as a method for validating the complete retrieval of CAZy data.--verbose,-v- Enable verbose logging. This does not set the SQLite engineechoparameter to True. Default: False.--version,-V- Printcazy_webscraperversion number. When called and the version number is printed,cazy_webscraperis immediately terminated.Combining configuration filterscazy_webscraperapplies filters in a successive and layered structure.CAZy class and family filters are applied first.Kingdom filters are applied second.Lastly, taxonomy (genus, species and strain) filters are applied.Default CAZy class synonymsCAZy classes are accepted in the written long form (such as Glycoside Hydrolases) and in their abbreviated form (e.g. GH).Both the plural and singular abbreviated form of a CAZy class name is accepted, e.g. GH and GHs.Spaces, hythens, underscores and no space or extract character can be used in the CAZy class names. Therefore, Glycoside Hydrolases, Glycoside-Hydrolases, Glycoside_Hydrolases and GlycosideHydrolases are all accepted.Class names can be written in all upper case, all lower case, or mixed case, such as GLYCOSIDE-HYDROLASES, glycoside hydrolases and Glycoside Hydrolases. All lower or all upper case CAZy class name abbreviations (such as GH and gh) are accepted.Retrieve data from UniProt[UniProtKB] is one of the largest protein database, incorporating data from the [PDB] structure database, NCBI and other protein annotation databases.cazy_webscrapercan retrieve protein data from UniProt for proteins catalogued in a local CAZyme database created usingcazy_webscraper. Specifically, for each protein,cazy_webscrapercan retrieve:The UniProt accessionProtein namePDB accessions of associated structure files from the PDB databaseEC number annnotationsProtein sequence from the UniProtcazy_webscraperalways retrieves the UniProt accession and protein name, but the retrieval of PDB accession, EC numbers and protein sequences is optional.Data can be retrieived for all proteins in the local CAZyme database, or a specific subset. CAZy class, CAZy family, genus, species, strains, kingdom and EC number filters can be defined in order to define a dataset to retrieve protein data for.To retrieve all UniProt data for all proteins in a local CAZyme datbase, using the following command:cw_get_uniprot_data<path_to_local_CAZyme_db>--ec--pdb--sequenceConfiguring UniProt data retrievalBelow are listed the command-line flags for configuring the retrieval of UniProt data.database- [REQUIRED] Path to a local CAZyme database to add UniProt data to.--bioservices_batch_size- Change the query batch size submitted viabioservicesto UniProt to retrieve protein data. Default is 1000. See theUniProt REST API documentationfor batch size limits.--cache_dir- Path to cache dir to be used instead of default cache dir path.--cazy_synonyms- Path to a JSON file containing accepted CAZy class synonsyms if the default are not sufficient.--classes- List of classes to retrieve UniProt data for.--config,-c- Path to a configuration YAML file. Default: None.--ec,-e- Enable retrieval of EC number annotations from UniProt--ec_filter- Limist retrieval of protein data to proteins annotated with a provided list of EC numbers. Separate the EC numbers bu single commas without spaces. Recommend to wrap the entire str in quotation marks, for example:cw_get_uniprot_datamy_cazyme_db/cazyme_db.db--ec_filter'EC1.2.3.4,EC2.3.1.-'--families- List of CAZy (sub)families to scrape.--force- Force writing in existing cache directory.--genbank_accessions- Path to text file containing a list of GenBank accessions to retrieve protein data for. A unique accession per line.--genera- List of genera to restrict the scrape to. Default: None, filter not applied to scrape.--kingdoms- List of taxonomic kingdoms to restrict the scrape to. Default: None, filter is not applied.--log,-l- Target path to write out a log file. If not called, no log file is written. Default: None (no log file is written out).--name_update- Boolean, whether to overwrite the existing protein name (previously retrieved from UniProt). Default: do not update.--nodelete_cache- When called, content in the existing cache dir willnotbe deleted. Default: False (existing content is deleted).--nodelete_log- When called, content in the existing log dir willnotbe deleted. Default: False (existing content is deleted).--pdb,-p- Enable retrieval of PDB accessions. Default, PDB accessions not retrieved.--retries,-r- Define the number of times to retry making a connection to CAZy if the connection should fail. Default: 10.--delete_old_ec_relationships- Boolean, delete old Genbanks-EC number relationships - For those proteins in the local db for whom data is downloaded from UniProt, compare the current links between the proteins in the Genbanks table and EC numbers in the Ecs table. Delete Genbanks-Ecs relationships that are not longer listed in the respective protein records in UniProt.--delete_old_ecs- Boolean, delete EC number - Delete EC numbers that are not linked to any proteins listed in the Genbanks table. These can arise from multiple retrievals of data from the UniProt data over a period of time during UniProt records have been updated.--delete_old_pdb_relationships- Boolean, delete old Genbanks-PDB relationships - For those proteins in the local db for whom data is downloaded from UniProt, compare the current links between the proteins in the Genbanks table and PDB accessions in the Pdbs table. Delete Genbanks-Pdbs relationships that are not longer listed in the respective protein records in UniProt.--delete_old_pdbs- Boolean, delete PDB accessions - Protein relationships that are no longer listed in UniProt, i.e. an PDB accessions that are no longer included in UniProt but is in the local database. If set to TRUE these relationships will be DELETED from the database.--use_uniprot_cache- Path to a JSON file, keyed by UniProt accessions/IDs and valued by dicts containing{'gbk_acc': str, 'db_id': int}. This file part of the cache created bycw_get_uniprot_data. This is option to skip retrieving the UniProt IDs for a set of GenBank accessions, if retrieving data for the same dataset (this save a lot of time!)skip_download- Bool, default False. If set to True, only uses data from UniProt cache and will not download new data from UniProt.--sequence,-s- Retrieve protein amino acid sequences from UniProt--sql_echo- Set SQLite engine echo parameter to True, causing SQLite to print log messages. Default: False.--species- List of species written as Genus Species) to restrict the scraping of CAZymes to. CAZymes will be retrieved forallstrains of each given species.--strains- List of specific species strains to restrict the scraping of CAZymes to.--taxonomy,-t- Retrieve taxonomic classifications (genus species) and add to the local CAZyme database--timeout- Connection timout limit (seconds). Default: 45.--update_name- If a newer version of the protein name is available, overwrite the existing name for the protein in the database. Default is false, the protein name isnotoverwritten and updated.--update_seq- If a newer version of the protein sequence is available, overwrite the existing sequence for the protein in the database. Default is false, the protein sequence isnotoverwritten and updated.--use_uniprot_cache- Path to JSON file containing data previosuly retrieved from UniProt bycazy_webscraper, use if an error occurred while adding the data to the local CAZyme database. This will skip the retrieval of data from UniProt, and the cached data will be added to the local CAZyme database. This can also be shared with others to add the same data to their local CAZyme database.--uniprot_batch_size- Size of an individual batch query submitted to theUniProt REST APIto retrieve the UniProt accessions of proteins identified by the GenBank accession. Default is 150. The UniProt API documentation recommands batch sizes of less than 20,000 but batch sizes of 1,000 often result in HTTP 400 errors. It is recommend to keep batch sizes less than 1,000, and ideally less than 200.--verbose,-v- Enable verbose logging. This does not set the SQLite engineechoparameter to True. Default: False.UniProt batch sizes:Note that according to Uniprot (June 2022), there are various limits on ID Mapping Job Submission:========= =====================================================================================
Limit	  Details
========= =====================================================================================
100,000	  Total number of ids allowed in comma separated param ids in /idmapping/run api
500,000	  Total number of "mapped to" ids allowed
100,000	  Total number of "mapped to" ids allowed to be enriched by UniProt data
10,000	  Total number of "mapped to" ids allowed with filtering
========= =====================================================================================UniProt data retrieval cacheThe tables retrieved from UniProt are converted to dataframes, and written out as CSV files in the cache directoryThe parsed UniProt data as a single JSON fileRetrieveing protein seqences from GenBankProtein amino acid sequences can be retrieved for proteins in a local CAZyme database usingcazy_webscraper. Protein sequences can be retrieved for a specific subset of proteins, identified through the use of CAZy class, CAZy family, taxonomy (kingdom, genus, species and strain) filters, and EC number filters. The retrieved protein sequences are written to the local CAZyme database.Extracting protein sequences from the local CAZyme database and writing them to a BLAST database and/or FASTA file(s) is covered in the next section.To retrieve all GenBank protein seuqneces for all proteins in a local CAZyme datbase, using the following command:cw_get_genbank_seqs<path_to_local_CAZyme_db>Configuring GenBank protein sequence retrievalBelow are listed the command-line flags for configuring the retrieval of protein sequences from GenBank.database- [REQUIRED] Path to a local CAZyme database to add UniProt data to.email- [REQUIRED] User email address, required by NCBI Entrez.--batch_size- Size of batch query posted to NCBI Entrez. Default 150.--cache_dir- Path to cache dir to be used instead of default cache dir path.--cazy_synonyms- Path to a JSON file containing accepted CAZy class synonsyms if the default are not sufficient.--config,-c- Path to a configuration YAML file. Default: None.--classes- List of classes from which all families are to be scrape.--ec_filter- Limist retrieval of protein data to proteins annotated with a provided list of EC numbers. Separate the EC numbers bu single commas without spaces. Recommend to wrap the entire str in quotation marks, for example:cw_get_uniprot_datamy_cazyme_db/cazyme_db.db--ec_filter'EC1.2.3.4,EC2.3.1.-'--force,-f- Force writing cachce to exiting cache directory.--families- List of CAZy (sub)families to scrape.#--kingdoms- List of taxonomy kingdoms to retrieve UniProt data for.--genbank_accessions- Path to text file containing a list of GenBank accessions to retrieve protein data for. A unique accession per line.--genera- List of genera to restrict the scrape to. Default: None, filter not applied to scrape.--log,-l- Target path to write out a log file. If not called, no log file is written. Default: None (no log file is written out).--nodelete_cache- When called, content in the existing cache dir willnotbe deleted. Default: False (existing content is deleted).--retries,-r- Define the number of times to retry making a connection to CAZy if the connection should fail. Default: 10.--seq_dict, - Path to a JSON file, keyed by GenBank accessions and valued by protein sequence. This file is created as part of the cache, after all protein sequences are retrieved from GenBank.--seq_update- If a newer version of the protein sequence is available, overwrite the existing sequence for the protein in the database. Default is false, the protein sequence isnotoverwritten and updated. This skips the retrieval of the protein sequences from GenBank.--sql_echo- Set SQLite engine echo parameter to True, causing SQLite to print log messages. Default: False.--species- List of species written as Genus Species) to restrict the scraping of CAZymes to. CAZymes will be retrieved forallstrains of each given species.--strains- List of specific species strains to restrict the scraping of CAZymes to.--verbose,-v- Enable verbose logging. This does not set the SQLite engineechoparameter to True. Default: False.GenBank sequence retrieval cachecazy_webscraperproduces three cache files, which are written to the cache dir:no_seq_retrieved.txtwhich lists the GenBank accessions for which no sequence could be retrieved from GenBankseq_retrieved.txtwhich list GenBank accessiosn for which a sequence was retrieved from GenBankJSON file keyed by GenBank accessions and valued by the retrieved protein sequenceExtracting protein sequences from the local CAZyme database and building a BLAST databaseProtein sequences from GenBank and UniProt that are stored in the local CAZyme database can be extracted usingcazy_webscraper, and written to any combination of:1 FASTA file per unique proteinA single FASTA file containing all extracted seqencesA BLAST databaseFASTA file format:Protein sequences extracted from a local CAZyme database are written out with the GenBank/UniProt accession as the protein ID, and the name of the source database ('GenBank' or 'UniProt') as the description.To extract all protein seqeunces from the local CAZyme database using the following command structure:cw_extract_db_seqs<path_to_local_CAZyme_db>genbankuniprotTo retrieve protein sequences from GenBank or UniProt, name only the respective database. For example, to retrieve only
GenBank proteins:cw_extract_db_seqs<path_to_local_CAZyme_db>genbankConfiguring extracting sequences from a local CAZyme dbBelow are listed the command-line flags for configuring the extraction of protein sequences from the local CAZyme db.database- [REQUIRED] Path to a local CAZyme database to add UniProt data to.source- [REQUIRED] Define source databases of protein sequences. Accepts 'genbank' and 'uniprot'. To list both, separate with a single space (' ')cw_extract_sequencecazy_database.dbgenbankuniprotThe database names are not case sensitive, therefore, both GenBank and genbank are accepted.-b,--blastdb- Create BLAST database of extracted protein sequences. Provide the path to the directory to store the BLAST database in.--fasta_dir- Write out each extracted sequence to a separate FASTA file in the provided dir. Provide a path to a directory to write out the FASTA files.--fasta_file- Write out all extracted sequences to a single FASTA file. Provide a path to write out the FASTA file.Note: at least one of--blastdb,--fasta_dir, and--fasta_filemust be called to informcazy_webscraperwhere to write the output to. If none are called sequences will be extracted.--cache_dir- Path to cache dir to be used instead of default cache dir path.--cazy_synonyms- Path to a JSON file containing accepted CAZy class synonsyms if the default are not sufficient.--config,-c- Path to a configuration YAML file. Default: None.--classes- List of classes from which all families are to be scrape.--ec_filter- Limist retrieval of protein data to proteins annotated with a provided list of EC numbers. Separate the EC numbers bu single commas without spaces. Recommend to wrap the entire str in quotation marks, for example:cw_get_uniprot_datamy_cazyme_db/cazyme_db.db--ec_filter'EC1.2.3.4,EC2.3.1.-'--force,-f- Force overwriting exsiting files and writing to existing output directory.--families- List of CAZy (sub)families to scrape.#--kingdoms- List of taxonomy kingdoms to retrieve UniProt data for.--genbank_accessions- Path to text file containing a list of GenBank accessions to retrieve protein data for. A unique accession per line.--genera- List of genera to restrict the scrape to. Default: None, filter not applied to scrape.--log,-l- Target path to write out a log file. If not called, no log file is written. Default: None (no log file is written out).--nodelete- When called, content in the existing output dir willnotbe deleted. Default: False (existing content is deleted).--nodelete_cache- When called, content in the existing cache dir willnotbe deleted. Default: False (existing content is deleted).--sql_echo- Set SQLite engine echo parameter to True, causing SQLite to print log messages. Default: False.--species- List of species written as Genus Species) to restrict the scraping of CAZymes to. CAZymes will be retrieved forallstrains of each given species.--strains- List of specific species strains to restrict the scraping of CAZymes to.--uniprot_accessions- Path to text file containing a list of UniProt accessions to retrieve protein data for. A unique accession per line.--verbose,-v- Enable verbose logging. This does not set the SQLite engineechoparameter to True. Default: False.Retrieving protein structure files from PDBcazy_webscrapercan retrieve protein structure files for proteins catalogued in a local CAZyme database. Structure files can be retrieved for all proteins in the database or a subset of proteins, chosen by defining CAZy class, CAZy family, taxonomy (kingdom, genus, species and strain) filters, and EC number filters.Retrieval of structure files from PDB is performed by theBioPythonmodulePDB[Cocket al., 2009], which writes the downloaded structure files to the local disk. Therefore, the downloaded structure files arenotstored in the local CAZyme database at the present.Cock, P. J. A, Antao, T., Chang, J. T., Chapman, B. A., Cox, C. J., Dalke, A.et al.(2009) 'Biopython: freely available Python tools for computaitonal molecular biology and bioinformatics',Bioinformatics, 25(11), pp. 1422-3.To retrieve structure files for all proteins in a local CAZyme database inmmCifandpdbformat, use the following command:cw_get_pdb_structures<path_to_local_CAZyme_db>mmcif,pdbProtein structure files can be retrieved in a variety of formats, including:mmCif (default, PDBx/mmCif file),pdb (format PDB),xml (PDBML/XML format),mmtf (highly compressed),bundle (PDB formatted archive for large structure}Configuring PDB protein structure file retrievalBelow are listed the command-line flags for configuring the retrieval of protein structure files from PDB.database- [REQUIRED] Path to a local CAZyme database to add UniProt data to.pdb[REQUIRED] The file types to be retrieved from PDB. The following file types are supported:mmCifpdbxmlmmftbundleTo chose multiple file types, list all desired file types, separting the files using a single space (' '). For example:cw_get_genbank_seqmy_cazyme_db/cazyme_db.dbmmcifpdbxmlProviding the file typesiscase sensitive, but the order the file types are listed doesnotmatter.--batch_size- Size of an individual batch query of PDB accessions submitted to PDB. Default is 150.--cache_dir- Path to cache dir to be used instead of default cache dir path.--cazy_synonyms- Path to a JSON file containing accepted CAZy class synonsyms if the default are not sufficient.--config,-c- Path to a configuration YAML file. Default: None.--classes- List of classes from which all families are to be scrape.--ec_filter- Limist retrieval of protein data to proteins annotated with a provided list of EC numbers. Separate the EC numbers bu single commas without spaces. Recommend to wrap the entire str in quotation marks, for example:cw_get_uniprot_datamy_cazyme_db/cazyme_db.db--ec_filter'EC1.2.3.4,EC2.3.1.-'-F,--file_only- Only add seqs provided via JSON and/or FASTA file. Do not retrieved data from NCBI.--families- List of CAZy (sub)families to scrape.--genbank_accessions- Path to text file containing a list of GenBank accessions to retrieve protein data for. A unique accession per line.--genera- List of genera to restrict the scrape to. Default: None, filter not applied to scrape.--kingdoms- List of taxonomy kingdoms to retrieve UniProt data for.--log,-l- Target path to write out a log file. If not called, no log file is written. Default: None (no log file is written out).--nodelete- When called, content in the existing output dir willnotbe deleted. Default: False (existing content is deleted).--nodelete_cache- When called, content in the existing cache dir willnotbe deleted. Default: False (existing content is deleted).--outdir,-o- Output directory to write out downloaded protein structure files to. Default is to write out the downloaded structure files to the current working directory.--overwrite- Overwrite existing structure files with the same PDB accession as files being downloaded. Default false, do not overwrite existing files.--retries,-r- Define the number of times to retry making a connection to CAZy if the connection should fail. Default: 10.--seq_dict- Path to a JSON file, keyed by GenBank accessions and valued by protein sequence. Add seqs in file to the local CAZyme database.--seq_file- Path to a FASTA file, keyed by GenBank accessions and valued by protein sequence. Add seqs in file to the local CAZyme database.--sql_echo- Set SQLite engine echo parameter to True, causing SQLite to print log messages. Default: False.--species- List of species written as Genus Species) to restrict the scraping of CAZymes to. CAZymes will be retrieved forallstrains of each given species.--strains- List of specific species strains to restrict the scraping of CAZymes to.--timeout,-t- Connection timout limit (seconds). Default: 45.--uniprot_accessions- Path to text file containing a list of UniProt accessions to retrieve protein data for. A unique accession per line.--verbose,-v- Enable verbose logging. This does not set the SQLite engineechoparameter to True. Default: False.Retrieving NCBI taxonomiesTaxonomic opinions frequently change, and CAZy can fall out of sync with the latest taxonomic classifications with NCBI. To maintain an updated CAZyme database,cazy_webscrapercan be used to retrieve the latest taxonomic classifications from NCBI for CAZymes in a local CAZyme database that meet the user's specified criteria. The downloaded taxonomic data is added to the local CAZyme database.The complete lineage data is retrieved from NCBI. Whereas CAZy lists only the kingdom, genus, species and strain,cazy_webscraperretrieves the full taxonomic lineage from NCBI and stores the complete lineage in theNcbiTaxstable in the local CAZyme database. This include:KingdomPhylumClass (stored astax_classin the local CAZyme database due to keyword classes in Python)Order(stored astax_orderin the local CAZyme database due to keyword classes in SQL)FamilyGenusSpeciesStrainThe command for retrieving the latest taxonomic classifications from the NCBI Taxonomy database usingcazy_webscraperiscw_get_ncbi_taxs.Configuring retrieving NCBI taxonomiesBelow are listed the command-line flags for configuring the retrieval of taxonomic classifications from the NCBI Taxonomy database, and adding them to the local CAZyme database.database- [REQUIRED] Path to a local CAZyme database to add UniProt data to.email- [REQUIRED] User email address (required by Entrez)--batch_size- Size of an individual batch query of NCBI sequence version accessions to NCBI. Default is 150.--cache_dir- Path to cache dir to be used instead of default cache dir path.--cazy_synonyms- Path to a JSON file containing accepted CAZy class synonsyms if the default are not sufficient.--config,-c- Path to a configuration YAML file. Default: None.--classes- List of classes from which all families are to be scrape.--ec_filter- Limist retrieval of protein data to proteins annotated with a provided list of EC numbers. Separate the EC numbers bu single commas without spaces. Recommend to wrap the entire str in quotation marks, for example:cw_get_uniprot_datamy_cazyme_db/cazyme_db.db--ec_filter'EC1.2.3.4,EC2.3.1.-'--families- List of CAZy (sub)families to scrape.--force- Force writing to exiting cache directory.--genbank_accessions- Path to text file containing a list of GenBank accessions to retrieve protein data for. A unique accession per line.--genera- List of genera to restrict the scrape to. Default: None, filter not applied to scrape.--kingdoms- List of taxonomy kingdoms to retrieve UniProt data for.--log,-l- Target path to write out a log file. If not called, no log file is written. Default: None (no log file is written out).--nodelete_cache- When called, content in the existing cache dir willnotbe deleted. Default: False (existing content is deleted).--retries,-r- Define the number of times to retry making a connection to NCBI if the connection should fail. Default: 10.--sql_echo- Set SQLite engine echo parameter to True, causing SQLite to print log messages. Default: False.--species- List of species written as Genus Species) to restrict the scraping of CAZymes to. CAZymes will be retrieved forallstrains of each given species.--strains- List of specific species strains to restrict the scraping of CAZymes to.--uniprot_accessions- Path to text file containing a list of UniProt accessions to retrieve protein data for. A unique accession per line.--update_gbk- Update the existing NCBI taxonomy data in records in theGenbankstable already with NCBI taxonomy data. By default, NCBI tax data is only added to records in theGenbankstable if NCBI taxonomy data is not already presented in the record.--update_taxs- Update existing NCBI taxonomy data in theNcbiTaxstable. By default onlt add new NCBI taxonomy data, do not update (and thus overwrite) existing data.--use_lineage_cache- Use cached lineage data previously compliled bycazy_webscraper- skips retrieving NCBI Tax and Protein IDs and lineage data from NCBI--use_protein_ids- Path to plain text file containing a tab delimited list of (1) NCBI Protein ID and (2) NCBI sequence version accession. Used cached NCBI Protein IDs.--use_tax_ids- Path to plain text file listing a unique NCBI Taxonomy ID per line. Get lineages for cached NCBI Tax IDs.--verbose,-v- Enable verbose logging. This does not set the SQLite engineechoparameter to True. Default: False.Retrieving genomic assembly data from NCBICAZy does not list the source genomic assembly for proteins catalogued in its database.cazy_webscrapercan be used to retrieve the latest genomic assembly data from NCBI for CAZymes in
a local CAZyme database that meet the user's specified criteria. The downloaded assembly data is added
to the local CAZyme database entails:Assembly nameGenBank genomic version accessionGenBank genomic IDRefSeq genomic version accessionRefSeq genomic IDThe command for retrieving genomic assembly data from the NCBI Assembly database using cazy_webscraper iscw_get_genomics.Configuring retrieving genomic assembly dataBelow are listed the command-line flags for configuring the retrieval of genomic assembly data from the NCBI Assembly database, and adding the data to the local CAZyme database.database- [REQUIRED] Path to a local CAZyme database to add UniProt data to.email- [REQUIRED] User email address (required by Entrez)--batch_size- Size of an individual batch query of NCBI sequence version accessions to NCBI. Default is 150.--cache_dir- Path to cache dir to be used instead of default cache dir path.--cazy_synonyms- Path to a JSON file containing accepted CAZy class synonsyms if the default are not sufficient.--config,-c- Path to a configuration YAML file. Default: None.--classes- List of classes from which all families are to be scrape.--ec_filter- Limist retrieval of protein data to proteins annotated with a provided list of EC numbers. Separate the EC numbers bu single commas without spaces. Recommend to wrap the entire str in quotation marks, for example:cw_get_uniprot_datamy_cazyme_db/cazyme_db.db--ec_filter'EC1.2.3.4,EC2.3.1.-'--families- List of CAZy (sub)families to scrape.--force- Force writing to exiting cache directory.--genbank_accessions- Path to text file containing a list of GenBank accessions to retrieve protein data for. A unique accession per line.--genera- List of genera to restrict the scrape to. Default: None, filter not applied to scrape.--kingdoms- List of taxonomy kingdoms to retrieve UniProt data for.--log,-l- Target path to write out a log file. If not called, no log file is written. Default: None (no log file is written out).--nodelete_cache- When called, content in the existing cache dir willnotbe deleted. Default: False (existing content is deleted).--retries,-r- Define the number of times to retry making a connection to NCBI if the connection should fail. Default: 10.--sql_echo- Set SQLite engine echo parameter to True, causing SQLite to print log messages. Default: False.--species- List of species written as Genus Species) to restrict the scraping of CAZymes to. CAZymes will be retrieved forallstrains of each given species.--strains- List of specific species strains to restrict the scraping of CAZymes to.--timeout- Connection timeout threshold (s). (Default: 45s).--uniprot_accessions- Path to text file containing a list of UniProt accessions to retrieve protein data for. A unique accession per line.--update- Update assembly data in the database. Warning: updating records will overwrite existing data in the database. (Default: False, data is not updated).--verbose,-v- Enable verbose logging. This does not set the SQLite engineechoparameter to True. Default: False.Retrieving GTDB Taxonomiescazy_webscrapercan be used to retrieve the latest taxonomic classification from theGenome Taxonomy Database (GTDB)taxonomy database for a set of proteins of interest in a local CAZyme database.Note:As in the GTDB database, GTDB taxonomic classifications are retrieved and associated with genomes stored
in the local CAZyme database. To retrieve GTDB taxonomic classifications the genomic data for the
proteins of interestmustbe listed in the local CAZyme database.GTDB catalogues archaeal and bacterial lineages. Either archaeal and/or bacterial GTDB lineages can be added to the local CAZyme database.The complete lineage data is retrieved from GTDB. Whereas CAZy lists only the kingdom, genus, species and strain,cazy_webscraperretrieves the full taxonomic lineage from GTDB and stores the complete lineage in theGtdbTaxstable in the local CAZyme database. This include:KingdomPhylumClass (stored astax_classin the local CAZyme database due to keyword classes in Python)Order(stored astax_orderin the local CAZyme database due to keyword classes in SQL)FamilyGenusSpeciesStrainRelease (the GTDB release from which the lineage was retrieved)The command for retrieving the latest taxonomic classifications from the NCBI Taxonomy database usingcazy_webscraperiscw_get_gtdb_taxs.Configuring retrieving GTDB taxonomiesdatabase-REQUIREDPath to a local CAZyme database to add UniProt data to.taxs-REQUIREDKingdoms to get lineages from. Accepts 'archaea' and/or 'bacteria'. Separate with a single space. Order does not matter.
Determines which datafiles are retrieved from GTDB.--archaea_file- Path to GTDB archaea data file. Default: None, download latest dataset from GTDB.--bacteria_file- Path to GTDB bacteria data file. Default: None, download latest dataset from GTDB... NOTE::
The filenames of provided GTDB data files must match the filename format used by GTDB, to allowcazy_webscraperto retrieve the release number of the dataset.--cache_dir- Path to cache dir to be used instead of default cache dir path.--cazy_synonyms- Path to a JSON file containing accepted CAZy class synonsyms if the default are not sufficient.--config``, ``-c- Path to a configuration YAML file. Default: None.--classes- list of classes to retrieve UniProt data for.--ec_filter- List of EC numbers to limit the retrieval of structure files to proteins with at least one of the given EC numbersin the local CAZyme database.--families- List of CAZy (sub)families to retrieve UniProt protein data for.--genbank_accessions- Path to text file containing a list of GenBank accessions to retrieve protein data for. A unique accession per line.--genera- List of genera to restrict the retrieval of protein to data from UniProt to proteins belonging to one of the given genera.--kingdoms- List of taxonomy kingdoms to retrieve UniProt data for.--log``, ``-l- Target path to write out a log file. If not called, no log file is written. Default: None (no log file is written out).--nodelete_cache- When called, content in the existing cache dir willnotbe deleted. Default: False (existing content is deleted).--retries``, ``-r- Define the number of times to retry making a connection to GTDB if the connection should fail. Default: 10.--sql_echo- Set SQLite engine echo parameter to True, causing SQLite to print log messages. Default: False.--species- List of species (organsim scientific names) to restrict the retrieval of protein to data from UniProt to proteins belonging to one of the given species.--strains- List of species strains to restrict the retrieval of protein to data from UniProt to proteins belonging to one of the given strains.--uniprot_accessions- Path to text file containing a list of UniProt accessions to retrieve protein data for. A unique accession per line.--update_genome_lineage_gbk- Update Genome GTDB lineage. Default: only add lineages to Genomes without a lineage.--verbose``, ``-v- Enable verbose logging. This doesnotset the SQLite engineechoparameter to True. Default: False.Thecazy_webscraperAPI or Interrogating the local CAZyme databaseThe SQLite3 database compiled bycazy_webscrapercan be interrogated in the native interface (i.e. queries written in SQL can be used to interrogate the database). This can be achieved via the command-line or via an SQL database browser (such asDB Browser for SQLite).cazy_webscraperalso provides its own API (Application Programming Interface) for interrogating the local CAZyme database:cw_query_database. The API faciliates the intergration of the dataset in the local CAZyme database into downstream bioinformatic pipelines,andprovides a method of interrograting the dataset for those who do not use SQL.cw_query_databaseis the command that can be used to interrogate the dataset in the local CAZyme database, and extract protein data of interest for the proteins matching the user's cirteria of
interest.By defaultcw_query_databaseretrieves only the GenBank accessions of proteins matching the user's criteria of interest. If not criteria of interest are provided, all GenBank accessions are retrieved. Optional flags can be applied to retrieve additional data about CAZymes that match the user's criteria of interest.cw_query_databasecurrently supports writing the output in two file formats:json, by default this is written to the current working directory and with name<database_name>_<retrieved_data>_YYYY-MM-DD_HH-MM-SS.jsoncsv, by default this is written to the current working directory and with name<database_name>_<retrieved_data>_YYYY-MM-DD_HH-MM-SS.csvcw_query_databasetakes two positional arguments:The path to the local CAZyme databaseThe file formats of the output files, presented as a list with each file type separated by as single comma (e.g.json,csv). This isnotcase sensitive and the order doesnotmatter.
For example, to retrieve all GenBank accessions for all proteins in the local CAZyme database, and
write them to ajsonfile, the following command could be used for a database calledcazy.db:cw_query_databasecazy.dbjsonBy default the output is written to the current working directory. A specific output directory (which can be built bycazy_webscraper) can be defined using the-o/--output_dirflag, followed by the path of the desired output directory.The file names of all output files are composed of the name of the local CAZyme database, followed by the names of the data retrieved from the local CAZyme database. For example, retrieving the following data from the local CAZyme database calledcazy_database.db:CAZy family annotationCAZy subfamily annotationsEC numbersPDB accessions
Will produce the following file name:cazy_database_gbkAcc_fams_subfams_ec_pdb.An optional prefix can be applied to all output file names using the-p/--prefixflag, followed by the desired prefix. For example, using the same example as above, the prefix 'engineering_candidates_` can be applied to every output file by adding the following to command:--prefixengineering_candidates_This will produce output files with the file nameengineering_candidates_cazy_database_gbkAcc_fams_subfams_ec_pdb._gbkAccis always included in the file name because GenBank accessions are always retrieved and written to the output by cthe api.The data retrieved from the local CAZyme database and included in the final output is defined using the--includeflag, followed by a list of all data toincludein the output, with each data separated with a single space.Configuring interrogating the local CAZyme databaseBelow are listed the command-line flags for configuring the interrogation of the local CAZyme database.database- [REQUIRED] Path to a local CAZyme database to add UniProt data to.file_types- [REQUIRED] file types to write the interrogation output to. Accepted file types areJSONandCSV. These arenotcase sensitive, and the order does not matter.--cazy_synonyms- Path to a JSON file containing accepted CAZy class synonsyms if the default are not sufficient.--config,-c- Path to a configuration YAML file. Default: None.--class- Include a 'Class' column in the outputcsvfile, listing the CAZy class of all retrieved CAZymes--classes- List of classes from which all families are to be retrieval.--ec_filter- Limist retrieval of protein data to proteins annotated with a provided list of EC numbers. Separate the EC numbers bu single commas without spaces. Recommend to wrap the entire str in quotation marks, for example:cw_get_uniprot_datamy_cazyme_db/cazyme_db.db--ec_filter'EC1.2.3.4,EC2.3.1.-'--families- List of CAZy (sub)families to retrieve CAZymes from. This includes families and SUBfamilies.--force,-f- force writing to existing output dir.--genera- List of genera to restrict the retrieval to. Default: None, filter not applied to scrape.--include- List additional data to include in the output. Multiple fields can be named, separating each with a single space (' '). The accepted fields are:'class' - Include the CAZy class annotations'family' - Include the CAZy family annotations'subfamily' - Include the subfamily class annotations'uniprot_acc' - Include the UniProt accession'uniprot_name' - Include the protein name retrieved from UniProt'ec' - Include the EC number annotations'pdb' - Include the PDB accessions'genbank_seq' - Include the GenBank protein sequence'uniprot_seq' - Include the Uniprot protein sequence--kingdoms- List of taxonomy kingdoms to retrieve UniProt data for.--log,-l- Target path to write out a log file. If not called, no log file is written. Default: None (no log file is written out).--nodelete- When called, content in the existing output dir willnotbe deleted. Default: False (existing content is deleted).--nodelete_cache- When called, content in the existing cache dir willnotbe deleted. Default: False (existing content is deleted).--output_dir,-o- Output path to write the compiledcsvfile. Default is to write out thecsvfile to the current working directory.--overwrite- Overwrite existing output files. Default: False, program closes if output already exists"--prefix,-p- Prefix of output files, default none.--sql_echo- Set SQLite engine echo parameter to True, causing SQLite to print log messages. Default: False.--species- List of species written as (Genus Species) to restrict the retrieval of CAZymes to. CAZymes will be retrieved forallstrains of each given species.--strains- List of specific species strains to restrict the retrieval of CAZymes to.--verbose,-v- Enable verbose logging. This does not set the SQLite engineechoparameter to True. Default: False.Configuringcazy_webscraperusing a YAML fileThe retrieval of data from CAZy, UniProt, GenBank and PDB can be configured at the command-lineandvia a YAML file.The YAML file must have the following structure, specifically the YAML file must have the exact keys presented below and the values can be customised to configure the behaviour ofcazy_webscraper:classes:# classes from which all proteins will be retrieved-"GH"-"CE"Glycoside Hydrolases (GHs):GlycosylTransferases (GTs):Polysaccharide Lyases (PLs):-"GT1"-"GT5"-"GT6"Carbohydrate Esterases (CEs):Auxiliary Activities (AAs):Carbohydrate-Binding Modules (CBMs):genera:# list genera to be scraped-"Trichoderma"-"Aspergillus"species:# list species, this will scrape all strains under the species-"Pythiumultimum"strains:# list specific strains to be scrapedkingdoms:# Archaea, Bacteria, Eukaryota, Viruses, UnclassifiedFor configuring the retrieval of data from UniProt, GenBank and PDB (_but not CAZy) the additionalectag can be included to limit the retrieval of data to proteins annotated with specific EC numbers.When listing EC numbers, the 'EC' prefix can be included or excluded. For example, 'EC1.2.3.4' and '1.2.3.4' are accepted. Additionally, both dashes ('-') and astrixes ('*') can be used to represent missing digits, both '1.2.3.-' and '1.2.3.*' are accepted.cazy_webscraperperforms a direct EC number comparison. Therefore, supplyingcazy_webscraperwith the EC number EC1.2.3.- will only retrieve protein specifically annotated with EC1.2.3.-.cazy_webscraperwillnotretrieve proteins will all completed EC numbers under EC1.2.3.-, thus,cazy_webscraperwillnotretrieve data for proteins annotated with EC1.2.3.1, EC1.2.3.2, EC1.2.3.3, etc.Example configuration files, and an empty configuraiton file template are located in theconfiguration_files/directory of this repo.Integrating a local CAZyme databasecazy_webscrapercompiles data downloaded from external databases into a local SQLite3 database.To facilitate integratting the local CAZyme database into third-partyPythonapplications, use theget_db_connectionfunction fromcazy_webscraper, which will return an open connection to the CAZyme database fromsqlalchemy.get_db_connectiontakes 2 required args and one optional arg:Required:Path to the local CAZyme database (provided as apathlib.Pathobject)Bool to set thesqlalchemy.create_engineparamsql_echo. When set toTrue, the SQL log will be printed to the terminalOptional:Bool to reflect if a new database. Default isFalse, i.e. connecting to an existing local CAZyme databaseImport the function into thePythonscript using:fromcazy_webscraper.sql.sql_ormimportget_db_connectionDatabase SchemaThis is the structure of the local SQLite3 database compiled bycazy_webscraperversion >=2.3.0:ContributionsWe welcome contributions and suggestions. You can raise issues at this repository, or fork the repository and submit pull requests, at the links below:IssuesPull RequestsLicense and copyrightMIT LicenseCopyright (c) 2022 University of St AndrewsCopyright (c) 2022 University of StrathclydeCopyright (c) 2022 James Hutton Institute