Last updated: 2021-10-07
Checks: 7 0
Knit directory: Amphibolis_Posidonia_Comparison/
This reproducible R Markdown analysis was created with workflowr (version 1.6.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.
Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.
Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.
The command set.seed(20210414)
was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.
Great job! Recording the operating system, R version, and package versions is critical for reproducibility.
Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.
Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.
Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.
The results in this page were generated with repository version 08b28ea. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.
Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish
or wflow_git_commit
). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:
Ignored files:
Ignored: .Rhistory
Ignored: .Rproj.user/
Ignored: analysis/OTT.nb.html
Ignored: analysis/plotGenes.nb.html
Ignored: analysis/plotRgenes.nb.html
Untracked files:
Untracked: Lost_GO_terms_in_five_species.PlantSpecific.xlsx
Untracked: Lost_GO_terms_in_five_species.xlsx
Untracked: data/BACKGROUND.txt
Untracked: data/Lost_GO_terms_in_five_species.PlantSpecific.xlsx
Untracked: data/Lost_GO_terms_in_five_species.xlsx
Untracked: data/R_genes.xlsx
Untracked: data/lost_in_amphi_GO.txt
Untracked: data/lost_in_posi_GO.txt
Untracked: data/lost_in_zmar_GO.txt
Untracked: data/lost_in_zmuel_GO.txt
Untracked: data/missing_amphi_vs_all_GO.txt
Untracked: data/missing_aquatics_GO.txt
Untracked: data/missing_arabidopsis_vs_all_GO.txt
Untracked: data/missing_posi_vs_all_GO.txt
Untracked: data/missing_seagrasses_GO.txt
Untracked: data/missing_zmar_vs_all_GO.txt
Untracked: data/missing_zmuel_vs_all_GO.txt
Untracked: data/only_in_amphi_GO.txt
Untracked: data/only_in_posi_GO.txt
Untracked: data/only_in_zmar_GO.txt
Untracked: data/only_in_zmuel_GO.txt
Untracked: data/only_seagrasses_GO.txt
Untracked: data/shared_lost_genes.xlsx
Untracked: data/species.txt
Untracked: species.csv
Untracked: whatever/
Unstaged changes:
Modified: data/Orthogroups.tsv
Deleted: data/Orthogroups_SpeciesOverlaps.tsv
Modified: data/Species_timetree.svg
Modified: data/species.csv
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.
These are the previous versions of the repository in which changes were made to the R Markdown (analysis/Orthofinder.Rmd
) and HTML (docs/Orthofinder.html
) files. If you’ve configured a remote Git repository (see ?wflow_git_remote
), click on the hyperlinks in the table below to view the files as they were in that past version.
File | Version | Author | Date | Message |
---|---|---|---|---|
Rmd | 08b28ea | Philipp Bayer | 2021-10-07 | wflow_publish(files = c("analysis/*")) |
Rmd | f67a752 | Philipp Bayer | 2021-04-15 | Missing commits |
html | f67a752 | Philipp Bayer | 2021-04-15 | Missing commits |
html | 76c8918 | Philipp Bayer | 2021-04-15 | Build site. |
Rmd | 49dcbb8 | Philipp Bayer | 2021-04-15 | wflow_publish(files = list.files("analysis/", pattern = "*Rmd", |
library(tidyverse)
-- Attaching packages --------------------------------------- tidyverse 1.3.1 --
v ggplot2 3.3.5 v purrr 0.3.4
v tibble 3.1.5 v dplyr 1.0.7
v tidyr 1.1.4 v stringr 1.4.0
v readr 2.0.2 v forcats 0.5.1
-- Conflicts ------------------------------------------ tidyverse_conflicts() --
x dplyr::filter() masks stats::filter()
x dplyr::lag() masks stats::lag()
library(cowplot)
theme_set(theme_cowplot())
library(RColorBrewer)
library(patchwork)
Attaching package: 'patchwork'
The following object is masked from 'package:cowplot':
align_plots
library(UpSetR)
groups <- read_tsv('./data/Orthogroups.tsv')
Rows: 31136 Columns: 20
-- Column specification --------------------------------------------------------
Delimiter: "\t"
chr (20): Orthogroup, Amphibolis_final.genome.scf.bigger1kbp.all.maker.prote...
i Use `spec()` to retrieve the full column specification for this data.
i Specify the column types or set `show_col_types = FALSE` to quiet this message.
names(groups) <- c('Orthogroup', 'A. antarctica', 'A. trichopada', 'B. distachyon', 'C. reinhardtii', 'L. gibba', 'O. sativa', 'P. australis', 'P. patens', 'P. trichocarpa', 'S. moellendorffii', 'S. polyrhiza', 'A. thaliana', 'T. parvula', 'V. vinifera', 'Z. mays', 'Z. muelleri', 'Z. marina', 'O. lucimarinus', 'W. australis')
# for upsetr, we need to know only which OG-groups are shared between species, the actual genes don't matter
per_spec <- groups %>% pivot_longer(-Orthogroup) %>%
filter(!is.na(value)) %>% # species not in an orthogroup are still listed, they just have NA genes for this group
select(-value) # don't need all gene names, speed things up
# now I want the data in this format:
# listInput <- list(one = c(1, 2, 3, 5, 7, 8, 11, 12, 13), two = c(1, 2, 4, 5,
# 10), three = c(1, 5, 6, 7, 8, 9, 10, 12, 13))
x <- per_spec %>%
select(name, Orthogroup) %>% # turn the table around
deframe() # convert to named vector
mylist <- lapply(split(x, names(x)), unname) # yuck - ugly code to convert the named vector to a list
x <- upset(fromList(mylist), order.by='freq', nsets = length(groups) - 1)
x
Let’s get the species-only cluster numbers
species_specific_orthos <- per_spec %>%
group_by(Orthogroup) %>%
summarise(counts = length(name)) %>%
filter(counts == 1)
per_spec %>%
filter(Orthogroup %in% species_specific_orthos$Orthogroup) %>%
group_by(name) %>%
count() %>%
arrange(n) %>%
knitr::kable()
name | n |
---|---|
A. antarctica | 74 |
S. polyrhiza | 155 |
O. lucimarinus | 198 |
L. gibba | 267 |
P. australis | 267 |
T. parvula | 273 |
Z. marina | 322 |
P. trichocarpa | 485 |
A. thaliana | 489 |
B. distachyon | 507 |
Z. muelleri | 619 |
V. vinifera | 682 |
A. trichopada | 848 |
W. australis | 1006 |
C. reinhardtii | 1105 |
Z. mays | 1108 |
S. moellendorffii | 1334 |
O. sativa | 1419 |
P. patens | 1568 |
How many orthogroups are shared between the four seagrasses?
newlist <- mylist[c('A. antarctica', 'Z. marina', 'P. australis', 'Z. muelleri')]
x <- upset(fromList(newlist), order.by='freq', nsets = 4)
x
sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17134)
Matrix products: default
locale:
[1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252
[3] LC_MONETARY=English_Australia.1252 LC_NUMERIC=C
[5] LC_TIME=English_Australia.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] UpSetR_1.4.0 patchwork_1.1.1 RColorBrewer_1.1-2 cowplot_1.1.1
[5] forcats_0.5.1 stringr_1.4.0 dplyr_1.0.7 purrr_0.3.4
[9] readr_2.0.2 tidyr_1.1.4 tibble_3.1.5 ggplot2_3.3.5
[13] tidyverse_1.3.1 workflowr_1.6.2
loaded via a namespace (and not attached):
[1] httr_1.4.2 bit64_4.0.5 vroom_1.5.5 jsonlite_1.7.2
[5] modelr_0.1.8 assertthat_0.2.1 highr_0.9 cellranger_1.1.0
[9] yaml_2.2.1 pillar_1.6.3 backports_1.2.1 glue_1.4.2
[13] digest_0.6.28 promises_1.2.0.1 rvest_1.0.1 colorspace_2.0-2
[17] htmltools_0.5.2 httpuv_1.6.3 plyr_1.8.6 pkgconfig_2.0.3
[21] broom_0.7.9 haven_2.4.3 scales_1.1.1 whisker_0.4
[25] later_1.3.0 tzdb_0.1.2 git2r_0.28.0 generics_0.1.0
[29] farver_2.1.0 ellipsis_0.3.2 withr_2.4.2 cli_3.0.1
[33] magrittr_2.0.1 crayon_1.4.1 readxl_1.3.1 evaluate_0.14
[37] fs_1.5.0 fansi_0.5.0 xml2_1.3.2 tools_4.1.1
[41] hms_1.1.1 lifecycle_1.0.1 munsell_0.5.0 reprex_2.0.1
[45] compiler_4.1.1 jquerylib_0.1.4 rlang_0.4.11 grid_4.1.1
[49] rstudioapi_0.13 labeling_0.4.2 rmarkdown_2.11 gtable_0.3.0
[53] DBI_1.1.1 R6_2.5.1 gridExtra_2.3 lubridate_1.7.10
[57] knitr_1.36 fastmap_1.1.0 bit_4.0.4 utf8_1.2.2
[61] rprojroot_2.0.2 stringi_1.7.5 parallel_4.1.1 Rcpp_1.0.7
[65] vctrs_0.3.8 dbplyr_2.1.1 tidyselect_1.1.1 xfun_0.26