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:

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

Find ROSE2 analysis results and display a ??? plot of the first result:

rose2 = re.data.filter(type='data:chipseq:rose2:')
# 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.1.tar.gz (38.6 kB view details)

Uploaded Source

Built Distribution

resdk-1.3.1-py2.py3-none-any.whl (36.2 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

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

File hashes

Hashes for resdk-1.3.1.tar.gz
Algorithm Hash digest
SHA256 2ec020a6c1fc994f9ffab15cecec88e2697c95c0f7e08c0ba81ba30a4e986035
MD5 3b15b79efc4c3d075d38ffdc043fab9c
BLAKE2b-256 ed405a38d9d90a6cae1513e65f2fe74790f0167e68e91834ace0b4f2e6ca1526

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for resdk-1.3.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6f89c7dcde4fa1789663f2dc3dbddbe9aaa605481daf81b3493ade0dfb76f2f8
MD5 7b65c150e8d29c0943314691319109be
BLAKE2b-256 3191961a38a8298b58444bed9e866702b38d17d6467bf4c06728c77f647153df

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