Last updated: 2023-04-05

Checks: 7 0

Knit directory: GlobalStructure/

This reproducible R Markdown analysis was created with workflowr (version 1.7.0). 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(20230404) 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 baf2fd4. 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:    .Rproj.user/
    Ignored:    1_Raw/.DS_Store
    Ignored:    2_Derived/.DS_Store
    Ignored:    3_Results/.DS_Store
    Ignored:    renv/library/
    Ignored:    renv/staging/

Unstaged changes:
    Modified:   3_Results/SlipAndJump.HomologyAndRepeats.txt
    Modified:   3_Results/heatmap_folding_stability.svg
    Modified:   3_Results/heatmap_global_folding_sw100.pdf
    Modified:   3_Results/heatmap_microhomology_AIC.pdf
    Modified:   3_Results/heatmap_microhomology_AIC_wt_deledions.svg
    Modified:   3_Results/methods/packages.bib
    Modified:   3_Results/violin_rep_center_release.pdf
    Modified:   3_Results/violin_rep_flanked_length_release.pdf
    Modified:   3_Results/violin_rep_folding_infsign_np.pdf
    Modified:   3_Results/violin_rep_folding_infsign_p.pdf

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/MitoBreakDeletionsAndOrlovRepeats.Rmd) and HTML (docs/MitoBreakDeletionsAndOrlovRepeats.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 baf2fd4 Evgenii O. Tretiakov 2023-04-05 Start workflowr project.

1: READ MITOBREAK AND KEEP ONLY MAJOR ARC DELETIONS:

breaks <- read.table(
  here(
    raw_dir, 
    "MitoBreakDB_12122019.csv"),
  sep = ',',
  header = TRUE)
breaks$X5..breakpoint <-
  as.numeric(as.character(breaks$X5..breakpoint))
summary(breaks$X5..breakpoint)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
     83    6165    7668    7135    8562   16266       1 
breaks$X3..breakpoint <-
  as.numeric(as.character(breaks$X3..breakpoint))
summary(breaks$X3..breakpoint)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
     24   13787   15075   14349   16035   16599       1 
breaks <- breaks[!is.na(breaks$X3..breakpoint) &
                   !is.na(breaks$X5..breakpoint),]
par(mfrow = c(2, 1))
hist(breaks$X5..breakpoint, breaks = seq(0, 16600, 100))
hist(breaks$X3..breakpoint, breaks = seq(0, 16600, 100))

nrow(breaks)
[1] 1312
breaks = breaks[breaks$Deletion.of.replication.origins == 'None', ]
nrow(breaks)
[1] 1110
breaks = breaks[breaks$Location.of.the.deleted.region == 'Inside the major arc', ]
nrow(breaks)
[1] 1082
summary(breaks$X5..breakpoint)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
    105    7117    7976    8063    8661   16164 
summary(breaks$X3..breakpoint)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
     24   13801   15078   14551   16006   16599 
hist(breaks$X5..breakpoint, breaks = seq(0, 16600, 100))
hist(breaks$X3..breakpoint, breaks = seq(0, 16600, 100))

# OH: 110-441
# OL: 5721-5781
for (i in 1:nrow(breaks))
{
  if (breaks$X5..breakpoint[i] < 110) {
    breaks$X5..breakpoint[i] = breaks$X5..breakpoint[i] + 16569
  }
  if (breaks$X3..breakpoint[i] < 110) {
    breaks$X3..breakpoint[i] = breaks$X3..breakpoint[i] + 16569
  }
}
summary(breaks$X5..breakpoint)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
    306    7119    7980    8078    8662   16674 
summary(breaks$X3..breakpoint)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
    112   13806   15109   14581   16030   16654 
nrow(breaks)
[1] 1082
breaks = breaks[breaks$X5..breakpoint > 5781 &
                  breaks$X3..breakpoint > 5781, ]
nrow(breaks)
[1] 1060
summary(breaks$X5..breakpoint)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   5782    7127    7980    8097    8663   16164 
summary(breaks$X3..breakpoint)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   6025   13826   15145   14741   16035   16654 
hist(breaks$X5..breakpoint, breaks = seq(0, 16700, 100))
hist(breaks$X3..breakpoint, breaks = seq(0, 16700, 100))

2: read Orlovs’s direct perfect repeats

Rep <- read.table(
  here(raw_dir, "Homo_sapiens.input.out4out.SecondPart"),
  header = TRUE,
  sep = '\t'
) # 767
Rep <- Rep[Rep$RepName == 'Direct_repeat', ] # 330
Rep$RepStart <- as.numeric(as.character(Rep$RepStart))
Rep$RepEnd <- as.numeric(as.character(Rep$RepEnd))

Rep <- Rep[Rep$RepStart > 5781 &
            Rep$RepStart < 16569 &
            Rep$RepEnd > 5781 & Rep$RepEnd < 16569, ] # 171

3: plot repeats and breakpoints

par(mfrow=c(1,1))
plot(breaks$X5..breakpoint,breaks$X3..breakpoint,xlim = c(5781,16569), ylim=c(16569,5781), col = rgb(0.5,0.5,0.5,0.2), pch = 16, xlab = '5\'breakpoint',  ylab = '3\'breakpoint')
par(new= TRUE)
plot(Rep$RepEnd,Rep$RepStart, xlim = c(5781,16569), ylim=c(16569,5781), col = rgb(1,0.1,0.1,0.5), pch = 16, xlab = '5\'breakpoint',  ylab = '3\'breakpoint')
legend(12000, 8000, c('deletions','repeats'), col=c(rgb(0.5,0.5,0.5,0.5),rgb(1,0.1,0.1,0.5)), pch = 16)


sessionInfo()
R version 4.2.2 (2022-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.1 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

other attached packages:
 [1] here_1.0.1      lubridate_1.9.2 forcats_1.0.0   stringr_1.5.0  
 [5] dplyr_1.1.1     purrr_1.0.1     readr_2.1.4     tidyr_1.3.0    
 [9] tibble_3.2.1    ggplot2_3.4.2   tidyverse_2.0.0 workflowr_1.7.0

loaded via a namespace (and not attached):
 [1] tidyselect_1.2.0 xfun_0.38        bslib_0.4.2      colorspace_2.1-0
 [5] vctrs_0.6.1      generics_0.1.3   htmltools_0.5.5  yaml_2.3.7      
 [9] utf8_1.2.3       rlang_1.1.0      jquerylib_0.1.4  later_1.3.0     
[13] pillar_1.9.0     glue_1.6.2       withr_2.5.0      lifecycle_1.0.3 
[17] munsell_0.5.0    gtable_0.3.3     evaluate_0.20    knitr_1.42      
[21] tzdb_0.3.0       callr_3.7.3      fastmap_1.1.1    httpuv_1.6.9    
[25] ps_1.7.4         fansi_1.0.4      highr_0.10       Rcpp_1.0.10     
[29] renv_0.17.2      promises_1.2.0.1 scales_1.2.1     cachem_1.0.7    
[33] jsonlite_1.8.4   fs_1.6.1         hms_1.1.3        digest_0.6.31   
[37] stringi_1.7.12   processx_3.8.0   getPass_0.2-2    rprojroot_2.0.3 
[41] grid_4.2.2       cli_3.6.1        tools_4.2.2      magrittr_2.0.3  
[45] sass_0.4.5       whisker_0.4.1    pkgconfig_2.0.3  timechange_0.2.0
[49] rmarkdown_2.21   httr_1.4.5       rstudioapi_0.14  R6_2.5.1        
[53] git2r_0.31.0     compiler_4.2.2