Description Usage Arguments Value Examples
When adding gene annotation to genomic ranges, sometimes there are many genes associated with a single feature, so that compiling a table becomes awkward, if some rows contain hundreds of genes. This function takes a character vector of gene lists delimited by some separator and provides a compact representation of the gene labels
1 | compact.gene.list(x, n = 3, sep = ";", others = FALSE)
|
x |
is a character vector of gene label listings, where multiple hits are delimited by 'sep' |
n |
number of genes to list before abbreviating |
sep |
character, separator used to delimit genes in elements of x |
others |
logical, TRUE to abbreviate with '+ # others' or FALSE to append just the number of genes not listed. |
a character vector with the form: gene-1, gene-2, ..., gene-n, + length(gene-n) - n [others]
1 2 3 | my.genes <- c("ERAP1","HLA-C;CTLA4;IFIH","INS;MYC","AGAP1;APOE;DRDB1;FUT2;HCP5;BDNF;COMT")
compact.gene.list(my.genes)
compact.gene.list(my.genes,n=2,others=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.