Description Usage Arguments Details Value See Also Examples
Create a table count of clonotypes or other features
1 2 3 |
libs |
A character vector containing the name of one or many libraries. Same names must not appear twice. If no library names are provided, all the libraries present in the clonotypes data frame will be used. |
feats |
What to count. By default, it counts clonotypes, defined as
|
data |
Data frame as loaded by |
filter |
Logical vector to filter out clonotypes. By default it relies on the clonotypes data frame to provide a “unproductive” column that indicates clonotypes with a stop codon or a frame shift, and a “ambiguous” column that indicates clonotypes where the DNA sequences has ambiguous (“N”) nucleotides. |
minscore |
Minimum alignment score. Clonotypes with an alignment score lower than this value are discarded. |
minqual |
Minimum mapping quality. Clonotypes with a mapping quality lower than this value are discarded. |
sample |
Indicate the number of clonotypes to randomly sample from the library (no replacement). Default: no |
Using a clonotype data frame loaded with read_clonotypes
,
clonotype_table
will create a table counting how many times each
clonotypes have been seen in each libraries. By default, the unproductive
rearrangements are filtered out.
clonotype_table
returns a data frame, where row names are
features (clonotypes, segment names, ...), column names are libraries, and
values are number of times each feature was found in each library.
1 2 3 4 5 6 7 8 9 10 11 | # Read the package's example data
clonotypes <- read_clonotypes(system.file('extdata', 'clonotypes.txt.gz', package = "clonotypeR"))
# Inspect the alignment scores
hist(clonotypes$score)
# Count J segments
j <- clonotype_table(levels(clonotypes$lib), "J", data=clonotypes)
# Normalise counts in parts per million
J <- data.frame(prop.table(as.matrix(j),2) * 1000000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.