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/plot.Rmd) and HTML (docs/plot.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/*"))
html 76c8918 Philipp Bayer 2021-04-15 Build site.
Rmd 49dcbb8 Philipp Bayer 2021-04-15 wflow_publish(files = list.files("analysis/", pattern = "*Rmd",
Rmd 9e449bb Philipp Bayer 2021-04-14 Add missing files
html 9e449bb Philipp Bayer 2021-04-14 Add missing files
html 9e91425 Philipp Bayer 2021-04-14 Build site.
Rmd fa39572 Philipp Bayer 2021-04-14 wflow_publish(c("analysis/plot.Rmd", "analysis/_site.yml", "analysis/index.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(wesanderson)
library(patchwork)

Attaching package: 'patchwork'
The following object is masked from 'package:cowplot':

    align_plots
# reps <- data.frame(
#   stringsAsFactors = FALSE,
#              Class = c("LINEs","LTRs","DNA",
#                        "Unclassified","Non-repetitive","LINEs","LTRs","DNA","Unclassified",
#                        "Non-repetitive","LINEs","LTRs","DNA","Unclassified",
#                        "Non-repetitive","LINEs","LTRs","DNA","Unclassified","Non-repetitive"),
#           Assembly = c("A. antarctica","A. antarctica",
#                        "A. antarctica","A. antarctica","A. antarctica","P. australis",
#                        "P. australis","P. australis","P. australis","P. australis","Z. marina",
#                        "Z. marina","Z. marina","Z. marina","Z. marina","Z. muelleri",
#                        "Z. muelleri","Z. muelleri","Z. muelleri","Z. muelleri"),
#                 BP = c(805898L,45776664L,37822890L,
#                        1546483L,158725395L,38319733L,611240734L,100034681L,
#                        37142931L,428369702L,3103364L,123623579L,27390818L,
#                        6060480L,96439714L,14331182L,164253396L,142828758L,
#                        21922574L,274954485L),
#            Percent = c(0.33,18.71,15.46,0.63,
#                        64.87131,3.15,50.3,8.23,3.06,35.25364,1.19,47.46,10.52,
#                        2.33,37.02,2.32,26.57,23.1,3.55,44.46)
# )


reps <- readxl::read_xlsx('./data/Repeat_coding.xlsx')

reps <- reps %>% dplyr::filter(Class != 'Total')
reps$Class <- factor(reps$Class, levels = c('LINEs', 'LTRs', 'DNA', 'Unclassified', 'Total CDS', 'Non-repetitive'))
reps
# A tibble: 24 x 4
   Class          Assembly             BP Percent
   <fct>          <chr>             <dbl>   <dbl>
 1 LINEs          A. antarctica    805898   0.329
 2 LTRs           A. antarctica  45776664  18.7  
 3 DNA            A. antarctica  37822890  15.5  
 4 Unclassified   A. antarctica   1546483   0.632
 5 Total CDS      A. antarctica  29544393  12.1  
 6 Non-repetitive A. antarctica 129181002  52.8  
 7 LINEs          P. australis   38319733   3.15 
 8 LTRs           P. australis  611240734  50.3  
 9 DNA            P. australis  100034681   8.23 
10 Unclassified   P. australis   37142931   3.06 
# ... with 14 more rows
pal <- wes_palette("Zissou1", 6, type = "continuous")
p1 <- reps %>% ggplot(aes(x=Assembly, fill=Class, y = BP/1000000)) + 
geom_bar(position='stack', stat='identity') + ylab('Size (Mbp)') +
  #scale_fill_brewer(palette='Dark2') +
  scale_fill_manual(values=pal) +  
  theme(axis.text.x =  element_text(face="italic"))
  
p1

p2 <- reps %>% ggplot(aes(x=Assembly, fill=Class, y = Percent)) + geom_bar(position='stack', stat='identity')+
  #scale_fill_brewer(palette='Dark2') +
    scale_fill_manual(values=pal) +  
  theme(axis.text.x =  element_text(face="italic")) +
  ylab('Percent\n of assembly')
p2

patch <- p1/p2 + plot_annotation(tag_levels = 'A')
patch[[1]] = patch[[1]] + theme(axis.text.x = element_blank(),
                                        axis.ticks.x = element_blank(),
                                        axis.title.x = element_blank() )

patch

reps %>% filter(Class=='Non-repetitive') %>% ggplot(aes(x=Assembly, fill=Class, y = BP)) + geom_bar(position='stack', stat='identity')


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] patchwork_1.1.1    wesanderson_0.3.6  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] Rcpp_1.0.7       lubridate_1.7.10 assertthat_0.2.1 rprojroot_2.0.2 
 [5] digest_0.6.28    utf8_1.2.2       R6_2.5.1         cellranger_1.1.0
 [9] backports_1.2.1  reprex_2.0.1     evaluate_0.14    highr_0.9       
[13] httr_1.4.2       pillar_1.6.3     rlang_0.4.11     readxl_1.3.1    
[17] rstudioapi_0.13  whisker_0.4      jquerylib_0.1.4  rmarkdown_2.11  
[21] labeling_0.4.2   munsell_0.5.0    broom_0.7.9      compiler_4.1.1  
[25] httpuv_1.6.3     modelr_0.1.8     xfun_0.26        pkgconfig_2.0.3 
[29] htmltools_0.5.2  tidyselect_1.1.1 fansi_0.5.0      crayon_1.4.1    
[33] tzdb_0.1.2       dbplyr_2.1.1     withr_2.4.2      later_1.3.0     
[37] grid_4.1.1       jsonlite_1.7.2   gtable_0.3.0     lifecycle_1.0.1 
[41] DBI_1.1.1        git2r_0.28.0     magrittr_2.0.1   scales_1.1.1    
[45] cli_3.0.1        stringi_1.7.5    farver_2.1.0     fs_1.5.0        
[49] promises_1.2.0.1 xml2_1.3.2       ellipsis_0.3.2   generics_0.1.0  
[53] vctrs_0.3.8      tools_4.1.1      glue_1.4.2       hms_1.1.1       
[57] fastmap_1.1.0    yaml_2.2.1       colorspace_2.0-2 rvest_1.0.1     
[61] knitr_1.36       haven_2.4.3