Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save peterk87/59c1db0d77b5af330c0d720cd60007b9 to your computer and use it in GitHub Desktop.
Save peterk87/59c1db0d77b5af330c0d720cd60007b9 to your computer and use it in GitHub Desktop.
Access NCBI Genbank genome assemblies with Python
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Access NCBI FTP site with Python ftplib\n",
"\n",
"Using Python and ftplib could be a good way to pull genome assemblies from NCBI esp given that all that information is organized nicely in a summary table. \n",
"\n",
"Segmented genomes are esp troublesome since looking for them via Entrez API will not link up the segments properly. The Genbank file doesn't contain any information that could help. \n",
"\n",
"\n",
"\n",
"## Genbank Viral assembly_summary.txt\n",
"\n",
"- ftp://ftp.ncbi.nlm.nih.gov/genomes/genbank/viral/assembly_summary.txt\n",
"\n",
"> See ftp://ftp.ncbi.nlm.nih.gov/genomes/README_assembly_summary.txt for a description of the columns in this file.\n",
"\n",
"\n",
"### COLUMN SPECIFICATIONS\n",
"\n",
"\n",
"The `assembly_summary.txt` files have 20 tab-delimited columns. \n",
"\n",
"Header rows begin with `#`.\n",
"\n",
"\n",
"- `assembly_accession` [1]\n",
" - **Assembly accession**: the assembly accession.version reported in this field is a unique identifier for the set of sequences in this particular version of the genome assembly.\n",
"- `bioproject` [2]\n",
" - **BioProject**: accession for the BioProject which produced the sequences in the genome assembly. A BioProject is a collection of biological data related to a single initiative, originating from a single organization or from a consortium. A BioProject record provides users a single place to find links to the diverse data types generated for that project. The record can be retrieved from the [NCBI BioProject resource](https://www.ncbi.nlm.nih.gov/bioproject/)\n",
" \n",
"- `biosample` [3]\n",
" - **BioSample**: accession for the BioSample from which the sequences in the genome assembly were obtained. A BioSample record contains a description of the biological source material used in experimental assays. The record can be retrieved from the [NCBI BioSample resource](https://www.ncbi.nlm.nih.gov/biosample/)\n",
" \n",
"- `wgs_master` [4]\n",
" - **WGS-master**: the GenBank Nucleotide accession and version for the master record of the Whole Genome Shotgun (WGS) project for the genome assembly. The master record can be retrieved from the [NCBI Nucleotide resource](https://www.ncbi.nlm.nih.gov/nuccore)\n",
" - Genome assemblies that are complete genomes, and those that are clone-based, do not have WGS-master records in which case this field will be empty.\n",
" \n",
"- `refseq_category` [5]\n",
" - **RefSeq Category**: whether the assembly is a reference or representative genome in the NCBI Reference Sequence (RefSeq) project classification. \n",
" - Values:\n",
" - reference genome \n",
" - a manually selected high quality genome assembly that NCBI and the community have identified as being important as a standard against which other data are compared\n",
" - representative genome \n",
" - a genome computationally or manually selected as a representative from among the best genomes available for a species or clade that does not have a designated reference genome\n",
" - na\n",
" - no RefSeq category assigned to this assembly\n",
" - Prokaryotes may have more than one reference or representative genome per species. For more information see: https://www.ncbi.nlm.nih.gov/refseq/about/prokaryotes/#referencegenome\n",
" - Eukaryotes have no more than one reference or representative genome per species. If there are no assemblies in RefSeq for a particular eukaryotic species, then the GenBank assembly that RefSeq would select as the best available for that species will be designated as the representative genome.\n",
" - Viruses may have one or more reference genomes per species. The representative genome designation is not applied to viruses and viroids.\n",
"- `taxid` [6]\n",
" - **Taxonomy ID**: the NCBI taxonomy identifier for the organism from which the genome assembly was derived. The NCBI Taxonomy Database is a curated classification and nomenclature for all of the organisms in the public sequence databases. The taxonomy record can be retrieved from the [NCBI Taxonomy resource](https://www.ncbi.nlm.nih.gov/taxonomy/) \n",
"- `species_taxid` [7]\n",
" - **Species taxonomy ID**: the NCBI taxonomy identifier for the species from which the genome assembly was derived. The species taxid will differ from the \n",
" organism taxid (column 6) only when the organism was reported at a sub-\n",
" species or strain level.\n",
" \n",
"- `organism_name` [8]\n",
" - **Organism name**: the scientific name of the organism from which the sequences in the genome assembly were derived. This name is taken from the NCBI Taxonomy record for the taxid specified in column 6. Some older taxids were assigned at the strain level and for these the organism name will include the strain. Current practice is only to assign taxids at the species level; for these the organism name will be just the species, however, the strain name will be reported in the infraspecific_name field (column 9).\n",
"- `infraspecific_name` [9]\n",
" - **Infraspecific name**: the strain, breed, cultivar or ecotype of the organism from which the sequences in the genome assembly were derived. Data are reported in the form tag=value, e.g. strain=AF16. Strain, breed, cultivar and ecotype are not expected to be used together, however, if they are then they will be reported in a list separated by \", /\". Empty if no strain, breed, cultivar or ecotype is specified on the genomic sequence records.\n",
"- `isolate` [10]\n",
" - **Isolate**: the individual isolate from which the sequences in the genome assembly were derived. Empty if no isolate is specified on the genomic sequence records.\n",
"- `version_status` [11]\n",
" - **Version status**: the release status for the genome assembly version.\n",
" - Values:\n",
" - latest\n",
" - the most recent of all the versions for this assembly chain\n",
" - replaced\n",
" - this version has been replaced by a newer version of the assembly in the same chain\n",
" - suppressed \n",
" - this version of the assembly has been suppressed\n",
" - An assembly chain is the collection of all versions for the same assembly accession.\n",
"- `assembly_level` [12]\n",
" - **Assembly level**: the highest level of assembly for any object in the genome assembly.\n",
" - Values:\n",
" - Complete genome \n",
" - all chromosomes are gapless and have no runs of 10 or more ambiguous bases (Ns), there are no unplaced or unlocalized scaffolds, and all the expected chromosomes are present (i.e. the assembly is not noted as having partial genome representation). Plasmids and organelles may or may not be included in the assembly but if present then the sequences are gapless.\n",
" - Chromosome\n",
" - there is sequence for one or more chromosomes. This could be a completely sequenced chromosome without gaps or a chromosome containing scaffolds or contigs with gaps between them. There may also be unplaced or unlocalized scaffolds.\n",
" - Scaffold\n",
" - some sequence contigs have been connected across gaps to create scaffolds, but the scaffolds are all unplaced or unlocalized.\n",
" - Contig\n",
" - nothing is assembled beyond the level of sequence contigs\n",
"- `release_type` [13]\n",
" - **Release type**: whether this version of the genome assembly is a major, minor or patch release.\n",
" - Values:\n",
" - Major \n",
" - changes from the previous assembly version result in a significant change to the coordinate system. The first version of an assembly is always a major release. Most subsequent genome assembly updates are also major releases.\n",
" - Minor \n",
" - changes from the previous assembly version are limited to the following changes, none of which result in a significant change to the coordinate system of the primary assembly-unit:\n",
" - adding, removing or changing a non-nuclear assembly-unit\n",
" - dropping unplaced or unlocalized scaffolds\n",
" - adding up to 50 unplaced or unlocalized scaffolds which are shorter than the current scaffold-N50 value\n",
" - replacing a component with a gap of the same length\n",
" - Patch \n",
" - the only change is the addition or modification of a patch assembly-unit. \n",
" - See the [NCBI Assembly model web page](https://www.ncbi.nlm.nih.gov/assembly/\n",
" model/#asmb_def) for definitions of assembly-units and genome patches.\n",
"- `genome_rep` [14]\n",
" - **Genome representation**: whether the goal for the assembly was to represent the whole genome or only part of it.\n",
" - Values:\n",
" - Full\n",
" - the data used to generate the assembly was obtained from the whole genome, as in Whole Genome Shotgun (WGS) assemblies for example. There may still be gaps in the assembly.\n",
" - Partial \n",
" - the data used to generate the assembly came from only part of the genome. \n",
" - Most assemblies have full genome representation with a minority being partial genome representation. See the [Assembly help web page](https://www.ncbi.nlm.nih.gov/assembly/help/) for reasons that the genome representation would be set to partial.\n",
"- `seq_rel_date` [15]\n",
" - **Sequence release date**: the date the sequences in the genome assembly were released in the International Nucleotide Sequence Database Collaboration (INSDC) databases, i.e. DDBJ, ENA or GenBank.\n",
"- `asm_name` [16]\n",
" - **Assembly name**: the submitter's name for the genome assembly, when one was provided, otherwise a default name, in the form ASM#####v#, is provided by NCBI. Assembly names are not unique.\n",
"- `submitter` [17]\n",
" - **Submitter**: the submitting consortium or first position if a list of organizations. The full submitter information is available in the [NCBI BioProject resource](https://www.ncbi.nlm.nih.gov/bioproject/)\n",
"- `gbrs_paired_asm` [18]\n",
" - **GenBank/RefSeq paired assembly**: the accession.version of the GenBank assembly that is paired to the given RefSeq assembly, or vice-versa. \"na\" is reported if the assembly is unpaired.\n",
"- `paired_asm_comp` [19]\n",
" - **Paired assembly comparison**: whether the paired GenBank & RefSeq assemblies are identical or different.\n",
" - Values:\n",
" - identical \n",
" - GenBank and RefSeq assemblies are identical\n",
" - different \n",
" - GenBank and RefSeq assemblies are not identical\n",
" - na\n",
" - not applicable since the assembly is unpaired\n",
"- `ftp_path` [20]\n",
" - **FTP path**: the path to the directory on the NCBI genomes FTP site from which data for this genome assembly can be downloaded.\n",
"- `excluded_from_refseq` [21]\n",
" - **Excluded from RefSeq**: reasons the assembly was excluded from the NCBI Reference Sequence (RefSeq) project, including any assembly anomalies. See [here](https://www.ncbi.nlm.nih.gov/assembly/help/anomnotrefseq/)\n",
"- `relation_to_type_material` [22]\n",
" - **Relation to type material**: contains a value if the sequences in the genome assembly were derived from type material.\n",
" - Values:\n",
" - assembly from type material\n",
" - the sequences in the genome assembly were derived from type material\n",
" - assembly from synonym type material \n",
" - the sequences in the genome assembly were derived from synonym type material\n",
" - assembly from proxytype material \n",
" - the sequences in the genome assembly were derived from proxytype material\n",
" - assembly designated as neotype \n",
" - the sequences in the genome assembly were derived from neotype material\n",
" - assembly from reference material \n",
" - the sequences in the genome assembly were derived from reference material where type material never was available and is not likely to ever be available\n",
" - ICTV species exemplar \n",
" - the International Committee on Taxonomy of Viruses (ICTV) designated the genome assembly as the exemplar for the virus species \n"
]
},
{
"cell_type": "code",
"execution_count": 104,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"--2019-12-31 12:53:45-- ftp://ftp.ncbi.nlm.nih.gov/genomes/genbank/viral/assembly_summary.txt\n",
" => ‘assembly_summary.txt’\n",
"Resolving ftp.ncbi.nlm.nih.gov (ftp.ncbi.nlm.nih.gov)... 130.14.250.7, 2607:f220:41e:250::7\n",
"Connecting to ftp.ncbi.nlm.nih.gov (ftp.ncbi.nlm.nih.gov)|130.14.250.7|:21... connected.\n",
"Logging in as anonymous ... Logged in!\n",
"==> SYST ... done. ==> PWD ... done.\n",
"==> TYPE I ... done. ==> CWD (1) /genomes/genbank/viral ... done.\n",
"==> SIZE assembly_summary.txt ... 8211573\n",
"==> PASV ... done. ==> RETR assembly_summary.txt ... done.\n",
"Length: 8211573 (7.8M) (unauthoritative)\n",
"\n",
"assembly_summary.tx 100%[===================>] 7.83M 20.5MB/s in 0.4s \n",
"\n",
"2019-12-31 12:53:46 (20.5 MB/s) - ‘assembly_summary.txt’ saved [8211573]\n",
"\n"
]
}
],
"source": [
"!wget ftp://ftp.ncbi.nlm.nih.gov/genomes/genbank/viral/assembly_summary.txt"
]
},
{
"cell_type": "code",
"execution_count": 128,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": 129,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>assembly_accession</th>\n",
" <th>bioproject</th>\n",
" <th>biosample</th>\n",
" <th>wgs_master</th>\n",
" <th>refseq_category</th>\n",
" <th>taxid</th>\n",
" <th>species_taxid</th>\n",
" <th>organism_name</th>\n",
" <th>infraspecific_name</th>\n",
" <th>isolate</th>\n",
" <th>...</th>\n",
" <th>release_type</th>\n",
" <th>genome_rep</th>\n",
" <th>seq_rel_date</th>\n",
" <th>asm_name</th>\n",
" <th>submitter</th>\n",
" <th>gbrs_paired_asm</th>\n",
" <th>paired_asm_comp</th>\n",
" <th>ftp_path</th>\n",
" <th>excluded_from_refseq</th>\n",
" <th>relation_to_type_material</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>GCA_000839185.1</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>10243</td>\n",
" <td>10243</td>\n",
" <td>Cowpox virus</td>\n",
" <td>strain=Brighton Red</td>\n",
" <td>NaN</td>\n",
" <td>...</td>\n",
" <td>Major</td>\n",
" <td>Full</td>\n",
" <td>2002/04/16</td>\n",
" <td>ViralProj14174</td>\n",
" <td>NaN</td>\n",
" <td>GCF_000839185.1</td>\n",
" <td>identical</td>\n",
" <td>ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/000...</td>\n",
" <td>NaN</td>\n",
" <td>ICTV species exemplar</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>GCA_003971385.1</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>10243</td>\n",
" <td>10243</td>\n",
" <td>Cowpox virus</td>\n",
" <td>strain=CPXV CheHurley_DK_2012</td>\n",
" <td>NaN</td>\n",
" <td>...</td>\n",
" <td>Major</td>\n",
" <td>Full</td>\n",
" <td>2017/09/23</td>\n",
" <td>ASM397138v1</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>na</td>\n",
" <td>ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>GCA_003971405.1</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>10243</td>\n",
" <td>10243</td>\n",
" <td>Cowpox virus</td>\n",
" <td>strain=CPXV CheNuru_DK_2012</td>\n",
" <td>NaN</td>\n",
" <td>...</td>\n",
" <td>Major</td>\n",
" <td>Full</td>\n",
" <td>2017/09/23</td>\n",
" <td>ASM397140v1</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>na</td>\n",
" <td>ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>GCA_004025355.1</td>\n",
" <td>PRJNA369073</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>10243</td>\n",
" <td>10243</td>\n",
" <td>Cowpox virus</td>\n",
" <td>strain=CPXV/Boy Biederstein</td>\n",
" <td>NaN</td>\n",
" <td>...</td>\n",
" <td>Major</td>\n",
" <td>Full</td>\n",
" <td>2019/01/14</td>\n",
" <td>ASM402535v1</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>na</td>\n",
" <td>ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/004...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>GCA_004025395.1</td>\n",
" <td>PRJNA369073</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>10243</td>\n",
" <td>10243</td>\n",
" <td>Cowpox virus</td>\n",
" <td>strain=CPXV/Rat Marl</td>\n",
" <td>NaN</td>\n",
" <td>...</td>\n",
" <td>Major</td>\n",
" <td>Full</td>\n",
" <td>2019/01/14</td>\n",
" <td>ASM402539v1</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>na</td>\n",
" <td>ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/004...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>34661</th>\n",
" <td>GCA_009806855.1</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>2686460</td>\n",
" <td>2686460</td>\n",
" <td>Pelagibacter phage HTVC106P</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>...</td>\n",
" <td>Major</td>\n",
" <td>Full</td>\n",
" <td>2019/12/27</td>\n",
" <td>ASM980685v1</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>na</td>\n",
" <td>ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/009...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>34662</th>\n",
" <td>GCA_009806875.1</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>2686461</td>\n",
" <td>2686461</td>\n",
" <td>Pelagibacter phage HTVC111P</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>...</td>\n",
" <td>Major</td>\n",
" <td>Full</td>\n",
" <td>2019/12/27</td>\n",
" <td>ASM980687v1</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>na</td>\n",
" <td>ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/009...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>34663</th>\n",
" <td>GCA_009806895.1</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>2686462</td>\n",
" <td>2686462</td>\n",
" <td>Pelagibacter phage HTVC112P</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>...</td>\n",
" <td>Major</td>\n",
" <td>Full</td>\n",
" <td>2019/12/27</td>\n",
" <td>ASM980689v1</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>na</td>\n",
" <td>ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/009...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>34664</th>\n",
" <td>GCA_009806915.1</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>2686463</td>\n",
" <td>2686463</td>\n",
" <td>Pelagibacter phage HTVC115P</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>...</td>\n",
" <td>Major</td>\n",
" <td>Full</td>\n",
" <td>2019/12/27</td>\n",
" <td>ASM980691v1</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>na</td>\n",
" <td>ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/009...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>34665</th>\n",
" <td>GCA_009806935.1</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>2686464</td>\n",
" <td>2686464</td>\n",
" <td>Pelagibacter phage HTVC202P</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>...</td>\n",
" <td>Major</td>\n",
" <td>Full</td>\n",
" <td>2019/12/27</td>\n",
" <td>ASM980693v1</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>na</td>\n",
" <td>ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/009...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>34666 rows × 22 columns</p>\n",
"</div>"
],
"text/plain": [
" assembly_accession bioproject biosample wgs_master refseq_category \\\n",
"0 GCA_000839185.1 NaN NaN NaN na \n",
"1 GCA_003971385.1 NaN NaN NaN na \n",
"2 GCA_003971405.1 NaN NaN NaN na \n",
"3 GCA_004025355.1 PRJNA369073 NaN NaN na \n",
"4 GCA_004025395.1 PRJNA369073 NaN NaN na \n",
"... ... ... ... ... ... \n",
"34661 GCA_009806855.1 NaN NaN NaN na \n",
"34662 GCA_009806875.1 NaN NaN NaN na \n",
"34663 GCA_009806895.1 NaN NaN NaN na \n",
"34664 GCA_009806915.1 NaN NaN NaN na \n",
"34665 GCA_009806935.1 NaN NaN NaN na \n",
"\n",
" taxid species_taxid organism_name \\\n",
"0 10243 10243 Cowpox virus \n",
"1 10243 10243 Cowpox virus \n",
"2 10243 10243 Cowpox virus \n",
"3 10243 10243 Cowpox virus \n",
"4 10243 10243 Cowpox virus \n",
"... ... ... ... \n",
"34661 2686460 2686460 Pelagibacter phage HTVC106P \n",
"34662 2686461 2686461 Pelagibacter phage HTVC111P \n",
"34663 2686462 2686462 Pelagibacter phage HTVC112P \n",
"34664 2686463 2686463 Pelagibacter phage HTVC115P \n",
"34665 2686464 2686464 Pelagibacter phage HTVC202P \n",
"\n",
" infraspecific_name isolate ... release_type genome_rep \\\n",
"0 strain=Brighton Red NaN ... Major Full \n",
"1 strain=CPXV CheHurley_DK_2012 NaN ... Major Full \n",
"2 strain=CPXV CheNuru_DK_2012 NaN ... Major Full \n",
"3 strain=CPXV/Boy Biederstein NaN ... Major Full \n",
"4 strain=CPXV/Rat Marl NaN ... Major Full \n",
"... ... ... ... ... ... \n",
"34661 NaN NaN ... Major Full \n",
"34662 NaN NaN ... Major Full \n",
"34663 NaN NaN ... Major Full \n",
"34664 NaN NaN ... Major Full \n",
"34665 NaN NaN ... Major Full \n",
"\n",
" seq_rel_date asm_name submitter gbrs_paired_asm paired_asm_comp \\\n",
"0 2002/04/16 ViralProj14174 NaN GCF_000839185.1 identical \n",
"1 2017/09/23 ASM397138v1 NaN na na \n",
"2 2017/09/23 ASM397140v1 NaN na na \n",
"3 2019/01/14 ASM402535v1 NaN na na \n",
"4 2019/01/14 ASM402539v1 NaN na na \n",
"... ... ... ... ... ... \n",
"34661 2019/12/27 ASM980685v1 NaN na na \n",
"34662 2019/12/27 ASM980687v1 NaN na na \n",
"34663 2019/12/27 ASM980689v1 NaN na na \n",
"34664 2019/12/27 ASM980691v1 NaN na na \n",
"34665 2019/12/27 ASM980693v1 NaN na na \n",
"\n",
" ftp_path excluded_from_refseq \\\n",
"0 ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/000... NaN \n",
"1 ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003... NaN \n",
"2 ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003... NaN \n",
"3 ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/004... NaN \n",
"4 ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/004... NaN \n",
"... ... ... \n",
"34661 ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/009... NaN \n",
"34662 ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/009... NaN \n",
"34663 ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/009... NaN \n",
"34664 ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/009... NaN \n",
"34665 ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/009... NaN \n",
"\n",
" relation_to_type_material \n",
"0 ICTV species exemplar \n",
"1 NaN \n",
"2 NaN \n",
"3 NaN \n",
"4 NaN \n",
"... ... \n",
"34661 NaN \n",
"34662 NaN \n",
"34663 NaN \n",
"34664 NaN \n",
"34665 NaN \n",
"\n",
"[34666 rows x 22 columns]"
]
},
"execution_count": 129,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"with open('assembly_summary.txt') as fh:\n",
" for l in fh:\n",
" if l.startswith('# assembly_accession'):\n",
" cols = [x.replace('#', '').strip() for x in l.split('\\t')]\n",
" break\n",
" df = pd.read_table(fh, names=cols, header=None, low_memory=False)\n",
"df"
]
},
{
"cell_type": "code",
"execution_count": 130,
"metadata": {},
"outputs": [],
"source": [
"df_BTV = df[df.organism_name.str.match(r'Bluetongue.*')]"
]
},
{
"cell_type": "code",
"execution_count": 131,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>assembly_accession</th>\n",
" <th>bioproject</th>\n",
" <th>biosample</th>\n",
" <th>wgs_master</th>\n",
" <th>refseq_category</th>\n",
" <th>taxid</th>\n",
" <th>species_taxid</th>\n",
" <th>organism_name</th>\n",
" <th>infraspecific_name</th>\n",
" <th>isolate</th>\n",
" <th>...</th>\n",
" <th>release_type</th>\n",
" <th>genome_rep</th>\n",
" <th>seq_rel_date</th>\n",
" <th>asm_name</th>\n",
" <th>submitter</th>\n",
" <th>gbrs_paired_asm</th>\n",
" <th>paired_asm_comp</th>\n",
" <th>ftp_path</th>\n",
" <th>excluded_from_refseq</th>\n",
" <th>relation_to_type_material</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>5845</th>\n",
" <td>GCA_000854445.2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>40051</td>\n",
" <td>40051</td>\n",
" <td>Bluetongue virus</td>\n",
" <td>strain=serotype 10</td>\n",
" <td>NaN</td>\n",
" <td>...</td>\n",
" <td>Major</td>\n",
" <td>Full</td>\n",
" <td>1989/01/12</td>\n",
" <td>ViralMultiSegProj14938</td>\n",
" <td>NaN</td>\n",
" <td>GCF_000854445.3</td>\n",
" <td>identical</td>\n",
" <td>ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/000...</td>\n",
" <td>NaN</td>\n",
" <td>ICTV species exemplar</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5846</th>\n",
" <td>GCA_003077535.1</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>40051</td>\n",
" <td>40051</td>\n",
" <td>Bluetongue virus</td>\n",
" <td>strain=185</td>\n",
" <td>NaN</td>\n",
" <td>...</td>\n",
" <td>Major</td>\n",
" <td>Full</td>\n",
" <td>2014/09/15</td>\n",
" <td>ASM307753v1</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>na</td>\n",
" <td>ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5847</th>\n",
" <td>GCA_003077575.1</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>35328</td>\n",
" <td>40051</td>\n",
" <td>Bluetongue virus 2</td>\n",
" <td>strain=BTV-2IT(L)</td>\n",
" <td>NaN</td>\n",
" <td>...</td>\n",
" <td>Major</td>\n",
" <td>Full</td>\n",
" <td>2011/09/14</td>\n",
" <td>ASM307757v1</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>na</td>\n",
" <td>ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5848</th>\n",
" <td>GCA_003077615.1</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>35327</td>\n",
" <td>40051</td>\n",
" <td>Bluetongue virus 1</td>\n",
" <td>NaN</td>\n",
" <td>BTV01IND2010-KRM07</td>\n",
" <td>...</td>\n",
" <td>Major</td>\n",
" <td>Full</td>\n",
" <td>2016/11/30</td>\n",
" <td>ASM307761v1</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>na</td>\n",
" <td>ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5849</th>\n",
" <td>GCA_003077635.1</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>35327</td>\n",
" <td>40051</td>\n",
" <td>Bluetongue virus 1</td>\n",
" <td>NaN</td>\n",
" <td>BTV01IND2010-VC12</td>\n",
" <td>...</td>\n",
" <td>Major</td>\n",
" <td>Full</td>\n",
" <td>2016/11/30</td>\n",
" <td>ASM307763v1</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>na</td>\n",
" <td>ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6011</th>\n",
" <td>GCA_003081415.1</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>45032</td>\n",
" <td>40051</td>\n",
" <td>Bluetongue virus 9</td>\n",
" <td>NaN</td>\n",
" <td>BTV-9/IND2004/04</td>\n",
" <td>...</td>\n",
" <td>Major</td>\n",
" <td>Full</td>\n",
" <td>2015/07/13</td>\n",
" <td>ASM308141v1</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>na</td>\n",
" <td>ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6012</th>\n",
" <td>GCA_003081435.1</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>45032</td>\n",
" <td>40051</td>\n",
" <td>Bluetongue virus 9</td>\n",
" <td>NaN</td>\n",
" <td>BTV-9/IND2005/02</td>\n",
" <td>...</td>\n",
" <td>Major</td>\n",
" <td>Full</td>\n",
" <td>2015/07/13</td>\n",
" <td>ASM308143v1</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>na</td>\n",
" <td>ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6013</th>\n",
" <td>GCA_003081455.1</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>45032</td>\n",
" <td>40051</td>\n",
" <td>Bluetongue virus 9</td>\n",
" <td>NaN</td>\n",
" <td>BTV-9/IND2005/03</td>\n",
" <td>...</td>\n",
" <td>Major</td>\n",
" <td>Full</td>\n",
" <td>2015/07/13</td>\n",
" <td>ASM308145v1</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>na</td>\n",
" <td>ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6014</th>\n",
" <td>GCA_003081475.1</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>40051</td>\n",
" <td>40051</td>\n",
" <td>Bluetongue virus</td>\n",
" <td>strain=BTVX ITL2015 34200</td>\n",
" <td>BTV-X ITL2015</td>\n",
" <td>...</td>\n",
" <td>Major</td>\n",
" <td>Full</td>\n",
" <td>2016/11/15</td>\n",
" <td>ASM308147v1</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>na</td>\n",
" <td>ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6015</th>\n",
" <td>GCA_003173835.1</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>40051</td>\n",
" <td>40051</td>\n",
" <td>Bluetongue virus</td>\n",
" <td>NaN</td>\n",
" <td>379</td>\n",
" <td>...</td>\n",
" <td>Major</td>\n",
" <td>Full</td>\n",
" <td>2015/01/13</td>\n",
" <td>ASM317383v1</td>\n",
" <td>NaN</td>\n",
" <td>na</td>\n",
" <td>na</td>\n",
" <td>ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>171 rows × 22 columns</p>\n",
"</div>"
],
"text/plain": [
" assembly_accession bioproject biosample wgs_master refseq_category \\\n",
"5845 GCA_000854445.2 NaN NaN NaN na \n",
"5846 GCA_003077535.1 NaN NaN NaN na \n",
"5847 GCA_003077575.1 NaN NaN NaN na \n",
"5848 GCA_003077615.1 NaN NaN NaN na \n",
"5849 GCA_003077635.1 NaN NaN NaN na \n",
"... ... ... ... ... ... \n",
"6011 GCA_003081415.1 NaN NaN NaN na \n",
"6012 GCA_003081435.1 NaN NaN NaN na \n",
"6013 GCA_003081455.1 NaN NaN NaN na \n",
"6014 GCA_003081475.1 NaN NaN NaN na \n",
"6015 GCA_003173835.1 NaN NaN NaN na \n",
"\n",
" taxid species_taxid organism_name infraspecific_name \\\n",
"5845 40051 40051 Bluetongue virus strain=serotype 10 \n",
"5846 40051 40051 Bluetongue virus strain=185 \n",
"5847 35328 40051 Bluetongue virus 2 strain=BTV-2IT(L) \n",
"5848 35327 40051 Bluetongue virus 1 NaN \n",
"5849 35327 40051 Bluetongue virus 1 NaN \n",
"... ... ... ... ... \n",
"6011 45032 40051 Bluetongue virus 9 NaN \n",
"6012 45032 40051 Bluetongue virus 9 NaN \n",
"6013 45032 40051 Bluetongue virus 9 NaN \n",
"6014 40051 40051 Bluetongue virus strain=BTVX ITL2015 34200 \n",
"6015 40051 40051 Bluetongue virus NaN \n",
"\n",
" isolate ... release_type genome_rep seq_rel_date \\\n",
"5845 NaN ... Major Full 1989/01/12 \n",
"5846 NaN ... Major Full 2014/09/15 \n",
"5847 NaN ... Major Full 2011/09/14 \n",
"5848 BTV01IND2010-KRM07 ... Major Full 2016/11/30 \n",
"5849 BTV01IND2010-VC12 ... Major Full 2016/11/30 \n",
"... ... ... ... ... ... \n",
"6011 BTV-9/IND2004/04 ... Major Full 2015/07/13 \n",
"6012 BTV-9/IND2005/02 ... Major Full 2015/07/13 \n",
"6013 BTV-9/IND2005/03 ... Major Full 2015/07/13 \n",
"6014 BTV-X ITL2015 ... Major Full 2016/11/15 \n",
"6015 379 ... Major Full 2015/01/13 \n",
"\n",
" asm_name submitter gbrs_paired_asm paired_asm_comp \\\n",
"5845 ViralMultiSegProj14938 NaN GCF_000854445.3 identical \n",
"5846 ASM307753v1 NaN na na \n",
"5847 ASM307757v1 NaN na na \n",
"5848 ASM307761v1 NaN na na \n",
"5849 ASM307763v1 NaN na na \n",
"... ... ... ... ... \n",
"6011 ASM308141v1 NaN na na \n",
"6012 ASM308143v1 NaN na na \n",
"6013 ASM308145v1 NaN na na \n",
"6014 ASM308147v1 NaN na na \n",
"6015 ASM317383v1 NaN na na \n",
"\n",
" ftp_path excluded_from_refseq \\\n",
"5845 ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/000... NaN \n",
"5846 ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003... NaN \n",
"5847 ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003... NaN \n",
"5848 ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003... NaN \n",
"5849 ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003... NaN \n",
"... ... ... \n",
"6011 ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003... NaN \n",
"6012 ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003... NaN \n",
"6013 ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003... NaN \n",
"6014 ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003... NaN \n",
"6015 ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003... NaN \n",
"\n",
" relation_to_type_material \n",
"5845 ICTV species exemplar \n",
"5846 NaN \n",
"5847 NaN \n",
"5848 NaN \n",
"5849 NaN \n",
"... ... \n",
"6011 NaN \n",
"6012 NaN \n",
"6013 NaN \n",
"6014 NaN \n",
"6015 NaN \n",
"\n",
"[171 rows x 22 columns]"
]
},
"execution_count": 131,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_BTV"
]
},
{
"cell_type": "code",
"execution_count": 111,
"metadata": {},
"outputs": [],
"source": [
"btv_ftp_path = df_BTV.ftp_path.values[0]"
]
},
{
"cell_type": "code",
"execution_count": 112,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/000/854/445/GCA_000854445.2_ViralMultiSegProj14938'"
]
},
"execution_count": 112,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"btv_ftp_path"
]
},
{
"cell_type": "code",
"execution_count": 114,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ftp.ncbi.nlm.nih.gov\n",
"genomes/all/GCA/000/854/445/GCA_000854445.2_ViralMultiSegProj14938\n"
]
}
],
"source": [
"ncbi_ftp_site, btv_asm_ftp_path = btv_ftp_path.replace('ftp://', '').split('/', maxsplit=1)\n",
"print(ncbi_ftp_site)\n",
"print(btv_asm_ftp_path)"
]
},
{
"cell_type": "code",
"execution_count": 115,
"metadata": {},
"outputs": [],
"source": [
"from ftplib import FTP"
]
},
{
"cell_type": "code",
"execution_count": 124,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'230 Anonymous access granted, restrictions apply'"
]
},
"execution_count": 124,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ftp = FTP(ncbi_ftp_site)\n",
"ftp.login()"
]
},
{
"cell_type": "code",
"execution_count": 125,
"metadata": {},
"outputs": [],
"source": [
"import re"
]
},
{
"cell_type": "code",
"execution_count": 126,
"metadata": {},
"outputs": [],
"source": [
"regex_gbff_gz = re.compile(r'^.*_genomic\\.gbff.gz$')"
]
},
{
"cell_type": "code",
"execution_count": 127,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
".\n",
"..\n",
"README.txt\n",
"GCA_000854445.2_ViralMultiSegProj14938_assembly_report.txt\n",
"GCA_000854445.2_ViralMultiSegProj14938_assembly_stats.txt\n",
"GCA_000854445.2_ViralMultiSegProj14938_cds_from_genomic.fna.gz\n",
"GCA_000854445.2_ViralMultiSegProj14938_feature_count.txt.gz\n",
"GCA_000854445.2_ViralMultiSegProj14938_feature_table.txt.gz\n",
"GCA_000854445.2_ViralMultiSegProj14938_genomic.fna.gz\n",
"================================================================================\n",
"GCA_000854445.2_ViralMultiSegProj14938_genomic.gbff.gz\n",
"{'modify': '20191212200845', 'perm': 'adfr', 'size': '17685', 'type': 'file', 'unique': '42U5B4B3A6', 'unix.group': '562', 'unix.mode': '0444', 'unix.owner': '14'}\n",
"================================================================================\n",
"GCA_000854445.2_ViralMultiSegProj14938_genomic.gff.gz\n",
"GCA_000854445.2_ViralMultiSegProj14938_protein.faa.gz\n",
"GCA_000854445.2_ViralMultiSegProj14938_protein.gpff.gz\n",
"GCA_000854445.2_ViralMultiSegProj14938_translated_cds.faa.gz\n",
"annotation_hashes.txt\n",
"md5checksums.txt\n",
"assembly_status.txt\n",
"GCA_000854445.2_ViralMultiSegProj14938_genomic.gtf.gz\n"
]
}
],
"source": [
"for fname, facts in ftp.mlsd(btv_asm_ftp_path):\n",
" if facts['type'] == 'file' and regex_gbff_gz.match(fname):\n",
" print('='*80)\n",
" print(fname)\n",
" print(facts)\n",
" print('='*80)\n",
" else:\n",
" print(fname)"
]
},
{
"cell_type": "code",
"execution_count": 93,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"GCA_003077535.1_ASM307753v1\n",
"GCA_003077535.1_ASM307753v1_genomic.gbff.gz {'modify': '20191217030120', 'size': '15681', 'type': 'file'}\n",
"\n",
"GCA_000854445.2_ViralMultiSegProj14938\n",
"GCA_000854445.2_ViralMultiSegProj14938_genomic.gbff.gz {'modify': '20191212200845', 'size': '17685', 'type': 'file'}\n",
"\n",
"GCA_003077575.1_ASM307757v1\n",
"GCA_003077575.1_ASM307757v1_genomic.gbff.gz {'modify': '20180604202749', 'size': '15459', 'type': 'file'}\n",
"\n",
"GCA_003077615.1_ASM307761v1\n",
"GCA_003077615.1_ASM307761v1_genomic.gbff.gz {'modify': '20180604202750', 'size': '15460', 'type': 'file'}\n",
"\n",
"GCA_003077635.1_ASM307763v1\n",
"GCA_003077635.1_ASM307763v1_genomic.gbff.gz {'modify': '20180604202808', 'size': '15444', 'type': 'file'}\n",
"\n",
"GCA_003077655.1_ASM307765v1\n",
"GCA_003077655.1_ASM307765v1_genomic.gbff.gz {'modify': '20180604202751', 'size': '15450', 'type': 'file'}\n",
"\n",
"GCA_003077675.1_ASM307767v1\n",
"GCA_003077675.1_ASM307767v1_genomic.gbff.gz {'modify': '20180604202749', 'size': '15505', 'type': 'file'}\n",
"\n",
"GCA_003077695.1_ASM307769v1\n",
"GCA_003077695.1_ASM307769v1_genomic.gbff.gz {'modify': '20180604202724', 'size': '15504', 'type': 'file'}\n",
"\n",
"GCA_003077715.1_ASM307771v1\n",
"GCA_003077715.1_ASM307771v1_genomic.gbff.gz {'modify': '20180604202800', 'size': '15496', 'type': 'file'}\n",
"\n",
"GCA_003077755.1_ASM307775v1\n",
"GCA_003077755.1_ASM307775v1_genomic.gbff.gz {'modify': '20180604202858', 'size': '15489', 'type': 'file'}\n",
"\n",
"GCA_003077775.1_ASM307777v1\n",
"GCA_003077775.1_ASM307777v1_genomic.gbff.gz {'modify': '20180604203025', 'size': '15422', 'type': 'file'}\n",
"\n",
"GCA_003077805.1_ASM307780v1\n",
"GCA_003077805.1_ASM307780v1_genomic.gbff.gz {'modify': '20180604203017', 'size': '15394', 'type': 'file'}\n",
"\n",
"GCA_003077835.1_ASM307783v1\n",
"GCA_003077835.1_ASM307783v1_genomic.gbff.gz {'modify': '20180604203011', 'size': '15439', 'type': 'file'}\n",
"\n",
"GCA_003077875.1_ASM307787v1\n",
"GCA_003077875.1_ASM307787v1_genomic.gbff.gz {'modify': '20180604202957', 'size': '15186', 'type': 'file'}\n",
"\n",
"GCA_003077895.1_ASM307789v1\n",
"GCA_003077895.1_ASM307789v1_genomic.gbff.gz {'modify': '20180604202959', 'size': '15371', 'type': 'file'}\n",
"\n",
"GCA_003077935.1_ASM307793v1\n",
"GCA_003077935.1_ASM307793v1_genomic.gbff.gz {'modify': '20180604203022', 'size': '15079', 'type': 'file'}\n",
"\n",
"GCA_003077955.1_ASM307795v1\n",
"GCA_003077955.1_ASM307795v1_genomic.gbff.gz {'modify': '20180604203017', 'size': '15484', 'type': 'file'}\n",
"\n",
"GCA_003077975.1_ASM307797v1\n",
"GCA_003077975.1_ASM307797v1_genomic.gbff.gz {'modify': '20180604203010', 'size': '15471', 'type': 'file'}\n",
"\n",
"GCA_003077995.1_ASM307799v1\n",
"GCA_003077995.1_ASM307799v1_genomic.gbff.gz {'modify': '20180604203038', 'size': '15497', 'type': 'file'}\n",
"\n",
"GCA_003078035.1_ASM307803v1\n",
"GCA_003078035.1_ASM307803v1_genomic.gbff.gz {'modify': '20180604203017', 'size': '15489', 'type': 'file'}\n",
"\n",
"GCA_003078055.1_ASM307805v1\n",
"GCA_003078055.1_ASM307805v1_genomic.gbff.gz {'modify': '20180604203006', 'size': '15495', 'type': 'file'}\n",
"\n",
"GCA_003078075.1_ASM307807v1\n",
"GCA_003078075.1_ASM307807v1_genomic.gbff.gz {'modify': '20180604203005', 'size': '15493', 'type': 'file'}\n",
"\n",
"GCA_003078115.1_ASM307811v1\n",
"GCA_003078115.1_ASM307811v1_genomic.gbff.gz {'modify': '20180604203030', 'size': '15488', 'type': 'file'}\n",
"\n",
"GCA_003078155.1_ASM307815v1\n",
"GCA_003078155.1_ASM307815v1_genomic.gbff.gz {'modify': '20180604203014', 'size': '15499', 'type': 'file'}\n",
"\n",
"GCA_003078175.1_ASM307817v1\n",
"GCA_003078175.1_ASM307817v1_genomic.gbff.gz {'modify': '20180604202952', 'size': '15476', 'type': 'file'}\n",
"\n",
"GCA_003078215.1_ASM307821v1\n",
"GCA_003078215.1_ASM307821v1_genomic.gbff.gz {'modify': '20180604203005', 'size': '15500', 'type': 'file'}\n",
"\n",
"GCA_003078235.1_ASM307823v1\n",
"GCA_003078235.1_ASM307823v1_genomic.gbff.gz {'modify': '20180604203010', 'size': '15498', 'type': 'file'}\n",
"\n",
"GCA_003078275.1_ASM307827v1\n",
"GCA_003078275.1_ASM307827v1_genomic.gbff.gz {'modify': '20180604203028', 'size': '15485', 'type': 'file'}\n",
"\n",
"GCA_003078295.1_ASM307829v1\n",
"GCA_003078295.1_ASM307829v1_genomic.gbff.gz {'modify': '20180604203025', 'size': '15491', 'type': 'file'}\n",
"\n",
"GCA_003078355.1_ASM307835v1\n",
"GCA_003078355.1_ASM307835v1_genomic.gbff.gz {'modify': '20180604203041', 'size': '15482', 'type': 'file'}\n",
"\n",
"GCA_003078375.1_ASM307837v1\n",
"GCA_003078375.1_ASM307837v1_genomic.gbff.gz {'modify': '20180604203116', 'size': '15484', 'type': 'file'}\n",
"\n",
"GCA_003078415.1_ASM307841v1\n",
"GCA_003078415.1_ASM307841v1_genomic.gbff.gz {'modify': '20180604203048', 'size': '15477', 'type': 'file'}\n",
"\n",
"GCA_003078435.1_ASM307843v1\n",
"GCA_003078435.1_ASM307843v1_genomic.gbff.gz {'modify': '20180604203021', 'size': '15471', 'type': 'file'}\n",
"\n",
"GCA_003078475.1_ASM307847v1\n",
"GCA_003078475.1_ASM307847v1_genomic.gbff.gz {'modify': '20180604203041', 'size': '15489', 'type': 'file'}\n",
"\n",
"GCA_003078495.1_ASM307849v1\n",
"GCA_003078495.1_ASM307849v1_genomic.gbff.gz {'modify': '20180604203038', 'size': '16139', 'type': 'file'}\n",
"\n",
"GCA_003078515.1_ASM307851v1\n",
"GCA_003078515.1_ASM307851v1_genomic.gbff.gz {'modify': '20180604203022', 'size': '15647', 'type': 'file'}\n",
"\n",
"GCA_003078555.1_ASM307855v1\n",
"GCA_003078555.1_ASM307855v1_genomic.gbff.gz {'modify': '20180604203029', 'size': '16133', 'type': 'file'}\n",
"\n",
"GCA_003078575.1_ASM307857v1\n",
"GCA_003078575.1_ASM307857v1_genomic.gbff.gz {'modify': '20180604203037', 'size': '16197', 'type': 'file'}\n",
"\n",
"GCA_003078615.1_ASM307861v1\n",
"GCA_003078615.1_ASM307861v1_genomic.gbff.gz {'modify': '20180604203048', 'size': '16239', 'type': 'file'}\n",
"\n",
"GCA_003078655.1_ASM307865v1\n",
"GCA_003078655.1_ASM307865v1_genomic.gbff.gz {'modify': '20180604203105', 'size': '16190', 'type': 'file'}\n",
"\n",
"GCA_003078675.1_ASM307867v1\n",
"GCA_003078675.1_ASM307867v1_genomic.gbff.gz {'modify': '20191216122519', 'size': '16107', 'type': 'file'}\n",
"\n",
"GCA_003078715.1_ASM307871v1\n",
"GCA_003078715.1_ASM307871v1_genomic.gbff.gz {'modify': '20180604203042', 'size': '16057', 'type': 'file'}\n",
"\n",
"GCA_003078735.1_ASM307873v1\n",
"GCA_003078735.1_ASM307873v1_genomic.gbff.gz {'modify': '20180604203113', 'size': '15514', 'type': 'file'}\n",
"\n",
"GCA_003078775.1_ASM307877v1\n",
"GCA_003078775.1_ASM307877v1_genomic.gbff.gz {'modify': '20191216113914', 'size': '16470', 'type': 'file'}\n",
"\n",
"GCA_003078815.1_ASM307881v1\n",
"GCA_003078815.1_ASM307881v1_genomic.gbff.gz {'modify': '20180604203123', 'size': '15969', 'type': 'file'}\n",
"\n",
"GCA_003078835.1_ASM307883v1\n",
"GCA_003078835.1_ASM307883v1_genomic.gbff.gz {'modify': '20191213115530', 'size': '16312', 'type': 'file'}\n",
"\n",
"GCA_003078855.1_ASM307885v1\n",
"GCA_003078855.1_ASM307885v1_genomic.gbff.gz {'modify': '20180604203125', 'size': '15427', 'type': 'file'}\n",
"\n",
"GCA_003078875.1_ASM307887v1\n",
"GCA_003078875.1_ASM307887v1_genomic.gbff.gz {'modify': '20180604203122', 'size': '15702', 'type': 'file'}\n",
"\n",
"GCA_003078895.1_ASM307889v1\n",
"GCA_003078895.1_ASM307889v1_genomic.gbff.gz {'modify': '20180604203101', 'size': '15472', 'type': 'file'}\n",
"\n",
"GCA_003078915.1_ASM307891v1\n",
"GCA_003078915.1_ASM307891v1_genomic.gbff.gz {'modify': '20180604203125', 'size': '15473', 'type': 'file'}\n",
"\n",
"GCA_003078955.1_ASM307895v1\n",
"GCA_003078955.1_ASM307895v1_genomic.gbff.gz {'modify': '20191216122540', 'size': '16130', 'type': 'file'}\n",
"\n",
"GCA_003078995.1_ASM307899v1\n",
"GCA_003078995.1_ASM307899v1_genomic.gbff.gz {'modify': '20191213092333', 'size': '16332', 'type': 'file'}\n",
"\n",
"GCA_003079015.1_ASM307901v1\n",
"GCA_003079015.1_ASM307901v1_genomic.gbff.gz {'modify': '20191216143055', 'size': '16154', 'type': 'file'}\n",
"\n",
"GCA_003079055.1_ASM307905v1\n",
"GCA_003079055.1_ASM307905v1_genomic.gbff.gz {'modify': '20191216113959', 'size': '16092', 'type': 'file'}\n",
"\n",
"GCA_003079075.1_ASM307907v1\n",
"GCA_003079075.1_ASM307907v1_genomic.gbff.gz {'modify': '20180604203227', 'size': '15629', 'type': 'file'}\n",
"\n",
"GCA_003079115.1_ASM307911v1\n",
"GCA_003079115.1_ASM307911v1_genomic.gbff.gz {'modify': '20180604203223', 'size': '15685', 'type': 'file'}\n",
"\n",
"GCA_003079155.1_ASM307915v1\n",
"GCA_003079155.1_ASM307915v1_genomic.gbff.gz {'modify': '20180604203159', 'size': '15667', 'type': 'file'}\n",
"\n",
"GCA_003079175.1_ASM307917v1\n",
"GCA_003079175.1_ASM307917v1_genomic.gbff.gz {'modify': '20180604203152', 'size': '15424', 'type': 'file'}\n",
"\n",
"GCA_003079235.1_ASM307923v1\n",
"GCA_003079235.1_ASM307923v1_genomic.gbff.gz {'modify': '20180604203234', 'size': '15611', 'type': 'file'}\n",
"\n",
"GCA_003079255.1_ASM307925v1\n",
"GCA_003079255.1_ASM307925v1_genomic.gbff.gz {'modify': '20180604203220', 'size': '15667', 'type': 'file'}\n",
"\n",
"GCA_003079275.1_ASM307927v1\n",
"GCA_003079275.1_ASM307927v1_genomic.gbff.gz {'modify': '20180604203155', 'size': '15012', 'type': 'file'}\n",
"\n",
"GCA_003079295.1_ASM307929v1\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"GCA_003079295.1_ASM307929v1_genomic.gbff.gz {'modify': '20191216113933', 'size': '15542', 'type': 'file'}\n",
"\n",
"GCA_003079315.1_ASM307931v1\n",
"GCA_003079315.1_ASM307931v1_genomic.gbff.gz {'modify': '20191216143054', 'size': '16163', 'type': 'file'}\n",
"\n",
"GCA_003079335.1_ASM307933v1\n",
"GCA_003079335.1_ASM307933v1_genomic.gbff.gz {'modify': '20191216113930', 'size': '16310', 'type': 'file'}\n",
"\n",
"GCA_003079355.1_ASM307935v1\n",
"GCA_003079355.1_ASM307935v1_genomic.gbff.gz {'modify': '20180604203236', 'size': '15737', 'type': 'file'}\n",
"\n",
"GCA_003079375.1_ASM307937v1\n",
"GCA_003079375.1_ASM307937v1_genomic.gbff.gz {'modify': '20191216143109', 'size': '16103', 'type': 'file'}\n",
"\n",
"GCA_003079415.1_ASM307941v1\n",
"GCA_003079415.1_ASM307941v1_genomic.gbff.gz {'modify': '20180604203245', 'size': '15053', 'type': 'file'}\n",
"\n",
"GCA_003079435.1_ASM307943v1\n",
"GCA_003079435.1_ASM307943v1_genomic.gbff.gz {'modify': '20191216122523', 'size': '16179', 'type': 'file'}\n",
"\n",
"GCA_003079455.1_ASM307945v1\n",
"GCA_003079455.1_ASM307945v1_genomic.gbff.gz {'modify': '20191216122540', 'size': '15687', 'type': 'file'}\n",
"\n",
"GCA_003079475.1_ASM307947v1\n",
"GCA_003079475.1_ASM307947v1_genomic.gbff.gz {'modify': '20180604203241', 'size': '15486', 'type': 'file'}\n",
"\n",
"GCA_003079495.1_ASM307949v1\n",
"GCA_003079495.1_ASM307949v1_genomic.gbff.gz {'modify': '20180604203241', 'size': '15461', 'type': 'file'}\n",
"\n",
"GCA_003079515.1_ASM307951v1\n",
"GCA_003079515.1_ASM307951v1_genomic.gbff.gz {'modify': '20180604203243', 'size': '15436', 'type': 'file'}\n",
"\n",
"GCA_003079535.1_ASM307953v1\n",
"GCA_003079535.1_ASM307953v1_genomic.gbff.gz {'modify': '20180604203236', 'size': '15432', 'type': 'file'}\n",
"\n",
"GCA_003079555.1_ASM307955v1\n",
"GCA_003079555.1_ASM307955v1_genomic.gbff.gz {'modify': '20180604203237', 'size': '15469', 'type': 'file'}\n",
"\n",
"GCA_003079575.1_ASM307957v1\n",
"GCA_003079575.1_ASM307957v1_genomic.gbff.gz {'modify': '20180604203233', 'size': '15425', 'type': 'file'}\n",
"\n",
"GCA_003079595.1_ASM307959v1\n",
"GCA_003079595.1_ASM307959v1_genomic.gbff.gz {'modify': '20180604203237', 'size': '15455', 'type': 'file'}\n",
"\n",
"GCA_003079615.1_ASM307961v1\n",
"GCA_003079615.1_ASM307961v1_genomic.gbff.gz {'modify': '20180604203244', 'size': '15437', 'type': 'file'}\n",
"\n",
"GCA_003079635.1_ASM307963v1\n",
"GCA_003079635.1_ASM307963v1_genomic.gbff.gz {'modify': '20180604203238', 'size': '15754', 'type': 'file'}\n",
"\n",
"GCA_003079655.1_ASM307965v1\n",
"GCA_003079655.1_ASM307965v1_genomic.gbff.gz {'modify': '20180604203244', 'size': '15583', 'type': 'file'}\n",
"\n",
"GCA_003079675.1_ASM307967v1\n",
"GCA_003079675.1_ASM307967v1_genomic.gbff.gz {'modify': '20180604203222', 'size': '15177', 'type': 'file'}\n",
"\n",
"GCA_003079695.1_ASM307969v1\n",
"GCA_003079695.1_ASM307969v1_genomic.gbff.gz {'modify': '20180604203245', 'size': '15653', 'type': 'file'}\n",
"\n",
"GCA_003079715.1_ASM307971v1\n",
"GCA_003079715.1_ASM307971v1_genomic.gbff.gz {'modify': '20180604203240', 'size': '15619', 'type': 'file'}\n",
"\n",
"GCA_003079735.1_ASM307973v1\n",
"GCA_003079735.1_ASM307973v1_genomic.gbff.gz {'modify': '20180604203335', 'size': '15439', 'type': 'file'}\n",
"\n",
"GCA_003079755.1_ASM307975v1\n",
"GCA_003079755.1_ASM307975v1_genomic.gbff.gz {'modify': '20180604203329', 'size': '16035', 'type': 'file'}\n",
"\n",
"GCA_003079775.1_ASM307977v1\n",
"GCA_003079775.1_ASM307977v1_genomic.gbff.gz {'modify': '20180604203322', 'size': '15401', 'type': 'file'}\n",
"\n",
"GCA_003079795.1_ASM307979v1\n",
"GCA_003079795.1_ASM307979v1_genomic.gbff.gz {'modify': '20180604203322', 'size': '15418', 'type': 'file'}\n",
"\n",
"GCA_003079815.1_ASM307981v1\n",
"GCA_003079815.1_ASM307981v1_genomic.gbff.gz {'modify': '20180604203313', 'size': '15342', 'type': 'file'}\n",
"\n",
"GCA_003079835.1_ASM307983v1\n",
"GCA_003079835.1_ASM307983v1_genomic.gbff.gz {'modify': '20180604203322', 'size': '15610', 'type': 'file'}\n",
"\n",
"GCA_003079855.1_ASM307985v1\n",
"GCA_003079855.1_ASM307985v1_genomic.gbff.gz {'modify': '20180604203324', 'size': '15383', 'type': 'file'}\n",
"\n",
"GCA_003079875.1_ASM307987v1\n",
"GCA_003079875.1_ASM307987v1_genomic.gbff.gz {'modify': '20180604203307', 'size': '15427', 'type': 'file'}\n",
"\n",
"GCA_003079895.1_ASM307989v1\n",
"GCA_003079895.1_ASM307989v1_genomic.gbff.gz {'modify': '20191216143055', 'size': '15252', 'type': 'file'}\n",
"\n",
"GCA_003079915.1_ASM307991v1\n",
"GCA_003079915.1_ASM307991v1_genomic.gbff.gz {'modify': '20180604203316', 'size': '15341', 'type': 'file'}\n",
"\n",
"GCA_003079935.1_ASM307993v1\n",
"GCA_003079935.1_ASM307993v1_genomic.gbff.gz {'modify': '20180604203325', 'size': '15367', 'type': 'file'}\n",
"\n",
"GCA_003079955.1_ASM307995v1\n",
"GCA_003079955.1_ASM307995v1_genomic.gbff.gz {'modify': '20180604203332', 'size': '15434', 'type': 'file'}\n",
"\n",
"GCA_003079975.1_ASM307997v1\n",
"GCA_003079975.1_ASM307997v1_genomic.gbff.gz {'modify': '20180604203332', 'size': '15330', 'type': 'file'}\n",
"\n",
"GCA_003079995.1_ASM307999v1\n",
"GCA_003079995.1_ASM307999v1_genomic.gbff.gz {'modify': '20180604203411', 'size': '15374', 'type': 'file'}\n",
"\n",
"GCA_003080015.1_ASM308001v1\n",
"GCA_003080015.1_ASM308001v1_genomic.gbff.gz {'modify': '20180604203431', 'size': '15404', 'type': 'file'}\n",
"\n",
"GCA_003080035.1_ASM308003v1\n",
"GCA_003080035.1_ASM308003v1_genomic.gbff.gz {'modify': '20180604203421', 'size': '15369', 'type': 'file'}\n",
"\n",
"GCA_003080055.1_ASM308005v1\n",
"GCA_003080055.1_ASM308005v1_genomic.gbff.gz {'modify': '20180604203430', 'size': '16084', 'type': 'file'}\n",
"\n",
"GCA_003080075.1_ASM308007v1\n",
"GCA_003080075.1_ASM308007v1_genomic.gbff.gz {'modify': '20180604203435', 'size': '15977', 'type': 'file'}\n",
"\n",
"GCA_003080095.1_ASM308009v1\n",
"GCA_003080095.1_ASM308009v1_genomic.gbff.gz {'modify': '20180604203420', 'size': '15552', 'type': 'file'}\n",
"\n",
"GCA_003080115.1_ASM308011v1\n",
"GCA_003080115.1_ASM308011v1_genomic.gbff.gz {'modify': '20191215184255', 'size': '15216', 'type': 'file'}\n",
"\n",
"GCA_003080135.1_ASM308013v1\n",
"GCA_003080135.1_ASM308013v1_genomic.gbff.gz {'modify': '20180604203435', 'size': '16084', 'type': 'file'}\n",
"\n",
"GCA_003080155.1_ASM308015v1\n",
"GCA_003080155.1_ASM308015v1_genomic.gbff.gz {'modify': '20180604203433', 'size': '16060', 'type': 'file'}\n",
"\n",
"GCA_003080175.1_ASM308017v1\n",
"GCA_003080175.1_ASM308017v1_genomic.gbff.gz {'modify': '20180604203436', 'size': '16067', 'type': 'file'}\n",
"\n",
"GCA_003080195.1_ASM308019v1\n",
"GCA_003080195.1_ASM308019v1_genomic.gbff.gz {'modify': '20180604203414', 'size': '16055', 'type': 'file'}\n",
"\n",
"GCA_003080215.1_ASM308021v1\n",
"GCA_003080215.1_ASM308021v1_genomic.gbff.gz {'modify': '20180604203417', 'size': '15298', 'type': 'file'}\n",
"\n",
"GCA_003080235.1_ASM308023v1\n",
"GCA_003080235.1_ASM308023v1_genomic.gbff.gz {'modify': '20191216122543', 'size': '15212', 'type': 'file'}\n",
"\n",
"GCA_003080255.1_ASM308025v1\n",
"GCA_003080255.1_ASM308025v1_genomic.gbff.gz {'modify': '20180604203409', 'size': '15721', 'type': 'file'}\n",
"\n",
"GCA_003080275.1_ASM308027v1\n",
"GCA_003080275.1_ASM308027v1_genomic.gbff.gz {'modify': '20180604203432', 'size': '15693', 'type': 'file'}\n",
"\n",
"GCA_003080295.1_ASM308029v1\n",
"GCA_003080295.1_ASM308029v1_genomic.gbff.gz {'modify': '20180604203534', 'size': '16045', 'type': 'file'}\n",
"\n",
"GCA_003080315.1_ASM308031v1\n",
"GCA_003080315.1_ASM308031v1_genomic.gbff.gz {'modify': '20191215184253', 'size': '14475', 'type': 'file'}\n",
"\n",
"GCA_003080335.1_ASM308033v1\n",
"GCA_003080335.1_ASM308033v1_genomic.gbff.gz {'modify': '20180604203433', 'size': '15967', 'type': 'file'}\n",
"\n",
"GCA_003080355.1_ASM308035v1\n",
"GCA_003080355.1_ASM308035v1_genomic.gbff.gz {'modify': '20180604203533', 'size': '14977', 'type': 'file'}\n",
"\n",
"GCA_003080375.1_ASM308037v1\n",
"GCA_003080375.1_ASM308037v1_genomic.gbff.gz {'modify': '20180604203425', 'size': '15482', 'type': 'file'}\n",
"\n",
"GCA_003080395.1_ASM308039v1\n",
"GCA_003080395.1_ASM308039v1_genomic.gbff.gz {'modify': '20180604203443', 'size': '15395', 'type': 'file'}\n",
"\n",
"GCA_003080415.1_ASM308041v1\n",
"GCA_003080415.1_ASM308041v1_genomic.gbff.gz {'modify': '20191216122526', 'size': '15685', 'type': 'file'}\n",
"\n",
"GCA_003080435.1_ASM308043v1\n",
"GCA_003080435.1_ASM308043v1_genomic.gbff.gz {'modify': '20180604203428', 'size': '15380', 'type': 'file'}\n",
"\n",
"GCA_003080455.1_ASM308045v1\n",
"GCA_003080455.1_ASM308045v1_genomic.gbff.gz {'modify': '20191216184627', 'size': '15864', 'type': 'file'}\n",
"\n",
"GCA_003080475.1_ASM308047v1\n",
"GCA_003080475.1_ASM308047v1_genomic.gbff.gz {'modify': '20180604203440', 'size': '15043', 'type': 'file'}\n",
"\n",
"GCA_003080495.1_ASM308049v1\n",
"GCA_003080495.1_ASM308049v1_genomic.gbff.gz {'modify': '20180604203433', 'size': '15063', 'type': 'file'}\n",
"\n",
"GCA_003080515.1_ASM308051v1\n",
"GCA_003080515.1_ASM308051v1_genomic.gbff.gz {'modify': '20180604203421', 'size': '15044', 'type': 'file'}\n",
"\n",
"GCA_003080535.1_ASM308053v1\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"GCA_003080535.1_ASM308053v1_genomic.gbff.gz {'modify': '20180604203437', 'size': '15011', 'type': 'file'}\n",
"\n",
"GCA_003080555.1_ASM308055v1\n",
"GCA_003080555.1_ASM308055v1_genomic.gbff.gz {'modify': '20180604203535', 'size': '15053', 'type': 'file'}\n",
"\n",
"GCA_003080575.1_ASM308057v1\n",
"GCA_003080575.1_ASM308057v1_genomic.gbff.gz {'modify': '20180604203533', 'size': '15005', 'type': 'file'}\n",
"\n",
"GCA_003080595.1_ASM308059v1\n",
"GCA_003080595.1_ASM308059v1_genomic.gbff.gz {'modify': '20180604203510', 'size': '15036', 'type': 'file'}\n",
"\n",
"GCA_003080615.1_ASM308061v1\n",
"GCA_003080615.1_ASM308061v1_genomic.gbff.gz {'modify': '20191216122525', 'size': '15743', 'type': 'file'}\n",
"\n",
"GCA_003080635.1_ASM308063v1\n",
"GCA_003080635.1_ASM308063v1_genomic.gbff.gz {'modify': '20180604203531', 'size': '15061', 'type': 'file'}\n",
"\n",
"GCA_003080655.1_ASM308065v1\n",
"GCA_003080655.1_ASM308065v1_genomic.gbff.gz {'modify': '20180604203509', 'size': '15056', 'type': 'file'}\n",
"\n",
"GCA_003080675.1_ASM308067v1\n",
"GCA_003080675.1_ASM308067v1_genomic.gbff.gz {'modify': '20180604203534', 'size': '15058', 'type': 'file'}\n",
"\n",
"GCA_003080695.1_ASM308069v1\n",
"GCA_003080695.1_ASM308069v1_genomic.gbff.gz {'modify': '20180604203532', 'size': '15049', 'type': 'file'}\n",
"\n",
"GCA_003080715.1_ASM308071v1\n",
"GCA_003080715.1_ASM308071v1_genomic.gbff.gz {'modify': '20180604203532', 'size': '15537', 'type': 'file'}\n",
"\n",
"GCA_003080735.1_ASM308073v1\n",
"GCA_003080735.1_ASM308073v1_genomic.gbff.gz {'modify': '20180604203533', 'size': '15067', 'type': 'file'}\n",
"\n",
"GCA_003080755.1_ASM308075v1\n",
"GCA_003080755.1_ASM308075v1_genomic.gbff.gz {'modify': '20180604203523', 'size': '15015', 'type': 'file'}\n",
"\n",
"GCA_003080775.1_ASM308077v1\n",
"GCA_003080775.1_ASM308077v1_genomic.gbff.gz {'modify': '20180604203533', 'size': '15071', 'type': 'file'}\n",
"\n",
"GCA_003080795.1_ASM308079v1\n",
"GCA_003080795.1_ASM308079v1_genomic.gbff.gz {'modify': '20180604203515', 'size': '14985', 'type': 'file'}\n",
"\n",
"GCA_003080815.1_ASM308081v1\n",
"GCA_003080815.1_ASM308081v1_genomic.gbff.gz {'modify': '20180604203536', 'size': '15055', 'type': 'file'}\n",
"\n",
"GCA_003080835.1_ASM308083v1\n",
"GCA_003080835.1_ASM308083v1_genomic.gbff.gz {'modify': '20191216122519', 'size': '15692', 'type': 'file'}\n",
"\n",
"GCA_003080855.1_ASM308085v1\n",
"GCA_003080855.1_ASM308085v1_genomic.gbff.gz {'modify': '20180604203644', 'size': '15010', 'type': 'file'}\n",
"\n",
"GCA_003080875.1_ASM308087v1\n",
"GCA_003080875.1_ASM308087v1_genomic.gbff.gz {'modify': '20180604203632', 'size': '15062', 'type': 'file'}\n",
"\n",
"GCA_003080895.1_ASM308089v1\n",
"GCA_003080895.1_ASM308089v1_genomic.gbff.gz {'modify': '20180604203630', 'size': '15652', 'type': 'file'}\n",
"\n",
"GCA_003080915.1_ASM308091v1\n",
"GCA_003080915.1_ASM308091v1_genomic.gbff.gz {'modify': '20191216122525', 'size': '15582', 'type': 'file'}\n",
"\n",
"GCA_003080935.1_ASM308093v1\n",
"GCA_003080935.1_ASM308093v1_genomic.gbff.gz {'modify': '20191216122530', 'size': '15717', 'type': 'file'}\n",
"\n",
"GCA_003080955.1_ASM308095v1\n",
"GCA_003080955.1_ASM308095v1_genomic.gbff.gz {'modify': '20180604203646', 'size': '15172', 'type': 'file'}\n",
"\n",
"GCA_003080975.1_ASM308097v1\n",
"GCA_003080975.1_ASM308097v1_genomic.gbff.gz {'modify': '20180604203621', 'size': '15049', 'type': 'file'}\n",
"\n",
"GCA_003080995.1_ASM308099v1\n",
"GCA_003080995.1_ASM308099v1_genomic.gbff.gz {'modify': '20180604203621', 'size': '15064', 'type': 'file'}\n",
"\n",
"GCA_003081015.1_ASM308101v1\n",
"GCA_003081015.1_ASM308101v1_genomic.gbff.gz {'modify': '20180604203626', 'size': '15051', 'type': 'file'}\n",
"\n",
"GCA_003081035.1_ASM308103v1\n",
"GCA_003081035.1_ASM308103v1_genomic.gbff.gz {'modify': '20180604203618', 'size': '15064', 'type': 'file'}\n",
"\n",
"GCA_003081055.1_ASM308105v1\n",
"GCA_003081055.1_ASM308105v1_genomic.gbff.gz {'modify': '20191216184613', 'size': '15692', 'type': 'file'}\n",
"\n",
"GCA_003081075.1_ASM308107v1\n",
"GCA_003081075.1_ASM308107v1_genomic.gbff.gz {'modify': '20180604203630', 'size': '15766', 'type': 'file'}\n",
"\n",
"GCA_003081095.1_ASM308109v1\n",
"GCA_003081095.1_ASM308109v1_genomic.gbff.gz {'modify': '20180604203636', 'size': '15760', 'type': 'file'}\n",
"\n",
"GCA_003081115.1_ASM308111v1\n",
"GCA_003081115.1_ASM308111v1_genomic.gbff.gz {'modify': '20180604203634', 'size': '16314', 'type': 'file'}\n",
"\n",
"GCA_003081135.1_ASM308113v1\n",
"GCA_003081135.1_ASM308113v1_genomic.gbff.gz {'modify': '20180604203610', 'size': '16300', 'type': 'file'}\n",
"\n",
"GCA_003081155.1_ASM308115v1\n",
"GCA_003081155.1_ASM308115v1_genomic.gbff.gz {'modify': '20180604203627', 'size': '16316', 'type': 'file'}\n",
"\n",
"GCA_003081175.1_ASM308117v1\n",
"GCA_003081175.1_ASM308117v1_genomic.gbff.gz {'modify': '20180604203638', 'size': '16322', 'type': 'file'}\n",
"\n",
"GCA_003081195.1_ASM308119v1\n",
"GCA_003081195.1_ASM308119v1_genomic.gbff.gz {'modify': '20180604203643', 'size': '15610', 'type': 'file'}\n",
"\n",
"GCA_003081215.1_ASM308121v1\n",
"GCA_003081215.1_ASM308121v1_genomic.gbff.gz {'modify': '20191215184302', 'size': '15741', 'type': 'file'}\n",
"\n",
"GCA_003081235.1_ASM308123v1\n",
"GCA_003081235.1_ASM308123v1_genomic.gbff.gz {'modify': '20180604203627', 'size': '16392', 'type': 'file'}\n",
"\n",
"GCA_003081255.1_ASM308125v1\n",
"GCA_003081255.1_ASM308125v1_genomic.gbff.gz {'modify': '20180604203635', 'size': '16328', 'type': 'file'}\n",
"\n",
"GCA_003081275.1_ASM308127v1\n",
"GCA_003081275.1_ASM308127v1_genomic.gbff.gz {'modify': '20180604203631', 'size': '15457', 'type': 'file'}\n",
"\n",
"GCA_003081295.1_ASM308129v1\n",
"GCA_003081295.1_ASM308129v1_genomic.gbff.gz {'modify': '20180604203644', 'size': '16325', 'type': 'file'}\n",
"\n",
"GCA_003081315.1_ASM308131v1\n",
"GCA_003081315.1_ASM308131v1_genomic.gbff.gz {'modify': '20180604203634', 'size': '16333', 'type': 'file'}\n",
"\n",
"GCA_003081335.1_ASM308133v1\n",
"GCA_003081335.1_ASM308133v1_genomic.gbff.gz {'modify': '20180604203634', 'size': '16401', 'type': 'file'}\n",
"\n",
"GCA_003081355.1_ASM308135v1\n",
"GCA_003081355.1_ASM308135v1_genomic.gbff.gz {'modify': '20180604203751', 'size': '15504', 'type': 'file'}\n",
"\n",
"GCA_003081375.1_ASM308137v1\n",
"GCA_003081375.1_ASM308137v1_genomic.gbff.gz {'modify': '20180604203740', 'size': '15515', 'type': 'file'}\n",
"\n",
"GCA_003081395.1_ASM308139v1\n",
"GCA_003081395.1_ASM308139v1_genomic.gbff.gz {'modify': '20180604203729', 'size': '16372', 'type': 'file'}\n",
"\n",
"GCA_003081415.1_ASM308141v1\n",
"GCA_003081415.1_ASM308141v1_genomic.gbff.gz {'modify': '20180604203727', 'size': '16343', 'type': 'file'}\n",
"\n",
"GCA_003081435.1_ASM308143v1\n",
"GCA_003081435.1_ASM308143v1_genomic.gbff.gz {'modify': '20180604203742', 'size': '16381', 'type': 'file'}\n",
"\n",
"GCA_003081455.1_ASM308145v1\n",
"GCA_003081455.1_ASM308145v1_genomic.gbff.gz {'modify': '20180604203725', 'size': '16354', 'type': 'file'}\n",
"\n",
"GCA_003081475.1_ASM308147v1\n",
"GCA_003081475.1_ASM308147v1_genomic.gbff.gz {'modify': '20180604203746', 'size': '16043', 'type': 'file'}\n",
"\n",
"GCA_003173835.1_ASM317383v1\n",
"GCA_003173835.1_ASM317383v1_genomic.gbff.gz {'modify': '20191215191413', 'size': '15652', 'type': 'file'}\n",
"\n"
]
}
],
"source": [
"\n",
"base_dir = 'genomes/genbank/viral/Bluetongue_virus/latest_assembly_versions'\n",
"for fname, facts in ftp.mlsd(base_dir):\n",
" if facts['type'] in ['dir', 'OS.unix=symlink']:\n",
" print(fname)\n",
" for x, ys in ftp.mlsd(f'{base_dir}/{fname}', facts=['modify', 'type', 'size']):\n",
" if ys['type'] == 'file' and regex_gbff_gz.match(x):\n",
" print(x, ys)\n",
" print()\n",
" "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# NCBI Entrez API not useful for segmented genomes\n",
"\n",
"Doesn't look like the API returns information on how the different segments are related. However, the FTP site has all that information in a convenient table. "
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"from Bio import Entrez\n",
"Entrez.email = '[email protected]'"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'Count': '1', 'RetMax': '1', 'RetStart': '0', 'IdList': ['5097'], 'TranslationSet': [], 'TranslationStack': [{'Term': '\"bluetongue virus\"[ORGN]', 'Field': 'ORGN', 'Count': '1', 'Explode': 'Y'}, 'GROUP'], 'QueryTranslation': '\"bluetongue virus\"[ORGN]'}\n"
]
}
],
"source": [
"with Entrez.esearch('genome', term='\"bluetongue virus\"[ORGN]') as h:\n",
" r = Entrez.read(h)\n",
"print(r)"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n",
"<!DOCTYPE eSearchResult PUBLIC \"-//NLM//DTD esearch 20060628//EN\" \"https://eutils.ncbi.nlm.nih.gov/eutils/dtd/20060628/esearch.dtd\">\n",
"<eSearchResult><Count>1</Count><RetMax>1</RetMax><RetStart>0</RetStart><IdList>\n",
"<Id>5097</Id>\n",
"</IdList><TranslationSet/><TranslationStack> <TermSet> <Term>\"bluetongue virus\"[ORGN]</Term> <Field>ORGN</Field> <Count>1</Count> <Explode>Y</Explode> </TermSet> <OP>GROUP</OP> </TranslationStack><QueryTranslation>\"bluetongue virus\"[ORGN]</QueryTranslation></eSearchResult>\n",
"\n"
]
}
],
"source": [
"with Entrez.esearch('genome', term='\"bluetongue virus\"[ORGN]') as h:\n",
" print(h.read())"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n",
"<!DOCTYPE eSummaryResult PUBLIC \"-//NLM//DTD esummary v1 20041029//EN\" \"https://eutils.ncbi.nlm.nih.gov/eutils/dtd/20041029/esummary-v1.dtd\">\n",
"<eSummaryResult>\n",
"<DocSum>\n",
"\t<Id>5097</Id>\n",
"\t<Item Name=\"Organism_Name\" Type=\"String\">Bluetongue virus</Item>\n",
"\t<Item Name=\"Organism_Kingdom\" Type=\"String\">Viruses</Item>\n",
"\t<Item Name=\"DefLine\" Type=\"String\">Bluetongue virus Genome sequencing</Item>\n",
"\t<Item Name=\"ProjectID\" Type=\"String\">287219</Item>\n",
"\t<Item Name=\"Number_of_Chromosomes\" Type=\"String\">11</Item>\n",
"\t<Item Name=\"Number_of_Plasmids\" Type=\"String\">0</Item>\n",
"\t<Item Name=\"Number_of_Organelles\" Type=\"String\">0</Item>\n",
"\t<Item Name=\"Assembly_Name\" Type=\"String\"></Item>\n",
"\t<Item Name=\"Assembly_Accession\" Type=\"String\"></Item>\n",
"\t<Item Name=\"AssemblyID\" Type=\"String\">0</Item>\n",
"\t<Item Name=\"Create_Date\" Type=\"Date\">1987/11/29 00:00</Item>\n",
"\t<Item Name=\"Options\" Type=\"String\"></Item>\n",
"</DocSum>\n",
"\n",
"</eSummaryResult>\n",
"\n"
]
}
],
"source": [
"with Entrez.esummary(db='genome', id=r['IdList']) as h:\n",
" print(h.read())"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'Count': '40', 'RetMax': '20', 'RetStart': '0', 'IdList': ['1906934', '384363', '355314', '248915', '248914', '248913', '248912', '248911', '248910', '248909', '197781', '197780', '188762', '94967', '94966', '45032', '45031', '45030', '45029', '40051'], 'TranslationSet': [], 'TranslationStack': [{'Term': '\"bluetongue virus\"[ORGN]', 'Field': 'ORGN', 'Count': '40', 'Explode': 'N'}, 'GROUP'], 'QueryTranslation': '\"bluetongue virus\"[ORGN]'}\n"
]
}
],
"source": [
"with Entrez.esearch('taxonomy', term='\"bluetongue virus\"[ORGN]') as h:\n",
" r = Entrez.read(h)\n",
"print(r)"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'Count': '40', 'RetMax': '20', 'RetStart': '0', 'IdList': ['1906934', '384363', '355314', '248915', '248914', '248913', '248912', '248911', '248910', '248909', '197781', '197780', '188762', '94967', '94966', '45032', '45031', '45030', '45029', '40051'], 'TranslationSet': [], 'TranslationStack': [{'Term': '\"bluetongue virus\"[ORGN]', 'Field': 'ORGN', 'Count': '40', 'Explode': 'N'}, 'GROUP'], 'QueryTranslation': '\"bluetongue virus\"[ORGN]'}\n"
]
}
],
"source": [
"with Entrez.esearch('taxonomy', term='\"bluetongue virus\"[ORGN]') as h:\n",
" r = Entrez.read(h)\n",
"print(r)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'Count': '7183', 'RetMax': '20', 'RetStart': '0', 'IdList': ['1787383128', '1783604471', '1783604469', '1783604467', '1783604465', '1783604463', '1783604461', '1783604459', '1783604457', '1783604455', '1783604453', '1783604451', '1783604449', '1783604447', '1783604445', '1783604443', '1783604441', '1783604439', '1783604437', '1783604435'], 'TranslationSet': [{'From': '\"bluetongue virus\"[ORGN]', 'To': '\"Bluetongue virus\"[Organism]'}], 'TranslationStack': [{'Term': '\"Bluetongue virus\"[Organism]', 'Field': 'Organism', 'Count': '7183', 'Explode': 'Y'}, 'GROUP'], 'QueryTranslation': '\"Bluetongue virus\"[Organism]'}\n"
]
}
],
"source": [
"with Entrez.esearch('nucleotide', term='\"bluetongue virus\"[ORGN]') as h:\n",
" r = Entrez.read(h)\n",
"print(r)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'Count': '81', 'RetMax': '20', 'RetStart': '0', 'IdList': ['12046557', '12046556', '12046555', '12046554', '12046553', '12046552', '12046551', '12046550', '12046385', '12046384', '12046383', '12046382', '12046381', '12046380', '12046379', '12046378', '12046377', '12046376', '12034931', '11370158'], 'TranslationSet': [{'From': '\"bluetongue virus\"[ORGN]', 'To': '\"Bluetongue virus\"[Organism]'}], 'TranslationStack': [{'Term': '\"Bluetongue virus\"[Organism]', 'Field': 'Organism', 'Count': '81', 'Explode': 'Y'}, 'GROUP'], 'QueryTranslation': '\"Bluetongue virus\"[Organism]'}\n"
]
}
],
"source": [
"with Entrez.esearch('biosample', term='\"bluetongue virus\"[ORGN]') as h:\n",
" r = Entrez.read(h)\n",
"print(r)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'Count': '1', 'RetMax': '1', 'RetStart': '0', 'IdList': ['5097'], 'TranslationSet': [], 'TranslationStack': [{'Term': '\"bluetongue virus\"[ORGN]', 'Field': 'ORGN', 'Count': '1', 'Explode': 'Y'}, 'GROUP'], 'QueryTranslation': '\"bluetongue virus\"[ORGN]'}"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"r"
]
},
{
"cell_type": "code",
"execution_count": 101,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'Count': '1', 'RetMax': '1', 'RetStart': '0', 'IdList': ['5097'], 'TranslationSet': [], 'TranslationStack': [{'Term': 'GCA_000854445.2[All Fields]', 'Field': 'All Fields', 'Count': '1', 'Explode': 'N'}, 'GROUP'], 'QueryTranslation': 'GCA_000854445.2[All Fields]'}\n"
]
}
],
"source": [
"with Entrez.esearch(db='genome', term='GCA_000854445.2') as h:\n",
" print(Entrez.read(h))"
]
},
{
"cell_type": "code",
"execution_count": 103,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[{'Item': [], 'Id': '5097', 'Organism_Name': 'Bluetongue virus', 'Organism_Kingdom': 'Viruses', 'DefLine': 'Bluetongue virus Genome sequencing', 'ProjectID': '287219', 'Number_of_Chromosomes': '11', 'Number_of_Plasmids': '0', 'Number_of_Organelles': '0', 'Assembly_Name': '', 'Assembly_Accession': '', 'AssemblyID': '0', 'Create_Date': '1987/11/29 00:00', 'Options': ''}]\n"
]
}
],
"source": [
"with Entrez.esummary(db='genome', id=['5097']) as h:\n",
" print(Entrez.read(h))"
]
},
{
"cell_type": "code",
"execution_count": 103,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[{'Item': [], 'Id': '5097', 'Organism_Name': 'Bluetongue virus', 'Organism_Kingdom': 'Viruses', 'DefLine': 'Bluetongue virus Genome sequencing', 'ProjectID': '287219', 'Number_of_Chromosomes': '11', 'Number_of_Plasmids': '0', 'Number_of_Organelles': '0', 'Assembly_Name': '', 'Assembly_Accession': '', 'AssemblyID': '0', 'Create_Date': '1987/11/29 00:00', 'Options': ''}]\n"
]
}
],
"source": [
"with Entrez.esummary(db='genome', id=['5097']) as h:\n",
" print(Entrez.read(h))"
]
},
{
"cell_type": "code",
"execution_count": 97,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'Count': '0', 'RetMax': '0', 'RetStart': '0', 'IdList': [], 'TranslationSet': [], 'QueryTranslation': '(GCA_000854445.2[All Names])', 'ErrorList': {'PhraseNotFound': ['GCA_000854445.2'], 'FieldNotFound': []}, 'WarningList': {'QuotedPhraseNotFound': [], 'OutputMessage': ['No items found.'], 'PhraseIgnored': []}}\n"
]
}
],
"source": [
"with Entrez.esearch(db='taxonomy', term='GCA_000854445.2') as h:\n",
" print(Entrez.read(h))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment