fancy_name_contigs: Generate a legible name for a series of contigs

Description Usage Arguments Value Examples

View source: R/vdjcellranger-methods.R

Description

Generate a legible name for a series of contigs

Usage

1
fancy_name_contigs(contig_tbl, prefix)

Arguments

contig_tbl

An all_contig_annotations.csv file, output from VDJ Cell ranger. Importantly, this should contain columns chain, v_gene, d_gene, j_gene

prefix

an optional prefix added to each contig, eg, possibly a sample id.

Value

character

Examples

1
2
3
4
5
6
7
library(dplyr)
contig_anno_path = system.file('extdata', 'all_contig_annotations_balbc_1.csv.xz',
    package = 'CellaRepertorium')
contig_anno = readr::read_csv(contig_anno_path)
contig_anno = contig_anno %>% mutate(fancy_name =
    fancy_name_contigs(., prefix = 'b6_1'))
stopifnot(!any(duplicated(contig_anno$fancy_name)))

CellaRepertorium documentation built on Nov. 8, 2020, 7:48 p.m.