Skip to main content

Utilities for analyzing mutations and neoepitopes in patient cohorts

Project description

`|Build Status| <https://travis-ci.org/hammerlab/cohorts>`_ `|Coverage
Status| <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>`_:

::

pip install cohorts

Usage Examples
--------------

::

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(on="os")

::

sample_1_tumor = Sample(
is_tumor=True,
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 = cohort.as_dataframe(missense_snv_count)
(col_1, col_2), dataframe = cohort.as_dataframe([missense_snv_count, neoantigen_count])

.. |Build
Status| image:: https://travis-ci.org/hammerlab/cohorts.svg?branch=master
.. |Coverage
Status| image:: https://coveralls.io/repos/hammerlab/cohorts/badge.svg?branch=master&service=github

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

cohorts-0.1.1.tar.gz (37.2 kB view details)

Uploaded Source

File details

Details for the file cohorts-0.1.1.tar.gz.

File metadata

  • Download URL: cohorts-0.1.1.tar.gz
  • Upload date:
  • Size: 37.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cohorts-0.1.1.tar.gz
Algorithm Hash digest
SHA256 70a40b7df3a5d55612c0619ac1e1a0b1e9276dbe501ca423896883be565dcac6
MD5 b3e13c04163e11c645148bcd44bea460
BLAKE2b-256 65d56ed2ff1b7c809717a02a7453ffc908d665086a925f95fa253511c43ec637

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