Skip to content
Snippets Groups Projects
Commit 5deb245f authored by Robert Bossy's avatar Robert Bossy
Browse files

BacDive taxon entries ids in the form `bd:`

parent d2aabe1e
No related branches found
No related tags found
No related merge requests found
......@@ -67,4 +67,13 @@ snakemake -j 1 -s rewrite-taxonomy.snakefile
This will write the merged taxonomy in a format suitable for text projection.
## Resulting taxonomy
### Namespace prefixes
| Prefix | Domain | URL construct |
|--------|--------|---------------|
| `ncbi` | NCBI Taxonomy | `https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id={ID}` |
| | | `https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=taxonomy&id={ID}` |
| `bd` | BacDive | `https://bacdive.dsmz.de/strain/{ID} |
| | | `https://api.bacdive.dsmz.de/example/fetch/{ID}` (authentication required) |
......@@ -102,12 +102,7 @@ class BacDiveEntry:
self.domain = tax.findtext('./domain')
def _get_strain_taxid(self):
for sn in self.strain_number:
if sn.startswith('DSM'):
return sn.lower().replace(' ', ':')
if len(self.strain_number) > 0:
return self.strain_number[0].lower().replace(' ', ':')
return 'bacdive:%s' % os.path.basename(self.filename).replace('.xml', '')
return 'bd:' + self.bacdive_id
def _get_canonical(self):
for sn in self.strain_number:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment