Skip to main content

Simple access to the reference genomes at UCSC

Project description

The package allows to easily download and use genomic data at UCSC. This is essentially a thin “caching” wrapper around the twobitreader library.

Installation

The simplest way to install the package is via easy_install or pip:

$ easy_install ucscgenome

Dependencies

  • twobitreader

Usage

The primary usage example is the following:

from ucscgenome import Genome
g = Genome('sacCer2')
print str(g['chrI'][0:100])

On the second line of the above example the following steps are performed:

  • The local cache directory is searched for the pre-downloaded genome data. If the data is readily available, it is opened for reading.

  • If there is not cached version of the sacCer2 genome, it is downloaded from the UCSC site to the cache directory.

  • The local data is downloaded and stored using the compact 2bit format.

You can configure the details of the procedure by providing additional options to the Genome constructor:

g = Genome('hg19', cache_dir='my_genomes', use_web=False)

which means that the genome data is to be searched for in the ./my_genomes directory and in no case should a download be attempted, or:

g = Genome('hg19', source_url_pattern='http://my.site.com/genomes/%(id)s/%(id)s.2bit')

which means that the genomic data is to be downloaded from your own server rather than UCSD’s.

See also

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

ucscgenome-0.1.zip (9.0 kB view details)

Uploaded Source

File details

Details for the file ucscgenome-0.1.zip.

File metadata

  • Download URL: ucscgenome-0.1.zip
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ucscgenome-0.1.zip
Algorithm Hash digest
SHA256 e844e238dd2643452728ec48325728d3ca7739f47303cec69f337673cb49f93b
MD5 ad17b7f11399837f927c7265b5a55c06
BLAKE2b-256 4b12afae459492129dfa830d66f0b59ba0bfd73fa86c792af48beac3c3478539

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