Description Usage Arguments Value Note Author(s) Examples
View source: R/separate_genes.R
Separate genes and operons mentioned in full text into multiple rows
1 2 | separate_genes(txt, pattern = "\\b[A-Za-z][a-z]{2}[A-Z0-9]+\\b",
genes, operon = 6, column = "text")
|
txt |
a table |
pattern |
regular expression to match genes, default is to match microbial genes like AbcD, default [A-Za-z][a-z]2[A-Z0-9]+ |
genes |
an optional vector of genes, set pattern to NA to only match this list. |
operon |
operon length, default 6. Split genes with 6 or more letters into separate genes, for example AbcDEF is split into abcD, abcE and abcF. |
column |
column name to search, default "text" |
a tibble with gene name, matching text and rows.
Check for genes in italics using xml_text(xml_find_all(doc,
"//sec//p//italic"))
and update the pattern or add additional genes as an
optional vector if needed
Chris Stubben
1 2 3 | x <- data.frame(row = 1, text = "Genes like YacK, hmu and sufABC")
separate_genes(x)
separate_genes(x, genes = "hmu")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.