Learn R Programming

⚠️There's a newer version (2.3.2) of this package.Take me there.

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. 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.

The mission of immunarch is to make immune repertoire data analysis as easy and possible - even with R. Please feel free to check it here: https://immunarch.com/

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

See tcR website for more information, manual and examples: http://imminfo.github.io/tcr/

If you have any questions, suggestions or bug reports, feel free to raise an issue here: https://github.com/imminfo/tcr/issues

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

Warning! tcR internally expects columns with nucleotide and amino acid CDR3 sequences and columns with gene segments to have character class, not factor class. Use stringsAsFactors=FALSE parameter if you use R functions for parsing files with tables (.csv, .xls and others).

Note for installation on Macs with OSX Yosemite (and potentially other versions): if you receive a compilation error, modify tcR/src/Makvars to:

CXX=clang++

Copy Link

Version

Install

install.packages('tcR')

Monthly Downloads

141

Version

2.2.4

License

Apache License 2.0

Maintainer

Last Published

March 25th, 2019

Functions in tcR (2.2.4)

check.distribution

Check for adequaty of distrubution.
clonal.space.homeostasis

Clonal space homeostasis.
column.summary

Columns statistics.
apply.symm

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

Tables with genetic code.
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.
generate.kmers

Generate k-mers.
contamination.stats

Contamination filtering.
generate.tcr

Generate random nucleotide TCR sequences.
has.class

Check if a given object has a given class.
gibbs.sampler

Gibbs Sampler.
group.clonotypes

Get all unique clonotypes.
intersectClonesets

Intersection between sets of sequences or any elements.
convergence.index

Compute convergence characteristics of repertoires.
ozScore

Overlap Z-score.
parse.cloneset

Parse input table files with the immune receptor repertoire data.
repOverlap

General function for the repertoire overlap evaluation.
cosine.sharing

Shared repertoire analysis.
assymetry

Normalised log assymetry.
entropy.seg

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

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

Shuffling data frames.
cloneset.stats

MiTCR data frame basic statistics.
rarefaction

Diversity evaluation using rarefaction.
codon.variants

Functions for working with aminoacid sequences.
pca2euclid

Compute the Euclidean distance among principal components.
repSave

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

Choose the right column.
barcodes.to.reads

Rearrange columns with counts for clonesets.
spectratype

Spectratype
sample2D

Get a sample from matrix with probabilities.
permutDistTest

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

Fix names in lists.
reverse.string

Reverse given character vector by the given n-plets.
beta.prob

List with assembling probabilities of beta chain TCRs.
startmitcr

Start MiTCR directly from the package.
bootstrap.tcr

Bootstrap for data frames in package tcR.
find.similar.sequences

Find similar sequences.
gc.content

GC-content of a nucleotide sequences.
fix.alleles

Fix alleles / genes by removing allele information / unnecessary colons.
.verbose.msg

Print the given message if second parameter is a TRUE.
entropy

Information measures.
vis.clonal.dynamics

Visualise clonal dynamics among time points.
vis.clonal.space

Visualise occupied by clones homeostatic space among Samples or groups.
geneUsage

Gene usage.
sample.clones

Get a random subset from a data.frame.
kmer.table

Make and manage the table of the most frequent k-mers.
get.all.substrings

Get all substrings for the given sequence.
loglikelihood

Log-likelihood.
tailbound.proportion

Proportions of specifyed subsets of clones.
segments.alphabets

Alphabets of TCR and Ig gene segments.
top.fun

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

Perform sequential cross starting from the top of a data frame.
vis.radarlike

Radar-like / spider-like plots.
get.inframes

In-frame / out-of-frame sequences filter.
get.deletions.alpha

Compute the number of deletions in MiTCR data frames.
twinsdata

Twins alpha-beta chain data
mutated.neighbours

Get vertex neighbours.
inverse.simpson

Distribution evaluation.
kmer.profile

Profile of sequences of equal length.
vis.kmer.histogram

Plot of the most frequent kmers.
matrixSubgroups

Get all values from the matrix corresponding to specific groups.
vis.logo

Logo - plots for amino acid and nucletide profiles.
vis.top.proportions

Visualisation of top clones proportions.
vis.shared.clonotypes

Visualisation of shared clonotypes occurrences among repertoires.
set.pb

Simple functions for manipulating progress bars.
set.people.vector

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

Copy the up-triangle matrix values to low-triangle.
get.kmers

Get kmers from sequences.
parse.folder

Parse input table files with immune receptor repertoire data.
repDiversity

General function for the repertoire diversity estimation.
pca.segments

Perform PCA on segments frequency data.
repLoad

Parse input files or folders with immune receptor repertoire data.
set.rank

Set new columns "Rank" and "Index".
vis.rarefaction

Rarefaction statistics visualisation.
mutation.network

Make mutation network for the given repertoire.
shared.repertoire

Shared TCR repertoire managing and analysis
revcomp

DNA reverse complementing and translation.
resample

Resample data frame using values from the column with number of clonesets.
vis.group.boxplot

Boxplot for groups of observations.
segments.list

Segment data.
set.group.vector

Set group attribute for vertices of a mutation network
vis.heatmap

Heatmap.
vis.pca

PCA result visualisation
vis.number.count

Plot a histogram of counts.
vis.count.len

Plot a histogram of lengths.
vis.gene.usage

Histogram of segments usage.