TaxonomyKit is a powerful, handy and cross-platform library that helps you work with taxonomy data from the NCBI databases. The core of the Taxonomist app.
Swift Objective-C
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
TaxonomyKit.xcodeproj
TaxonomyKit
TaxonomyKitTests
.gitignore
.swiftlint.yml
.travis.yml
LICENSE.md
README.md

README.md

TaxonomyKit

TaxonomyKit

Platforms GitHub release Build Status codecov.io GitHub license Carthage compatible Swift version codebeat badge

TaxonomyKit is a powerful, handy and cross-platform library that makes working with taxonomy data from the NCBI databases easier. It works as a client of the NCBI's Entrez Programming Utilities and it is the core of the Taxonomist app.

How To Get Started

First steps

🔭 Get the NCBI's Taxonomy ID for the taxon you're looking for

let myCoolQuery = "quercus ilex"
Taxonomy.findIdentifiers(for: myCoolQuery) { result in
    switch result {
    case .success(let foundIDs):
        print("Found identifiers: \(foundIDs).")
    case .failure(let error):
        print("Oops! Something went wrong. Error was: \(error)")
    }
}

⬇️ Download your taxon

let foundID: TaxonID = "58334" // Use the one you got from previous step.
Taxonomy.downloadTaxon(withIdentifier: foundID) { result in
    switch result {
    case .success(let taxon):
        print("Got taxon: \(taxon.name).")
    case .failure(let error):
        print("Oops! Something went wrong. Error was: \(error)")
    }
}

📖 Get an extract from Wikipedia

Wikipedia.retrieveAbstract(for: downloadedTaxon) { result in
    switch result {
    case .success(let wikipediaResult):
        print("Got info: \(wikipediaResult.extract).")
    case .failure(let error):
        print("Oops! Something went wrong. Error was: \(error)")
    }
}

Installation with Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate TaxonomyKit into your Xcode project using Carthage, specify it in your cartfile:

github "gservera/TaxonomyKit" ~> 1.8

Run carthage update on your project's directory to build the framework and drag the built TaxonomyKit.framework into your Xcode project.

Requirements

  • macOS 10.13 High Sierra or greater.
  • Xcode 9.0 or greater.

Unit Tests

TaxonomyKit includes a suite of unit tests within the TaxonomyKitTests subdirectory. These tests can be run simply be executed the test action on the platform framework you would like to test.

☕️ Author

Proudly developed by Guillem Servera in Palma, Illes Balears.

License

TaxonomyKit is released under the MIT license. See LICENSE for details.