Before analysis

Before running this pipeline you should do next steps:

  1. Save your parsed MiTCR data to the immdata variable (it could be a mitcr data frame or a list).

    immdata <- parse.folder('/home/username/mitcrdata/')
  2. Save the immdata variable to the some folder as the .rda file.

    save(immdata, file = '/home/username/immdata.rda')
  3. In the code block below change the path string to the path to yours immdata.rda file. After that click the Knit HTML button to start analysis and the script will make a html report.

load('../data/twb.rda')
immdata <- twb[1:2]
library(tcR)
  1. Friendly advice: run the pipeline on the top N sequences first and configure sizes of figures.
N <- 50000
immdata <- head(immdata, N)

Data statistics

cloneset.stats(immdata)
##        #Nucleotide clones #Aminoacid clonotypes %Aminoacid clonotypes
## Subj.A              10000                  9850                0.9850
## Subj.B              10000                  9838                0.9838
##        #In-frames %In-frames #Out-of-frames %Out-of-frames Sum.reads
## Subj.A       9622     0.9622            346         0.0346   1410263
## Subj.B       9564     0.9564            400         0.0400   2251408
##        Min.reads 1st Qu.reads Median.reads Mean.reads 3rd Qu.reads
## Subj.A        22           26           33      141.0           57
## Subj.B        20           24           31      225.1           55
##        Max.reads
## Subj.A     81520
## Subj.B    171200
repseq.stats(immdata)
##        Clones Sum.reads Reads.per.clone
## Subj.A  10000   1410263          141.03
## Subj.B  10000   2251408          225.14

Segments’ statistics

V-segment usage

if (has.class(immdata, 'list')) {
  for (i in 1:length(immdata)) {
    plot(vis.gene.usage(immdata[[i]], HUMAN_TRBV, .main = paste0(names(immdata)[i], ' ', 'V-usage')))
  }
} else {
  vis.gene.usage(immdata, HUMAN_TRBV, .coord.flip=F)
}