Skip to main content

Resolwe SDK for Python

Project description

Build Status Documentation Status Version on PyPI Supported Python versions Number of downloads from PyPI

Resolwe is a dataflow package for the Django framework. Resolwe Bioinformatics is an extension of Resolwe that provides bioinformatics pipelines. Resolwe SDK for Python supports writing dataflow pipelines for Resolwe and Resolwe Bioinformatics.

Docs & Help

Read the detailed description in documentation.

Install

Install from PyPI:

pip install resdk

To install for development, fork on Github and run:

git clone https://github.com/<GITHUB_USER>/resolwe-bio-py.git
cd resolwe-bio-py
pip install -e .[docs,package,test]

Quick Start

Connect to a Resolwe server:

from resdk import Resolwe
re = Resolwe('admin', 'admin', 'https://torta.bcm.genialis.com')

Get sample by ID and download the aligned reads (BAM file):

sample = re.sample.get(1)
sample.download(type='bam')

Find human samples and download all aligned reads (BAM files):

samples = re.sample.filter(descriptor__organism="Homo sapiens")
for sample in samples:
    sample.download(type='bam')

Primary analysis (e.g., filtering, alignment, expression estimation) starts automatically when samples are annotated. A step in primary analysis is represented as Data object, attached to the sample. A Sample object includes sample annotation. A Data object includes input parameters, results and analysis annotation. Print the steps in primary analysis pipeline:

sample = re.sample.get(1)
for data_id in sample.data:
    data = re.data.get(data_id)
    print data.process_name

Find ROSE2 analysis results and display a super-enhancer rank plot of the first ROSE2 analysis Data object:

rose2_list = re.data.filter(type='data:chipseq:rose2:')
rose2 = rose2_list[0]
# TODO: Plot results

Run Bowtie2 mapping on the reads Data object of the above sample:

genome = re.data.filter(type='data:genome:fasta:')[0]
reads = sample.data[0]
aligned = re.run('alignment-bowtie-2-2-3_trim', input={
                     genome: genome.id,
                     reads: reads.id,
                     reporting: {rep_mode: 'k', k_reports: 1}
                 })
aligned.status()

Continue in the Getting Started section of Documentation, where we explain how to upload files, create samples and provide details about the Resolwe backend. Bioinformaticians can learn how to develop pipelines in Writing Pipelines.

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

resdk-1.3.2.tar.gz (38.6 kB view details)

Uploaded Source

Built Distribution

resdk-1.3.2-py2.py3-none-any.whl (36.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file resdk-1.3.2.tar.gz.

File metadata

  • Download URL: resdk-1.3.2.tar.gz
  • Upload date:
  • Size: 38.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for resdk-1.3.2.tar.gz
Algorithm Hash digest
SHA256 f280f2f3d2c2be2e41f8fea81abbeac809015929af284f6430a28d7cae5817db
MD5 d7588d4e9dbeeb873dfc52995b82cb39
BLAKE2b-256 8be22abe81a4a0a27b2f65ef60752aa9f418a3a417ef238f65153524f50d7b04

See more details on using hashes here.

File details

Details for the file resdk-1.3.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for resdk-1.3.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3bcb699ad8885078bcbf0990205f46268cb8add22794a418d23a9dba15d0ddf4
MD5 8e1f185a23a15f8bf9b9260f4bd045d3
BLAKE2b-256 994857737e8e5537c5c40cbfc81381eb2cac3b2eaedfbf05adcf7fe4787bdc30

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