1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/shared.R
\name{shared.repertoire}
\alias{shared.repertoire}
\alias{shared.matrix}
\title{Shared TCR repertoire managing and analysis}
\usage{
shared.repertoire(.datalist, .type = 'avrc', .min.ppl = 1, .head = -1,
.clear = T, .verbose = T, .by.col = '', .sum.col = '',
.max.ppl = length(.datalist))
shared.matrix(.shared.rep)
}
\arguments{
\item{.datalist}{List with data frames.}
\item{.type}{String of length 4 denotes how to create a shared repertoire. See "Details" for
more information. If supplied, than parameters \code{.by.col} and \code{.sum.col} will be ignored. If not supplied, than columns
in \code{.by.col} and \code{.sum.col} will be used.}
\item{.min.ppl}{At least how many people must have a sequence to leave this sequence in the shared repertoire.}
\item{.head}{Parameter for the \code{head} function, applied to all data frames before clearing.}
\item{.clear}{if T then remove all sequences which have symbols "~" or "*" (i.e., out-of-frame sequences for amino acid sequences).}
\item{.verbose}{if T then output progress.}
\item{.by.col}{Character vector with names of columns with sequences and their parameters (like segment) for using for creating a shared repertoire.}
\item{.sum.col}{Character vector of length 1 with names of the column with count, percentage or any other numeric chaaracteristic of sequences for using for creating a shared repertoire.}
\item{.max.ppl}{At most how many people must have a sequence to leave this sequence in the shared repertoire.}
\item{.shared.rep}{Shared repertoire.}
}
\value{
Data frame for \code{shared.repertoire}, matrix for \code{shared.matrix}.
}
\description{
Generate a repertoire of shared sequences - sequences presented in more than one subject. If sequence is appeared more than once in the one
repertoire, than only the first appeared one will be choosed for a shared repertoire.
\code{shared.repertoire} - make a shared repertoire of sequences from the given list of data frames.
\code{shared.matrix} - leave columns, which related to the count of sequences in people, and return them as a matrix.
I.e., this functions will remove such columns as 'CDR3.amino.acid.sequence', 'V.gene', 'People'.
}
\details{
Parameter \code{.type} is a string of length 4, where:
\enumerate{
\item First character stands either for the letter 'a' for taking the "CDR3.amino.acid.sequence" column or
for the letter 'n' for taking the "CDR3.nucleotide.sequence" column.
\item Second character stands whether or not take the V.gene column. Possible values are '0' (zero) stands
for taking no additional columns, 'v' stands for taking the "V.gene" column.
\item Third character stands for using either UMIs or reads in choosing the column with numeric characterisitc (see the next letter).
\item Fourth character stands for name of the column to choose as numeric characteristic of sequences. It depends on the third letter. Possible values are
"c" for the "Umi.count" (if 3rd character is "u") / "Read.count" column (if 3rd character is "r"), "p" for the "Umi.proportion" / "Read.proportion" column, "r" for the "Rank" column or "i" for the "Index" column.
If "Rank" or "Index" isn't in the given repertoire, than it will be created using \code{set.rank} function using "Umi.count" / "Read.count" column.
}
}
\examples{
\dontrun{
# Set "Rank" column in data by "Read.count" column.
# This is doing automatically in shared.repertoire() function
# if the "Rank" column hasn't been found.
immdata <- set.rank(immdata)
# Generate shared repertoire using "CDR3.amino.acid.sequence" and
# "V.gene" columns and with rank.
imm.shared.av <- shared.repertoire(immdata, 'avrc')
}
}
\seealso{
\link{shared.representation}, \link{set.rank}
}
|