Resolwe SDK for Python
Project description
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:
import resdk
res = resdk.Resolwe('admin', 'admin', 'https://torta.bcm.genialis.com')
# Recomended: start logging
resdk.start_logging()
If you do not have access to the Resolwe server, contact us at info@genialis.com.
Get sample by slug and download the aligned reads (BAM file):
sample = res.sample.get('primary_chor_142a2a4_h3k27ac')
sample.download(file_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(file_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('primary_chor_142a2a4_h3k27ac')
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-bowtie2', 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file resdk-1.3.4.tar.gz
.
File metadata
- Download URL: resdk-1.3.4.tar.gz
- Upload date:
- Size: 269.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e5ffa46c4f6e132304cf4957071d3c724c2a38a14f217170bdeabef3f5f357f |
|
MD5 | c367b0287af96bd75513455c53be022a |
|
BLAKE2b-256 | d1cd6c1f523964bc649ee6724b424e8b57e2165694a33bcd3f9b5e18f980d12b |
File details
Details for the file resdk-1.3.4-py2.py3-none-any.whl
.
File metadata
- Download URL: resdk-1.3.4-py2.py3-none-any.whl
- Upload date:
- Size: 96.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f02aa4ca1e494bc7c400bcac14ac21e44797ffdbf8fec76c7f10703a5ae9ac6 |
|
MD5 | 927a00b7b49cf9eaedb5af427c96b773 |
|
BLAKE2b-256 | 41f410e11852f7f0245033dab307a9b87e9caa1d3b46ee2d48c2d41313719efb |