Learn R Programming

tcR

The tcR package is no longer supported and current issues will not be fixed.

A new package is available that is designed to replace tcR called immunarch: https://immunarch.com/

We have solved most of the problems tcR package had and improved the overall pipeline, providing functions for painless repertoire file parsing and publication-ready plot making. We will be happy to help you to integrate the new package into your pipelines. Please do not hesitate to contact us via emails on https://immunarch.com/ or via issues on https://github.com/immunomind/immunarch, should any question arise.

Sincerely, immunarch dev team and Vadim I. Nazarov, lead developer

tcR is a platform designed for TCR and Ig repertoire data analysis in R after preprocessing data with software tools for CDR3 extraction and gene segments aligning (MiTCR, MiXCR, MiGEC, ImmunoSEQ, IMSEQ, etc.). With the power and flexibility of R language and procedures supported by tcR users can perform advanced statistical analysis of TCR and Ig repertoires. The package was published in BMC Bioinformatics, please cite if you use it:

Nazarov et al., tcR: an R package for T cell receptor repertoire advanced data analysis

The project was developed mainly in the Laboratory of Comparative and Functional Genomics.

Copy Link

Version

Install

install.packages('tcR')

Monthly Downloads

141

Version

2.3.2

License

Apache License 2.0

Maintainer

Last Published

June 9th, 2020

Functions in tcR (2.3.2)

beta.prob

List with assembling probabilities of beta chain TCRs.
apply.symm

Apply function to every pair of data frames from a list.
cloneset.stats

MiTCR data frame basic statistics.
barcodes.to.reads

Rearrange columns with counts for clonesets.
AA_TABLE

Tables with genetic code.
bootstrap.tcr

Bootstrap for data frames in package tcR.
assymetry

Normalised log assymetry.
check.distribution

Check for adequaty of distrubution.
codon.variants

Functions for working with aminoacid sequences.
cosine.similarity

Set and vector similarity measures.
.add.legend

Internal function. Add legend to a grid of plots and remove legend from all plots of a grid.
.column.choice

Choose the right column.
.fix.listnames

Fix names in lists.
entropy.seg

Repertoires' analysis using information measures applied to V- and J- segment frequencies.
find.similar.sequences

Find similar sequences.
convergence.index

Compute convergence characteristics of repertoires.
generate.tcr

Generate random nucleotide TCR sequences.
generate.kmers

Generate k-mers.
entropy

Information measures.
.verbose.msg

Print the given message if second parameter is a TRUE.
clonal.space.homeostasis

Clonal space homeostasis.
contamination.stats

Contamination filtering.
matrixSubgroups

Get all values from the matrix corresponding to specific groups.
column.summary

Columns statistics.
cosine.sharing

Shared repertoire analysis.
get.all.substrings

Get all substrings for the given sequence.
get.inframes

In-frame / out-of-frame sequences filter.
find.clonotypes

Find target clonotypes and get columns' value corresponded to that clonotypes.
fix.alleles

Fix alleles / genes by removing allele information / unnecessary colons.
kmer.profile

Profile of sequences of equal length.
inverse.simpson

Distribution evaluation.
gc.content

GC-content of a nucleotide sequences.
geneUsage

Gene usage.
matrixdiagcopy

Copy the up-triangle matrix values to low-triangle.
reverse.string

Reverse given character vector by the given n-plets.
get.kmers

Get kmers from sequences.
intersectClonesets

Intersection between sets of sequences or any elements.
get.deletions.alpha

Compute the number of deletions in MiTCR data frames.
has.class

Check if a given object has a given class.
permutDistTest

Monte Carlo permutation test for pairwise and one-vs-all-wise within- and inter-group differences in a set of repertoires.
pca2euclid

Compute the Euclidean distance among principal components.
sample.clones

Get a random subset from a data.frame.
repSave

Save tcR data frames to disk as text files or gzipped text files.
repOverlap

General function for the repertoire overlap evaluation.
kmer.table

Make and manage the table of the most frequent k-mers.
loglikelihood

Log-likelihood.
parse.folder

Parse input table files with immune receptor repertoire data.
set.people.vector

Set and get attributes of a mutation network related to source people.
set.pb

Simple functions for manipulating progress bars.
rarefaction

Diversity evaluation using rarefaction.
sample2D

Get a sample from matrix with probabilities.
permutedf

Shuffling data frames.
pca.segments

Perform PCA on segments frequency data.
ozScore

Overlap Z-score.
vis.group.boxplot

Boxplot for groups of observations.
group.clonotypes

Get all unique clonotypes.
mutation.network

Make mutation network for the given repertoire.
resample

Resample data frame using values from the column with number of clonesets.
mutated.neighbours

Get vertex neighbours.
gibbs.sampler

Gibbs Sampler.
vis.shared.clonotypes

Visualisation of shared clonotypes occurrences among repertoires.
segments.alphabets

Alphabets of TCR and Ig gene segments.
vis.top.proportions

Visualisation of top clones proportions.
parse.cloneset

Parse input table files with the immune receptor repertoire data.
vis.heatmap

Heatmap.
vis.kmer.histogram

Plot of the most frequent kmers.
vis.count.len

Plot a histogram of lengths.
shared.repertoire

Shared TCR repertoire managing and analysis
twinsdata

Twins alpha-beta chain data
vis.radarlike

Radar-like / spider-like plots.
repDiversity

General function for the repertoire diversity estimation.
set.rank

Set new columns "Rank" and "Index".
repLoad

Parse input files or folders with immune receptor repertoire data.
top.fun

Get samples from a repertoire slice-by-slice or top-by-top and apply function to them.
spectratype

Spectratype
revcomp

DNA reverse complementing and translation.
startmitcr

Start MiTCR directly from the package.
vis.gene.usage

Histogram of segments usage.
vis.logo

Logo - plots for amino acid and nucletide profiles.
vis.rarefaction

Rarefaction statistics visualisation.
vis.clonal.space

Visualise occupied by clones homeostatic space among Samples or groups.
vis.clonal.dynamics

Visualise clonal dynamics among time points.
segments.list

Segment data.
top.cross

Perform sequential cross starting from the top of a data frame.
tailbound.proportion

Proportions of specifyed subsets of clones.
set.group.vector

Set group attribute for vertices of a mutation network
vis.number.count

Plot a histogram of counts.
vis.pca

PCA result visualisation