View source: R/get_base_name.R
get_base_name | R Documentation |
A common task between generate_spike_fasta, rename_spikes, and rename_spike_seqlevels is to determine what the largest common subset of characters between existing contig names and stored standardized contigs might be. This function eases that task.
get_base_name(contig_names, sep = "_")
contig_names |
the names of contigs |
sep |
separator character in contig names ("_") |
a vector of elements 1:3 from each contig name
sb <- system.file("extdata", "example.spike.bam", package="spiky", mustWork=TRUE) bh <- scanBamHeader(BamFile(sb)) orig_contigs <- names(bh$targets) get_base_name(orig_contigs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.