Skip to main content

A python package for plotting correlations between variants and environmental factors.

Project description

biogeoloc

A python object package for storing and managing geographic information about biological samples

Installation

pip install biogeoloc

Example

  1. Accession

Accession objects are used to store information about a biological sample. This information includes the sample's geographic location, the date it was collected, and any other relevant information.

There are three main information types that can be stored in an Accession object:

  • Coordinates: The geographic location of the sample
  • IDs: You can store different types of IDs for the sample
  • passport: Information about the sample, such as the date it was collected, the collector, and any other relevant information
  • phenotypic: Information about the sample's phenotype
  • dataset: Information about the dataset the sample belongs to
  • properties: Any other relevant information about the sample
from biogeoloc import Accession

acc = Accession('u0001', genesys_id='23412', pi_id=['PI628326', 'PI326387'], lib_id='333', latitude=12.345, longitude=23.456, dataset={'reseq': True})
  1. AccessionSet

AccessionSet objects are used to store multiple Accession objects. This is useful when you have a collection of samples that you want to manage together.

from biogeoloc import AccessionSet

acc1 = Accession('xyx1', lat=1.0, lon=2.0, alt=3.0, lib_id='lib1', pi_id='pi1')
acc2 = Accession('xyx2', lat=1.0, lon=2.0, lib_id='lib2', pi_id_list=['pi2', 'pi3'], is_id_list=['is2', 'is3'])
acc3 = Accession('xyx3', is_id='is3', lib_id='lib3', pi_id='pi3')

AS = AccessionSet('test', '2020-01-01',
                    default_ID_items={'lib_id': str, 'pi_id': list, 'is_id': list})
AS.add(acc1)
AS.add(acc2)
AS.add(acc3)

AS.build_index()

uniq_id = AS.search('lib1', 'lib_id')
acc = AS.get(uniq_id)

print(vars(acc))
  1. GeneSys

GeneSys objects are used to parse and store information from the Genesys database. This is useful when you want to access information about a sample from the Genesys database.

Go to GeneSys Website to download the accessions data in a zip file. Extract the zip file and use the GeneSys object to parse the data.

from biogeoloc import GeneSys

download_genesys_dir = '/path/to/downloaded/genesys/data'
sorghumGS = GeneSys()
sorghumGS.load(download_genesys_dir)
sorghumGS.build_index()

q_id = 'PI207841'
u_id = sorghumGS.search(q_id)
acc = sorghumGS.get(u_id)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

biogeoloc-0.0.3.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

biogeoloc-0.0.3-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file biogeoloc-0.0.3.tar.gz.

File metadata

  • Download URL: biogeoloc-0.0.3.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for biogeoloc-0.0.3.tar.gz
Algorithm Hash digest
SHA256 5a514346acc61da0a42f5874d2853efe67fe4db197883f76eadad9b41181e960
MD5 a1504be912c59a768421f97680bd4537
BLAKE2b-256 16286a20f9d68d2a2fb2b3f490d82c8f12e50f3b5c15b5b2b0aebf87fc7a7e0a

See more details on using hashes here.

File details

Details for the file biogeoloc-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: biogeoloc-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for biogeoloc-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7c8e805191c9b19adf0aa38d274a16e7aa01bd962c9e89f4a33683e4211f701c
MD5 1d8a365d14c15e4f456e30f54e7d4636
BLAKE2b-256 684669b048eb44359179a7ca5ba6c76d3f59da771ee4872f83b1ea0de4f2c0fa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page