Skip to main content

Sample TCRs according to VJ gene usage frequency

Project description

tcrsampler

Sample TCRs according to VDJ gene usage frequency

Build Status Coverage Status PyPI version

Install

pip install tcrsampler

Example

import os
import pandas as pd
from tcrsampler.sampler import TCRsampler
t = TCRsampler()
fn= os.path.join('tcrsampler' ,'tests', 'pmbc_mixcr_example_data.txt')
t.clean_mixcr(filename = fn)
t.build_background(stratify_by_subject = True, use_frequency = True)
t.sample([['TRBV9*01','TRBJ2-7*01', 2],['TRBV7-7*01', 'TRBJ2-4*01', 4] ], depth = 1, use_frequency = True)
[['CASSRTGSLADEQYF', 'CASSATGVVSAQYF'],
 ['CASSLGQAARGIQYF', 'CASSLGQAARGIQYF', 'CASSLGQAARGIQYF', 'CASSLGQAARGIQYF']]

Download Default Background

python -c "from tcrsampler.setup_db import install_all_next_gen; install_all_next_gen(dry_run = False)"

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

tcrsampler-0.1.9.tar.gz (416.0 kB view hashes)

Uploaded Source

Built Distribution

tcrsampler-0.1.9-py3-none-any.whl (438.1 kB view hashes)

Uploaded Python 3

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