Last updated: 2020-11-24

Checks: 7 0

Knit directory: Workflowr_Array_GBRS/

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(20201114) 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 fd893f5. 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:


Untracked files:
    Untracked:  analysis/eqtl_with_perms/
    Untracked:  analysis/qtl2_data_process_GIGAMUGA358.R
    Untracked:  analysis/qtl2_data_process_MEGAMUGA184.R
    Untracked:  analysis/qtl2_data_process_MUGA275.R
    Untracked:  analysis/workflow_proc.R
    Untracked:  analysis/workflow_proc.err
    Untracked:  analysis/workflow_proc.out
    Untracked:  analysis/workflow_proc.sh
    Untracked:  code/GBRS2MUGA_sample_mismatch.R
    Untracked:  code/GBRS2MUGA_sample_mismatch_w.R
    Untracked:  code/cis_eqtl_scan.R
    Untracked:  code/combine.sample.aftermismatch.R
    Untracked:  code/comparison.R
    Untracked:  code/replace_ids.R
    Untracked:  code/violin_plot.R
    Untracked:  data/DO_Liver_sample_sheet.tsv
    Untracked:  data/DO_Striatum_sample_sheet.tsv
    Untracked:  data/marker_grid_0.02cM_plus.txt
    Untracked:  data/qtl2/
    Untracked:  output/DO_Striatum_recomb.GBRS.genotypes.RData
    Untracked:  output/DO_liver_recomb.GBRS.genotypes.RData
    Untracked:  output/DO_striatum_recomb.GBRS.genotypes.RData
    Untracked:  output/GBRS184.recomb.RData
    Untracked:  output/GBRS275.recomb.RData
    Untracked:  output/GBRS358.recomb.RData
    Untracked:  output/gene.anno.cis.RData
    Untracked:  output/gigamuga358.recomb.RData
    Untracked:  output/megamuga184.recomb.RData
    Untracked:  output/mismatch_autochr_gigamuga358GBRS.RData
    Untracked:  output/mismatch_autochr_megamuga184GBRS.RData
    Untracked:  output/mismatch_autochr_muga275GBRS.RData
    Untracked:  output/mismatch_gigamuga358GBRS.RData
    Untracked:  output/mismatch_megamuga184GBRS.RData
    Untracked:  output/mismatch_muga275GBRS.RData
    Untracked:  output/muga275.recomb.RData

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/Figure6_fullset_trans.Rmd) and HTML (docs/Figure6_fullset_trans.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
html 2cd3a58 xhyuo 2020-11-15 Build site.
Rmd c132b32 xhyuo 2020-11-15 First publish

library

library(ggplot2)
library(tidyverse)
── Attaching packages ─────────────────────────────────────── tidyverse 1.3.0 ──
✔ tibble  3.0.1     ✔ dplyr   1.0.0
✔ tidyr   1.1.0     ✔ stringr 1.4.0
✔ readr   1.4.0     ✔ forcats 0.5.0
✔ purrr   0.3.4     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
library(dplyr)
library(data.table)

Attaching package: 'data.table'
The following objects are masked from 'package:dplyr':

    between, first, last
The following object is masked from 'package:purrr':

    transpose
library(qvalue)
library(gridExtra)

Attaching package: 'gridExtra'
The following object is masked from 'package:dplyr':

    combine
library(plotly)

Attaching package: 'plotly'
The following object is masked from 'package:ggplot2':

    last_plot
The following object is masked from 'package:stats':

    filter
The following object is masked from 'package:graphics':

    layout
library(reshape2)

Attaching package: 'reshape2'
The following objects are masked from 'package:data.table':

    dcast, melt
The following object is masked from 'package:tidyr':

    smiths
library(MASS)

Attaching package: 'MASS'
The following object is masked from 'package:plotly':

    select
The following object is masked from 'package:dplyr':

    select
library(ggplot2)
library(viridis)
Loading required package: viridisLite
library(cowplot)
library(ggpubr)

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

    get_legend
library(furrr)
Loading required package: future
library(kableExtra)

Attaching package: 'kableExtra'
The following object is masked from 'package:dplyr':

    group_rows
#3 workers
# Set a "plan" for how the code should run.
plan(multisession, workers = 3)
load("output/gene.anno.cis.RData")
source("code/comparison.R")
options(knitr.kable.NA = '')

load all trans results

##meta data
meta.data <- c("muga275", "gbrs275", "fixed.muga275",
               "combine.fixed.muga275", "combine.fixed.gbrs275", 
               "megamuga184","gbrs184","fixed.megamuga184",
               "combine.fixed.megamuga184", "combine.fixed.gbrs184", 
               "gigamuga358","gbrs358","fixed.gigamuga358",
               "combine.fixed.gigamuga358", "combine.fixed.gbrs358")

##path
path <- c("muga275/", "gbrs275/", "fixed.muga275/",
          "combine.fixed/combine.fixed.muga275/", "combine.fixed/combine.fixed.gbrs275/", 
          "megamuga184/","gbrs184/","fixed.megamuga184/",
          "combine.fixed/combine.fixed.megamuga184/", "combine.fixed/combine.fixed.gbrs184/", 
          "gigamuga358/","gbrs358/","fixed.gigamuga358/",
          "combine.fixed/combine.fixed.gigamuga358/", "combine.fixed/combine.fixed.gbrs358/")
names(path) <- meta.data

#cutoff data
cutoff <- list()
pairs  <- list()
for (i in meta.data){
  print(i)
  b <- get(load(paste0("analysis/eqtl_with_perms/", path[[i]], i,"_pvalue.RData")))
  b <- setDT(b)[, .SD[which.max(lod)], by=genes]
  b$marker <- paste0(b$chr,"_",as.integer(b$pos))
  b$max_qvalue <- qvalue(p = b$pval)$qvalues
  b$eqtl_marker <- paste0(b$chr, "_", as.integer(b$pos))
  b <- merge(b, gene.anno, by.x=c("genes"), by.y=c("gene"), all.x = TRUE)
  b$cis_trans <- ifelse((b$chr.y == b$chr.x) & (abs(b$pos - b$start) <= 5e+06),"cis", "trans")
  b <- b[b$max_qvalue <= 0.05 & b$cis_trans == "trans",]
  cutoff[[i]] <- as.numeric(b[which.max(b$max_qvalue),"lod"])
  print(cutoff[[i]])
  pairs[[i]] <- b[,c("genes","eqtl_marker")] %>% mutate(across(c(genes, eqtl_marker),as.character)) %>% distinct()
}
[1] "muga275"
[1] 7.00561
[1] "gbrs275"
[1] 6.637
[1] "fixed.muga275"
[1] 6.642903
[1] "combine.fixed.muga275"
[1] 6.966156
[1] "combine.fixed.gbrs275"
[1] 6.448847
[1] "megamuga184"
[1] 7.877257
[1] "gbrs184"
[1] 6.733226
[1] "fixed.megamuga184"
[1] 6.937301
[1] "combine.fixed.megamuga184"
[1] 7.652161
[1] "combine.fixed.gbrs184"
[1] 6.672418
[1] "gigamuga358"
[1] 7.477519
[1] "gbrs358"
[1] 7.081477
[1] "fixed.gigamuga358"
[1] 7.045437
[1] "combine.fixed.gigamuga358"
[1] 7.268445
[1] "combine.fixed.gbrs358"
[1] 7.11942

Figure6_beforefixedarray_vs_GBRS

#parameters
xi      <- c("gbrs275", "gbrs184", "gbrs358")
yi      <- c("muga275", "megamuga184",  "gigamuga358")

x         <- pairs[xi]
name_xi   <- list("GBRS","GBRS", "GBRS")
cutoff_x  <- cutoff[xi]
y         <- pairs[yi]
name_yi   <- list("MUGA","MEGAMUGA", "GIGAMUGA")
cutoff_y  <- cutoff[yi]
color     <- list("#bdd7e7", "#6baed6", "#2171b5")

#args
args <- list(xi       = xi,
             x        = x,
             name_xi  = name_xi,
             cutoff_x = cutoff_x,
             yi       = yi,
             y        = y,
             name_yi  = name_yi,
             cutoff_y = cutoff_y,
             color    = color)

results1 <- args %>% future_pmap(comparison_trans)
names(results1) <- paste0(name_yi, "_VS_", name_xi)
print(results1)
$MUGA_VS_GBRS
$MUGA_VS_GBRS$info
[1] "x:GBRS VS y:MUGA"

$MUGA_VS_GBRS$z

Both    x    y 
1509 2010  636 

$MUGA_VS_GBRS$down_up

Down   Up 
3158  997 

$MUGA_VS_GBRS$d1_mean
# A tibble: 2 x 4
  down_up mean_lodx mean_lody  diff
  <chr>       <dbl>     <dbl> <dbl>
1 Down        13.9       9.40  4.49
2 Up           6.47      8.34 -1.87

$MUGA_VS_GBRS$slope
(Intercept)       lod.x 
  2.0760329   0.5835706 

$MUGA_VS_GBRS$plot

Version Author Date
2cd3a58 xhyuo 2020-11-15


$MEGAMUGA_VS_GBRS
$MEGAMUGA_VS_GBRS$info
[1] "x:GBRS VS y:MEGAMUGA"

$MEGAMUGA_VS_GBRS$z

Both    x    y 
1044 3040  357 

$MEGAMUGA_VS_GBRS$down_up

Down   Up 
3605  836 

$MEGAMUGA_VS_GBRS$d1_mean
# A tibble: 2 x 4
  down_up mean_lodx mean_lody  diff
  <chr>       <dbl>     <dbl> <dbl>
1 Down        10.3       7.36  2.90
2 Up           6.89      8.73 -1.85

$MEGAMUGA_VS_GBRS$slope
(Intercept)       lod.x 
  1.5618024   0.6290887 

$MEGAMUGA_VS_GBRS$plot

Version Author Date
2cd3a58 xhyuo 2020-11-15


$GIGAMUGA_VS_GBRS
$GIGAMUGA_VS_GBRS$info
[1] "x:GBRS VS y:GIGAMUGA"

$GIGAMUGA_VS_GBRS$z

Both    x    y 
1383 2450  763 

$GIGAMUGA_VS_GBRS$down_up

Down   Up 
3581 1015 

$GIGAMUGA_VS_GBRS$d1_mean
# A tibble: 2 x 4
  down_up mean_lodx mean_lody  diff
  <chr>       <dbl>     <dbl> <dbl>
1 Down        15.5      10.4   5.02
2 Up           6.48      9.45 -2.97

$GIGAMUGA_VS_GBRS$slope
(Intercept)       lod.x 
  1.7869691   0.6254573 

$GIGAMUGA_VS_GBRS$plot

Version Author Date
2cd3a58 xhyuo 2020-11-15
#table
df1 <- results_sum(results1)
df1 %>%
  kbl(caption = "Summary on beforefixedarray_vs_GBRS", digits = 3, align = "l") %>%
  kable_styling()
Summary on beforefixedarray_vs_GBRS
Infor Var1 Freq Down_Up Freq mean_lodx mean_lody diff Intercept Slope
x:GBRS VS y:MUGA Both 1509 2.076 0.584
x 2010 Down 3158 13.889 9.396 4.493
y 636 Up 997 6.465 8.335 -1.870
x:GBRS VS y:MEGAMUGA Both 1044 1.562 0.629
x 3040 Down 3605 10.257 7.356 2.901
y 357 Up 836 6.885 8.731 -1.846
x:GBRS VS y:GIGAMUGA Both 1383 1.787 0.625
x 2450 Down 3581 15.455 10.431 5.024
y 763 Up 1015 6.478 9.447 -2.969

Figure6_fixedarray_vs_GBRS

#parameters
xi      <- c("gbrs275", "gbrs184", "gbrs358")
yi      <- c("fixed.muga275", "fixed.megamuga184",  "fixed.gigamuga358")

x         <- pairs[xi]
name_xi   <- list("GBRS","GBRS", "GBRS")
cutoff_x  <- cutoff[xi]
y         <- pairs[yi]
name_yi   <- list("FIXED.MUGA","FIXED.MEGAMUGA", "FIXED.GIGAMUGA")
cutoff_y  <- cutoff[yi]
color     <- list("#bdd7e7", "#6baed6", "#2171b5")

#args
args <- list(xi       = xi,
             x        = x,
             name_xi  = name_xi,
             cutoff_x = cutoff_x,
             yi       = yi,
             y        = y,
             name_yi  = name_yi,
             cutoff_y = cutoff_y,
             color    = color)

results2 <- args %>% future_pmap(comparison_trans)
names(results2) <- paste0(name_yi, "_VS_", name_xi)
print(results2)
$FIXED.MUGA_VS_GBRS
$FIXED.MUGA_VS_GBRS$info
[1] "x:GBRS VS y:FIXED.MUGA"

$FIXED.MUGA_VS_GBRS$z

Both    x    y 
2319 1495 1181 

$FIXED.MUGA_VS_GBRS$down_up

Down   Up 
2843 2152 

$FIXED.MUGA_VS_GBRS$d1_mean
# A tibble: 2 x 4
  down_up mean_lodx mean_lody  diff
  <chr>       <dbl>     <dbl> <dbl>
1 Down        13.4      10.7   2.73
2 Up           8.10      9.46 -1.36

$FIXED.MUGA_VS_GBRS$slope
(Intercept)       lod.x 
  1.2117747   0.8038834 

$FIXED.MUGA_VS_GBRS$plot

Version Author Date
2cd3a58 xhyuo 2020-11-15


$FIXED.MEGAMUGA_VS_GBRS
$FIXED.MEGAMUGA_VS_GBRS$info
[1] "x:GBRS VS y:FIXED.MEGAMUGA"

$FIXED.MEGAMUGA_VS_GBRS$z

Both    x    y 
2886 2069 1821 

$FIXED.MEGAMUGA_VS_GBRS$down_up

Down   Up 
3341 3435 

$FIXED.MEGAMUGA_VS_GBRS$d1_mean
# A tibble: 2 x 4
  down_up mean_lodx mean_lody  diff
  <chr>       <dbl>     <dbl> <dbl>
1 Down         9.79      8.26  1.52
2 Up           7.17      8.65 -1.49

$FIXED.MEGAMUGA_VS_GBRS$slope
(Intercept)       lod.x 
  1.0907960   0.8712699 

$FIXED.MEGAMUGA_VS_GBRS$plot

Version Author Date
2cd3a58 xhyuo 2020-11-15


$FIXED.GIGAMUGA_VS_GBRS
$FIXED.GIGAMUGA_VS_GBRS$info
[1] "x:GBRS VS y:FIXED.GIGAMUGA"

$FIXED.GIGAMUGA_VS_GBRS$z

Both    x    y 
2395 1995 1422 

$FIXED.GIGAMUGA_VS_GBRS$down_up

Down   Up 
3796 2016 

$FIXED.GIGAMUGA_VS_GBRS$d1_mean
# A tibble: 2 x 4
  down_up mean_lodx mean_lody  diff
  <chr>       <dbl>     <dbl> <dbl>
1 Down        14.3       11.5  2.76
2 Up           7.75      10.6 -2.81

$FIXED.GIGAMUGA_VS_GBRS$slope
(Intercept)       lod.x 
  1.2334781   0.8284717 

$FIXED.GIGAMUGA_VS_GBRS$plot

Version Author Date
2cd3a58 xhyuo 2020-11-15
#table
df2 <- results_sum(results2)
df2 %>%
  kbl(caption = "Summary on fixedarray_vs_GBRS", digits = 3, align = "l") %>%
  kable_styling()
Summary on fixedarray_vs_GBRS
Infor Var1 Freq Down_Up Freq mean_lodx mean_lody diff Intercept Slope
x:GBRS VS y:FIXED.MUGA Both 2319 1.212 0.804
x 1495 Down 2843 13.409 10.677 2.732
y 1181 Up 2152 8.099 9.459 -1.360
x:GBRS VS y:FIXED.MEGAMUGA Both 2886 1.091 0.871
x 2069 Down 3341 9.785 8.261 1.524
y 1821 Up 3435 7.166 8.652 -1.486
x:GBRS VS y:FIXED.GIGAMUGA Both 2395 1.233 0.828
x 1995 Down 3796 14.277 11.517 2.760
y 1422 Up 2016 7.749 10.562 -2.813

Figure6_combine_vs_GBRS

#parameters
xi      <- c("combine.fixed.gbrs275", "combine.fixed.gbrs184",      "combine.fixed.gbrs358")
yi      <- c("combine.fixed.muga275", "combine.fixed.megamuga184",  "combine.fixed.gigamuga358")

x         <- pairs[xi]
name_xi   <- list("GBRS","GBRS", "GBRS")
cutoff_x  <- cutoff[xi]
y         <- pairs[yi]
name_yi   <- list("COMBINE.MUGA","COMBINE.MEGAMUGA", "COMBINE.GIGAMUGA")
cutoff_y  <- cutoff[yi]
color     <- list("#bdd7e7", "#6baed6", "#2171b5")

#args
args <- list(xi       = xi,
             x        = x,
             name_xi  = name_xi,
             cutoff_x = cutoff_x,
             yi       = yi,
             y        = y,
             name_yi  = name_yi,
             cutoff_y = cutoff_y,
             color    = color)

results3 <- args %>% future_pmap(comparison_trans)
names(results3) <- paste0(name_yi, "_VS_", name_xi)
print(results3)
$COMBINE.MUGA_VS_GBRS
$COMBINE.MUGA_VS_GBRS$info
[1] "x:GBRS VS y:COMBINE.MUGA"

$COMBINE.MUGA_VS_GBRS$z

Both    x    y 
2337 2125  779 

$COMBINE.MUGA_VS_GBRS$down_up

Down   Up 
3164 2077 

$COMBINE.MUGA_VS_GBRS$d1_mean
# A tibble: 2 x 4
  down_up mean_lodx mean_lody  diff
  <chr>       <dbl>     <dbl> <dbl>
1 Down        12.1       9.92  2.21
2 Up           8.85     10.1  -1.21

$COMBINE.MUGA_VS_GBRS$slope
(Intercept)       lod.x 
  0.7887601   0.8484628 

$COMBINE.MUGA_VS_GBRS$plot

Version Author Date
2cd3a58 xhyuo 2020-11-15


$COMBINE.MEGAMUGA_VS_GBRS
$COMBINE.MEGAMUGA_VS_GBRS$info
[1] "x:GBRS VS y:COMBINE.MEGAMUGA"

$COMBINE.MEGAMUGA_VS_GBRS$z

Both    x    y 
1937 2736  364 

$COMBINE.MEGAMUGA_VS_GBRS$down_up

Down   Up 
3258 1779 

$COMBINE.MEGAMUGA_VS_GBRS$d1_mean
# A tibble: 2 x 4
  down_up mean_lodx mean_lody  diff
  <chr>       <dbl>     <dbl> <dbl>
1 Down         9.48      8.18  1.30
2 Up           8.95     10.0  -1.07

$COMBINE.MEGAMUGA_VS_GBRS$slope
(Intercept)       lod.x 
  0.3510211   0.9122205 

$COMBINE.MEGAMUGA_VS_GBRS$plot

Version Author Date
2cd3a58 xhyuo 2020-11-15


$COMBINE.GIGAMUGA_VS_GBRS
$COMBINE.GIGAMUGA_VS_GBRS$info
[1] "x:GBRS VS y:COMBINE.GIGAMUGA"

$COMBINE.GIGAMUGA_VS_GBRS$z

Both    x    y 
3506 1367 1280 

$COMBINE.GIGAMUGA_VS_GBRS$down_up

Down   Up 
3259 2894 

$COMBINE.GIGAMUGA_VS_GBRS$d1_mean
# A tibble: 2 x 4
  down_up mean_lodx mean_lody  diff
  <chr>       <dbl>     <dbl> <dbl>
1 Down        14.2       12.3  1.94
2 Up           9.03      10.3 -1.30

$COMBINE.GIGAMUGA_VS_GBRS$slope
(Intercept)       lod.x 
  1.2222301   0.8610328 

$COMBINE.GIGAMUGA_VS_GBRS$plot

Version Author Date
2cd3a58 xhyuo 2020-11-15
#table
df3 <- results_sum(results3)
df3 %>%
  kbl(caption = "Summary on combine_vs_GBRS", digits = 3, align = "l") %>%
  kable_styling()
Summary on combine_vs_GBRS
Infor Var1 Freq Down_Up Freq mean_lodx mean_lody diff Intercept Slope
x:GBRS VS y:COMBINE.MUGA Both 2337 0.789 0.848
x 2125 Down 3164 12.130 9.921 2.209
y 779 Up 2077 8.855 10.068 -1.214
x:GBRS VS y:COMBINE.MEGAMUGA Both 1937 0.351 0.912
x 2736 Down 3258 9.480 8.178 1.302
y 364 Up 1779 8.946 10.016 -1.070
x:GBRS VS y:COMBINE.GIGAMUGA Both 3506 1.222 0.861
x 1367 Down 3259 14.243 12.304 1.938
y 1280 Up 2894 9.026 10.325 -1.298

Figure6_beforefixedarray_vs_combined

#parameters
xi      <- c("combine.fixed.muga275", "combine.fixed.megamuga184",  "combine.fixed.gigamuga358")
yi      <- c("muga275",               "megamuga184",                "gigamuga358")

x         <- pairs[xi]
name_xi   <- list("COMBINE","COMBINE", "COMBINE")
cutoff_x  <- cutoff[xi]
y         <- pairs[yi]
name_yi   <- list("MUGA","MEGAMUGA", "GIGAMUGA")
cutoff_y  <- cutoff[yi]
color     <- list("#bdd7e7", "#6baed6", "#2171b5")

#args
args <- list(xi       = xi,
             x        = x,
             name_xi  = name_xi,
             cutoff_x = cutoff_x,
             yi       = yi,
             y        = y,
             name_yi  = name_yi,
             cutoff_y = cutoff_y,
             color    = color)

results4 <- args %>% future_pmap(comparison_trans)
names(results4) <- paste0(name_yi, "_VS_", name_xi)
print(results4)
$MUGA_VS_COMBINE
$MUGA_VS_COMBINE$info
[1] "x:COMBINE VS y:MUGA"

$MUGA_VS_COMBINE$z

Both    x    y 
1631 1314  601 

$MUGA_VS_COMBINE$down_up

Down   Up 
2576  970 

$MUGA_VS_COMBINE$d1_mean
# A tibble: 2 x 4
  down_up mean_lodx mean_lody  diff
  <chr>       <dbl>     <dbl> <dbl>
1 Down        14.3      11.0   3.28
2 Up           7.26      8.68 -1.41

$MUGA_VS_COMBINE$slope
(Intercept)       lod.x 
  1.5656899   0.7124451 

$MUGA_VS_COMBINE$plot

Version Author Date
2cd3a58 xhyuo 2020-11-15


$MEGAMUGA_VS_COMBINE
$MEGAMUGA_VS_COMBINE$info
[1] "x:COMBINE VS y:MEGAMUGA"

$MEGAMUGA_VS_COMBINE$z

Both    x    y 
1008 1020  408 

$MEGAMUGA_VS_COMBINE$down_up

Down   Up 
1739  697 

$MEGAMUGA_VS_COMBINE$d1_mean
# A tibble: 2 x 4
  down_up mean_lodx mean_lody  diff
  <chr>       <dbl>     <dbl> <dbl>
1 Down        12.9       9.82  3.03
2 Up           7.74      9.40 -1.66

$MEGAMUGA_VS_COMBINE$slope
(Intercept)       lod.x 
  2.0429012   0.6721594 

$MEGAMUGA_VS_COMBINE$plot

Version Author Date
2cd3a58 xhyuo 2020-11-15


$GIGAMUGA_VS_COMBINE
$GIGAMUGA_VS_COMBINE$info
[1] "x:COMBINE VS y:GIGAMUGA"

$GIGAMUGA_VS_COMBINE$z

Both    x    y 
1463 2603  741 

$GIGAMUGA_VS_COMBINE$down_up

Down   Up 
3729 1078 

$GIGAMUGA_VS_COMBINE$d1_mean
# A tibble: 2 x 4
  down_up mean_lodx mean_lody  diff
  <chr>       <dbl>     <dbl> <dbl>
1 Down        13.9       10.2  3.74
2 Up           8.10      10.1 -2.03

$GIGAMUGA_VS_COMBINE$slope
(Intercept)       lod.x 
  0.7712244   0.7449011 

$GIGAMUGA_VS_COMBINE$plot

Version Author Date
2cd3a58 xhyuo 2020-11-15
#table
df4 <- results_sum(results4)
df4 %>%
  kbl(caption = "Summary on beforefixedarray_vs_combined", digits = 3, align = "l") %>%
  kable_styling()
Summary on beforefixedarray_vs_combined
Infor Var1 Freq Down_Up Freq mean_lodx mean_lody diff Intercept Slope
x:COMBINE VS y:MUGA Both 1631 1.566 0.712
x 1314 Down 2576 14.318 11.038 3.280
y 601 Up 970 7.264 8.675 -1.411
x:COMBINE VS y:MEGAMUGA Both 1008 2.043 0.672
x 1020 Down 1739 12.856 9.822 3.034
y 408 Up 697 7.740 9.396 -1.656
x:COMBINE VS y:GIGAMUGA Both 1463 0.771 0.745
x 2603 Down 3729 13.926 10.184 3.743
y 741 Up 1078 8.096 10.128 -2.031

Figure6_fixedarray_vs_combined

#parameters
xi      <- c("combine.fixed.muga275", "combine.fixed.megamuga184",  "combine.fixed.gigamuga358")
yi      <- c("fixed.muga275",         "fixed.megamuga184",          "fixed.gigamuga358")

x         <- pairs[xi]
name_xi   <- list("COMBINE","COMBINE", "COMBINE")
cutoff_x  <- cutoff[xi]
y         <- pairs[yi]
name_yi   <- list("FIXED.MUGA","FIXED.MEGAMUGA", "FIXED.GIGAMUGA")
cutoff_y  <- cutoff[yi]
color     <- list("#bdd7e7", "#6baed6", "#2171b5")

#args
args <- list(xi       = xi,
             x        = x,
             name_xi  = name_xi,
             cutoff_x = cutoff_x,
             yi       = yi,
             y        = y,
             name_yi  = name_yi,
             cutoff_y = cutoff_y,
             color    = color)

results5 <- args %>% future_pmap(comparison_trans)
names(results5) <- paste0(name_yi, "_VS_", name_xi)
print(results5)
$FIXED.MUGA_VS_COMBINE
$FIXED.MUGA_VS_COMBINE$info
[1] "x:COMBINE VS y:FIXED.MUGA"

$FIXED.MUGA_VS_COMBINE$z

Both    x    y 
2475  717 1151 

$FIXED.MUGA_VS_COMBINE$down_up

Down   Up 
2196 2147 

$FIXED.MUGA_VS_COMBINE$d1_mean
# A tibble: 2 x 4
  down_up mean_lodx mean_lody  diff
  <chr>       <dbl>     <dbl> <dbl>
1 Down         11.8      10.7  1.14
2 Up           10.8      11.9 -1.09

$FIXED.MUGA_VS_COMBINE$slope
(Intercept)       lod.x 
 0.01717572  0.99555914 

$FIXED.MUGA_VS_COMBINE$plot

Version Author Date
2cd3a58 xhyuo 2020-11-15


$FIXED.MEGAMUGA_VS_COMBINE
$FIXED.MEGAMUGA_VS_COMBINE$info
[1] "x:COMBINE VS y:FIXED.MEGAMUGA"

$FIXED.MEGAMUGA_VS_COMBINE$z

Both    x    y 
2098  293 2318 

$FIXED.MEGAMUGA_VS_COMBINE$down_up

Down   Up 
1652 3057 

$FIXED.MEGAMUGA_VS_COMBINE$d1_mean
# A tibble: 2 x 4
  down_up mean_lodx mean_lody  diff
  <chr>       <dbl>     <dbl> <dbl>
1 Down        11.0       9.98  1.01
2 Up           8.16      9.38 -1.22

$FIXED.MEGAMUGA_VS_COMBINE$slope
(Intercept)       lod.x 
  0.6585100   0.9755993 

$FIXED.MEGAMUGA_VS_COMBINE$plot

Version Author Date
2cd3a58 xhyuo 2020-11-15


$FIXED.GIGAMUGA_VS_COMBINE
$FIXED.GIGAMUGA_VS_COMBINE$info
[1] "x:COMBINE VS y:FIXED.GIGAMUGA"

$FIXED.GIGAMUGA_VS_COMBINE$z

Both    x    y 
2463 1972 1373 

$FIXED.GIGAMUGA_VS_COMBINE$down_up

Down   Up 
3562 2246 

$FIXED.GIGAMUGA_VS_COMBINE$d1_mean
# A tibble: 2 x 4
  down_up mean_lodx mean_lody  diff
  <chr>       <dbl>     <dbl> <dbl>
1 Down         11.8      9.98  1.85
2 Up           11.3     13.3  -1.97

$FIXED.GIGAMUGA_VS_COMBINE$slope
(Intercept)       lod.x 
 -0.2991519   0.9936949 

$FIXED.GIGAMUGA_VS_COMBINE$plot

Version Author Date
2cd3a58 xhyuo 2020-11-15
#table
df5 <- results_sum(results5)
df5 %>%
  kbl(caption = "Summary on fixedarray_vs_combined", digits = 3, align = "l") %>%
  kable_styling()
Summary on fixedarray_vs_combined
Infor Var1 Freq Down_Up Freq mean_lodx mean_lody diff Intercept Slope
x:COMBINE VS y:FIXED.MUGA Both 2475 0.017 0.996
x 717 Down 2196 11.798 10.662 1.136
y 1151 Up 2147 10.783 11.878 -1.095
x:COMBINE VS y:FIXED.MEGAMUGA Both 2098 0.659 0.976
x 293 Down 1652 10.987 9.977 1.010
y 2318 Up 3057 8.161 9.377 -1.216
x:COMBINE VS y:FIXED.GIGAMUGA Both 2463 -0.299 0.994
x 1972 Down 3562 11.827 9.978 1.849
y 1373 Up 2246 11.336 13.305 -1.969

sessionInfo()
R version 4.0.0 (2020-04-24)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.4 LTS

Matrix products: default
BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.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=C             
 [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 utils     datasets  methods   base     

other attached packages:
 [1] kableExtra_1.3.1  furrr_0.2.1       future_1.20.1     ggpubr_0.4.0     
 [5] cowplot_1.1.0     viridis_0.5.1     viridisLite_0.3.0 MASS_7.3-51.6    
 [9] reshape2_1.4.4    plotly_4.9.2.1    gridExtra_2.3     qvalue_2.20.0    
[13] data.table_1.12.8 forcats_0.5.0     stringr_1.4.0     dplyr_1.0.0      
[17] purrr_0.3.4       readr_1.4.0       tidyr_1.1.0       tibble_3.0.1     
[21] tidyverse_1.3.0   ggplot2_3.3.2     workflowr_1.6.2  

loaded via a namespace (and not attached):
 [1] fs_1.4.1          lubridate_1.7.9   webshot_0.5.2     httr_1.4.1       
 [5] rprojroot_1.3-2   tools_4.0.0       backports_1.1.6   utf8_1.1.4       
 [9] R6_2.4.1          DBI_1.1.0         lazyeval_0.2.2    colorspace_1.4-1 
[13] withr_2.2.0       tidyselect_1.1.0  curl_4.3          compiler_4.0.0   
[17] git2r_0.27.1      cli_2.0.2         rvest_0.3.6       xml2_1.3.2       
[21] labeling_0.4.2    scales_1.1.1      digest_0.6.25     foreign_0.8-79   
[25] rmarkdown_2.5     rio_0.5.16        pkgconfig_2.0.3   htmltools_0.4.0  
[29] parallelly_1.21.0 highr_0.8         dbplyr_2.0.0      htmlwidgets_1.5.1
[33] rlang_0.4.6       readxl_1.3.1      rstudioapi_0.11   farver_2.0.3     
[37] generics_0.0.2    jsonlite_1.6.1    zip_2.1.1         car_3.0-10       
[41] magrittr_1.5      Rcpp_1.0.4.6      munsell_0.5.0     fansi_0.4.1      
[45] abind_1.4-5       lifecycle_0.2.0   stringi_1.4.6     whisker_0.4      
[49] yaml_2.2.1        carData_3.0-4     plyr_1.8.6        grid_4.0.0       
[53] parallel_4.0.0    listenv_0.8.0     promises_1.1.0    crayon_1.3.4     
[57] haven_2.3.1       splines_4.0.0     hms_0.5.3         knitr_1.28       
[61] pillar_1.4.4      ggsignif_0.6.0    codetools_0.2-16  reprex_0.3.0     
[65] glue_1.4.0        evaluate_0.14     modelr_0.1.8      vctrs_0.3.1      
[69] httpuv_1.5.4      cellranger_1.1.0  gtable_0.3.0      assertthat_0.2.1 
[73] xfun_0.13         openxlsx_4.2.3    broom_0.7.2       rstatix_0.6.0    
[77] later_1.0.0       globals_0.13.1    ellipsis_0.3.0