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
res = Resolwe('admin', 'admin', 'https://torta.bcm.genialis.com')

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

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

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

samples = res.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 = res.sample.get(1)
for data_id in sample.data:
    data = res.data.get(data_id)
    print data.process_name

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

rose2_list = res.data.filter(type='data:chipseq:rose2:')
rose2 = rose2_list[0]
rose2.download(name='20150531-u266-A-H3K27Ac-ML1949_S2_R1_mapped_peaks_Plot_panel.png')

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

genome = res.data.get('hg19')
genome_id = genome.id
reads_id = sample.data[0]
aligned = res.run('alignment-bowtie-2-2-3_trim', input={
                      'genome': genome_id,
                      'reads': reads_id,
                      'reporting': {'rep_mode': 'k', 'k_reports': 1}
                  })
aligned.status

After a while you can check if the alignment has finished:

aligned.update()
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.3.tar.gz (39.0 kB view details)

Uploaded Source

Built Distribution

resdk-1.3.3-py2.py3-none-any.whl (36.7 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

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

File hashes

Hashes for resdk-1.3.3.tar.gz
Algorithm Hash digest
SHA256 913d961b0e4bcc8df5fbb36b229e66eef02bf6c1af087a22ba1a8c5ac608f456
MD5 5af43b7c5de296c8729742f0e37b50a8
BLAKE2b-256 96848363736006eba8266da61d0fa8a3fe08487eb97274d03c165775f776c639

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for resdk-1.3.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 70c7a15b4eec34f0628c73ae4b9f44f09aebb7ccc3f8f2017a071cbd9d2ce51f
MD5 74f59098bd96aa7e687c9a4b0b26f059
BLAKE2b-256 8eb203fc65f7ca691c33899fe6f3e1c9be5e87f2d9f720568cf3808bba0533f5

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