knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
Install from CRAN:
install.packages("TCRconvertR")
Examples of files you may want to load:
filtered_contig_annotations.csv
Sample_TCRB.tsv
MiXCR
or other toolslibrary(TCRconvertR) tcr_file <- get_example_path("tenx.csv") # Using built-in example file tcrs <- read.csv(tcr_file)[c("barcode", "v_gene", "j_gene", "cdr3")] tcrs
new_tcrs <- convert_gene(tcrs, frm = "tenx", to = "adaptive") new_tcrs
Tip: Suppress messages by setting
verbose = FALSE
. Warnings and errors will still appear.Tip: If your Adaptive data lacks
x_resolved
/xMaxResolved
columns, create them yourself by combining thex_gene
/xGeneName
andx_allele
/xGeneAllele
columns. See the FAQs.
Supply the standard AIRR gene column names to frm_cols
:
new_airr <- convert_gene(airr, frm = "imgt", to = "adaptive", frm_cols = c('v_call', 'd_call', 'j_call', 'c_call'))
By default, TCRconvertR
assumes these column names based on the input nomenclature (frm
):
frm = 'imgt'
: c('v_gene', 'd_gene', 'j_gene', 'c_gene')
frm = 'tenx'
: c('v_gene', 'd_gene', 'j_gene', 'c_gene')
frm = 'adaptive'
: c('v_resolved', 'd_resolved', 'j_resolved')
frm = 'adaptivev2'
: c('vMaxResolved', 'dMaxResolved', 'jMaxResolved')
You can override these columns using frm_cols
:
1. Load 10X data with custom column names
custom_file <- get_example_path("customcols.csv") custom <- read.csv(custom_file) custom
2. Specify names using frm_cols
and convert to IMGT
custom_new <- convert_gene( custom, frm = "tenx", to = "imgt", verbose = FALSE, frm_cols = c("myVgene", "myDgene", "myJgene", "myCgene"), ) custom_new
Use species = "rhesus"
or species = "mouse"
new_tcrs <- convert_gene( tcrs, frm = "tenx", to = "imgt", species = "rhesus", # or 'mouse' verbose = FALSE ) new_tcrs
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.