Utilities for analyzing mutations and neoepitopes in patient cohorts
Project description
[![Build Status](https://travis-ci.org/hammerlab/cohorts.svg?branch=master)](https://travis-ci.org/hammerlab/cohorts) [![Coverage Status](https://coveralls.io/repos/hammerlab/cohorts/badge.svg?branch=master&service=github)](https://coveralls.io/github/hammerlab/cohorts?branch=master)
Cohorts
=======
Cohorts is a library for analyzing and plotting clinical data, mutations and neoepitopes in patient cohorts.
It calls out to external libraries like [topiary](https://github.com/hammerlab/topiary) and caches the results for easy manipulation.
Installation
------------
You can install Cohorts using [pip](https://pip.pypa.io/en/latest/quickstart.html):
```bash
pip install cohorts
```
Usage Examples
--------------
```python
patient_1 = Patient(
id="patient_1",
os=70,
pfs=24,
deceased=True,
progressed=True,
benefit=False)
patient_2 = Patient(
id="patient_2",
os=100,
pfs=50,
deceased=False,
progressed=True,
benefit=False)
)
cohort = Cohort(
patients=[patient_1, patient_2],
cache_dir="/where/cohorts/results/get/saved"
)
cohort.plot_survival(how="os")
```
```python
sample_1_tumor = Sample(
id="sample_1_tumor",
bam_path_dna="/path/to/dna/bam",
bam_path_rna="/path/to/rna/bam"
)
patient_1 = Patient(
id="patient_1",
...
snv_vcf_paths=["/where/my/mutect/vcfs/live",
"/where/my/strelka/vcfs/live"]
indel_vcfs_paths=[...],
tumor_sample=sample_1_tumor,
...
)
cohort = Cohort(
...
patients=[patient_1]
)
# Comparison plot of missense mutation counts between benefit and no-benefit patients
cohort.plot_benefit(on=missense_snv_count)
# Raw missense mutations counts
missense_snv_col, dataframe = missense_snv_count(cohort)
```
Cohorts
=======
Cohorts is a library for analyzing and plotting clinical data, mutations and neoepitopes in patient cohorts.
It calls out to external libraries like [topiary](https://github.com/hammerlab/topiary) and caches the results for easy manipulation.
Installation
------------
You can install Cohorts using [pip](https://pip.pypa.io/en/latest/quickstart.html):
```bash
pip install cohorts
```
Usage Examples
--------------
```python
patient_1 = Patient(
id="patient_1",
os=70,
pfs=24,
deceased=True,
progressed=True,
benefit=False)
patient_2 = Patient(
id="patient_2",
os=100,
pfs=50,
deceased=False,
progressed=True,
benefit=False)
)
cohort = Cohort(
patients=[patient_1, patient_2],
cache_dir="/where/cohorts/results/get/saved"
)
cohort.plot_survival(how="os")
```
```python
sample_1_tumor = Sample(
id="sample_1_tumor",
bam_path_dna="/path/to/dna/bam",
bam_path_rna="/path/to/rna/bam"
)
patient_1 = Patient(
id="patient_1",
...
snv_vcf_paths=["/where/my/mutect/vcfs/live",
"/where/my/strelka/vcfs/live"]
indel_vcfs_paths=[...],
tumor_sample=sample_1_tumor,
...
)
cohort = Cohort(
...
patients=[patient_1]
)
# Comparison plot of missense mutation counts between benefit and no-benefit patients
cohort.plot_benefit(on=missense_snv_count)
# Raw missense mutations counts
missense_snv_col, dataframe = missense_snv_count(cohort)
```
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
cohorts-0.1.0.tar.gz
(29.9 kB
view details)
File details
Details for the file cohorts-0.1.0.tar.gz
.
File metadata
- Download URL: cohorts-0.1.0.tar.gz
- Upload date:
- Size: 29.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17a4e555f0180b74cc1fa8ecec5d6ff3e466583bdddfdd6e30e8c263b5e8f8f8 |
|
MD5 | f8dc9a21ffacb5b188b9fa687c3cb9bd |
|
BLAKE2b-256 | 8b8205b52e973c7db037e2665972c6f8c06bd34ed7b2223d33a7b5c9e7bcf3e4 |