Last updated: 2021-04-14

Checks: 7 0

Knit directory: Amphibolis_Posidonia_Comparison/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2.9000). 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 fa39572. 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/

Untracked files:
    Untracked:  data/Repeat_coding.xlsx
    Untracked:  data/Species_timetree.svg
    Untracked:  data/species.csv
    Untracked:  data/timetree_species.nwk
    Untracked:  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 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.0 --
v ggplot2 3.3.2     v purrr   0.3.4
v tibble  3.0.2     v dplyr   1.0.0
v tidyr   1.1.0     v stringr 1.4.0
v readr   1.3.1     v forcats 0.5.0
-- Conflicts ---------------------------------------------------------------------------------------------------------------------- tidyverse_conflicts() --
x dplyr::filter() masks stats::filter()
x dplyr::lag()    masks stats::lag()
library(cowplot)

********************************************************
Note: As of version 1.0.0, cowplot does not change the
  default ggplot2 theme anymore. To recover the previous
  behavior, execute:
  theme_set(theme_cowplot())
********************************************************
theme_set(theme_cowplot())
library(RColorBrewer)
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
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') +
  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') +
  theme(axis.text.x =  element_text(face="italic")) +
  ylab('Percent\n of assembly')
p2

p1/p2 + plot_annotation(tag_levels = 'A')

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


sessionInfo()
R version 3.6.3 (2020-02-29)
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.0.0      RColorBrewer_1.1-2   cowplot_1.0.0       
 [4] forcats_0.5.0        stringr_1.4.0        dplyr_1.0.0         
 [7] purrr_0.3.4          readr_1.3.1          tidyr_1.1.0         
[10] tibble_3.0.2         ggplot2_3.3.2        tidyverse_1.3.0     
[13] workflowr_1.6.2.9000

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.5       lubridate_1.7.9  lattice_0.20-41  getPass_0.2-2   
 [5] ps_1.3.4         utf8_1.1.4       assertthat_0.2.1 rprojroot_1.3-2 
 [9] digest_0.6.25    R6_2.4.1         cellranger_1.1.0 backports_1.1.10
[13] reprex_0.3.0     evaluate_0.14    httr_1.4.2       pillar_1.4.4    
[17] rlang_0.4.7      readxl_1.3.1     rstudioapi_0.11  whisker_0.4     
[21] callr_3.4.4      blob_1.2.1       rmarkdown_2.3    labeling_0.3    
[25] munsell_0.5.0    broom_0.5.6      compiler_3.6.3   httpuv_1.5.4    
[29] modelr_0.1.8     xfun_0.17        pkgconfig_2.0.3  htmltools_0.5.0 
[33] tidyselect_1.1.0 fansi_0.4.1      crayon_1.3.4     dbplyr_1.4.4    
[37] withr_2.2.0      later_1.1.0.1    grid_3.6.3       nlme_3.1-148    
[41] jsonlite_1.7.1   gtable_0.3.0     lifecycle_0.2.0  DBI_1.1.0       
[45] git2r_0.27.1     magrittr_1.5     scales_1.1.1     cli_2.0.2       
[49] stringi_1.5.3    farver_2.0.3     fs_1.5.0.9000    promises_1.1.1  
[53] xml2_1.3.2       ellipsis_0.3.1   generics_0.0.2   vctrs_0.3.1     
[57] tools_3.6.3      glue_1.4.2       hms_0.5.3        processx_3.4.4  
[61] yaml_2.2.1       colorspace_1.4-1 rvest_0.3.5      knitr_1.29      
[65] haven_2.3.1