knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "inst/vignette-supp/",
  echo=TRUE, 
  warning=FALSE, 
  message=FALSE,
  tidy=TRUE
)
knitr::include_graphics("inst/vignette-supp/rPineconeLogo_full.png")

rPinecone defines sub-lineages within a bacterial clonal expansion via a phylogenetic tree.

Installation

rPinecone is currently available on github. It can be installed with devtools

install.packages("devtools")

devtools::install_github("alexwailan/rpinecone")

Quick Start

Run rPinecone

# devtools::install_github("alexwailan/rpinecone")
library(rPinecone)
library(ape)

tree.file.name <- system.file("extdata", "pyjar.staph_ST2371_45_re_itol_7079_1_6_root.joint.tre", package = "rPinecone")
tree <- ape::read.tree(tree.file.name)
results <- pinecone(tree, 2, 3, quiet = TRUE)
intro_rmd <- 'vignettes/introduction.Rmd'

raw_rmd <- readLines(intro_rmd)

# remove yaml 
yaml_lines <- grep("---", raw_rmd)

# remove appendix (session info)
appendix <- grep("Appendix", raw_rmd)

compressed_rmd <- raw_rmd[c(-seq(yaml_lines[1], yaml_lines[2], by = 1), 
                            -seq(appendix, length(raw_rmd)))]
writeLines(compressed_rmd, "child.Rmd")

if (file.exists("child.Rmd")) {
  file.remove("child.Rmd")
}


alexwailan/maria documentation built on Sept. 29, 2020, 9:37 a.m.