forked from franciscolobo/KOMODO2
/
CALANGO_examples.Rmd
57 lines (42 loc) · 2.19 KB
/
CALANGO_examples.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
title: "CALANGO Examples"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{CALANGO Examples}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
<img src="https://github.com/fcampelo/CALANGO/raw/master/inst/images/CALANGO_LOGO.svg" height="150" alt="CALANGO logo. Drawn by Brazilian artist Berze - https://www.facebook.com/berzearte">
Some examples of CALANGO output are available under `docs/articles/results` in the [CALANGO Github repository](https://github.com/fcampelo/CALANGO), and their output pages are linked below.
- **Example 1** relates to the case study "*Homologous regions and biological roles associated with prophage density in pathogenic and free-living _Escherichia coli_*".
- **Example 2** relates to the case study *Homologous regions associated with maximum height in Angiosperms*.
Both examples are presented as part of the manuscript _CALANGO: a phylogeny-aware comparative genomics tool for discovering quantitative genotype-phenotype associations across species_. Please navigate to one of the links below to check the examples:
```{r, results="asis", echo=FALSE}
dirs <- dir("../docs/articles/results/")
cat("\n<br/><ul><br/>")
for (i in seq_along(dirs)){
url <- paste0("results/", dirs[i], "/index.html")
txt <- gsub("_", "-", dirs[i], fixed = TRUE)
cat(paste0('\n<li> <a href="', url, '" target="_blank">', txt, "</a></li><br/>"))
}
cat("</ul><br/>")
```
These examples can be independently reproduced by running the script below.
After running `CALANGO::retrieve_data_files()`, the main input files (which can be
used as templates for other studies) will be located under subfolder `/parameters`.
```{r, eval=FALSE}
install.packages("CALANGO")
library(CALANGO)
# Change target.dir to save under a different folder if needed
target.dir <- "data"
# Change to increase number of cores.
ncores <- 1
CALANGO::retrieve_data_files(target.dir)
# Get CALANGO input files for the examples
inputfiles <- dir(paste0(target.dir, "/parameters"), full.names = TRUE)
# run for all example files
for (i in seq_along(inputfiles)){
cat("\nProcessing example", i, "of", length(inputfiles), "\n")
defs <- CALANGO::run_CALANGO(inputfiles[i], cores = ncores)
}
```