Description Usage Arguments Value Author(s) See Also Examples
View source: R/auto_annotate.R
Annotate dna_segs in a smart way. This is especially designed for
dna_seg
s read from genbank or embl files, but can be extended for
other uses. In short, it produces annotations from dna_seg
s, grouping
the tags for operons (atpA, atpB, atC) into one tag (atpA-C), and
similarly for numbered genes (bep1-9).
1 2 |
dna_seg |
A |
locus_tag_pattern |
|
names |
A character vector with as many elements as there are rows in the
|
keep_genes_only |
A logical, |
... |
Further arguments to be passed to |
An annotation
object.
Lionel Guy
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Prepare dna_seg
names <- paste("Eco", sprintf("%04d", 1:20), sep="")
gene <- c("-", "atpC", "atpB", "atpA", "atp2",
"-", "-", "cda1", "cda2", "cda3",
"vcx23", "vcx22", "vcx21", "cde20",
"-", "gfrU", "gfrT", "gfrY", "gfrX", "gfrW")
ds <- dna_seg(data.frame(name=names, start=(1:20)*3, end=(1:20)*3+2,
strand=rep(1, 20), gene=gene,
stringsAsFactors=FALSE))
## Original annotation
annot1 <- annotation(x1=middle(ds), text=ds$gene, rot=30)
## auto_annotate with various options
annot2 <- auto_annotate(ds)
annot3 <- auto_annotate(ds, keep_genes_only=FALSE, rot=45)
annot4 <- auto_annotate(ds, keep_genes_only=FALSE,
locus_tag_pattern="Eco", col="red")
## Plot
plot_gene_map(list(ds, ds, ds, ds),
annotations=list(annot1, annot2, annot3, annot4))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.