Browse code

[FIX] Fixes for package size issues

Giulia Pais authored on 27/09/2021 12:23:27
Showing 39 changed files

... ...
@@ -72,8 +72,6 @@
72 72
 #' package = "ISAnalytics")}
73 73
 #' * \code{vignette("aggregate_function_usage",
74 74
 #' package = "ISAnalytics")}
75
-#' * \code{vignette("report_system",
76
-#' package = "ISAnalytics")}
77 75
 #' * \code{vignette("sharing_analyses",
78 76
 #' package = "ISAnalytics")}
79 77
 #'
... ...
@@ -748,10 +748,10 @@ sample_statistics <- function(x, metadata,
748 748
 #' ## Genomic annotation file
749 749
 #' This file is a data base, or more simply a .tsv file to import, with
750 750
 #' genes annotation for the specific genome. The annotations for the
751
-#' human genome (hg19) and murine genome (mm9 and mm10) are already
751
+#' human genome (hg19) and murine genome (mm9) are already
752 752
 #' included in this package: to use one of them just
753
-#' set the argument `genomic_annotation_file` to either `"hg19"`,
754
-#' `"mm9"` or `"mm10"`.
753
+#' set the argument `genomic_annotation_file` to either `"hg19"` or
754
+#' `"mm9"`.
755 755
 #' If for any reason the user is performing an analysis on another genome,
756 756
 #' this file needs to be changed respecting the USCS Genome Browser
757 757
 #' format, meaning the input file headers should include:
... ...
@@ -803,7 +803,7 @@ CIS_grubbs <- function(x,
803 803
     # Check other parameters
804 804
     stopifnot(is.character(genomic_annotation_file))
805 805
     genomic_annotation_file <- genomic_annotation_file[1]
806
-    if (genomic_annotation_file %in% c("hg19", "mm9", "mm10")) {
806
+    if (genomic_annotation_file %in% c("hg19", "mm9")) {
807 807
         gen_file <- paste0("refGenes_", genomic_annotation_file)
808 808
         utils::data(list = gen_file, envir = rlang::current_env())
809 809
         refgenes <- rlang::eval_tidy(rlang::sym(gen_file))
... ...
@@ -64,9 +64,6 @@
64 64
 #' @describeIn refGenes_hg19 Data frame for murine mm9 genome
65 65
 #' @usage data("refGenes_mm9")
66 66
 "refGenes_mm9"
67
-#' @describeIn refGenes_hg19 Data frame for murine mm10 genome
68
-#' @usage data("refGenes_mm10")
69
-"refGenes_mm10"
70 67
 
71 68
 #' Data frames for proto-oncogenes (human and mouse)
72 69
 #' amd tumor-suppressor genes from UniProt.
... ...
@@ -39,8 +39,6 @@ navbar:
39 39
         href: articles/collision_removal.html
40 40
       - text: How to use import functions
41 41
         href: articles/how_to_import_functions.html
42
-      - text: ISAnalytics report system
43
-        href: articles/report_system.html
44 42
       - text: Sharing analyses with ISAnalytics
45 43
         href: articles/sharing_analyses.html
46 44
     release-v:
... ...
@@ -131,6 +129,5 @@ reference:
131 129
   - proto_oncogenes
132 130
   - refGenes_hg19
133 131
   - refGenes_mm9
134
-  - refGenes_mm10
135 132
   - tumor_suppressors
136 133
 
137 134
deleted file mode 100644
138 135
Binary files a/data/refGenes_mm10.RData and /dev/null differ
... ...
@@ -46,10 +46,10 @@ this paper:
46 46
 
47 47
 This file is a data base, or more simply a .tsv file to import, with
48 48
 genes annotation for the specific genome. The annotations for the
49
-human genome (hg19) and murine genome (mm9 and mm10) are already
49
+human genome (hg19) and murine genome (mm9) are already
50 50
 included in this package: to use one of them just
51
-set the argument \code{genomic_annotation_file} to either \code{"hg19"},
52
-\code{"mm9"} or \code{"mm10"}.
51
+set the argument \code{genomic_annotation_file} to either \code{"hg19"} or
52
+\code{"mm9"}.
53 53
 If for any reason the user is performing an analysis on another genome,
54 54
 this file needs to be changed respecting the USCS Genome Browser
55 55
 format, meaning the input file headers should include:
... ...
@@ -81,35 +81,35 @@ For more details on how this files were generated use the help
81 81
 
82 82
 The default values are included in this package and
83 83
 it can be accessed by doing:\if{html}{\out{<div class="r">}}\preformatted{head(known_clinical_oncogenes())
84
-}\if{html}{\out{</div>}}\preformatted{## # A tibble: 5 × 2
85
-##   GeneName KnownClonalExpansion
86
-##   <chr>    <lgl>               
87
-## 1 MECOM    TRUE                
88
-## 2 CCND2    TRUE                
89
-## 3 TAL1     TRUE                
90
-## 4 LMO2     TRUE                
91
-## 5 HMGA2    TRUE
92
-}
84
+#> # A tibble: 5 × 2
85
+#>   GeneName KnownClonalExpansion
86
+#>   <chr>    <lgl>               
87
+#> 1 MECOM    TRUE                
88
+#> 2 CCND2    TRUE                
89
+#> 3 TAL1     TRUE                
90
+#> 4 LMO2     TRUE                
91
+#> 5 HMGA2    TRUE
92
+}\if{html}{\out{</div>}}
93 93
 
94 94
 If the user wants to change this parameter the input data frame must
95 95
 preserve the column structure. The same goes for the \code{suspicious_genes}
96 96
 parameter (DOIReference column is optional):\if{html}{\out{<div class="r">}}\preformatted{head(clinical_relevant_suspicious_genes())
97
-}\if{html}{\out{</div>}}\preformatted{## # A tibble: 6 × 3
98
-##   GeneName ClinicalRelevance DOIReference                                
99
-##   <chr>    <lgl>             <chr>                                       
100
-## 1 DNMT3A   TRUE              https://doi.org/10.1182/blood-2018-01-829937
101
-## 2 TET2     TRUE              https://doi.org/10.1182/blood-2018-01-829937
102
-## 3 ASXL1    TRUE              https://doi.org/10.1182/blood-2018-01-829937
103
-## 4 JAK2     TRUE              https://doi.org/10.1182/blood-2018-01-829937
104
-## 5 CBL      TRUE              https://doi.org/10.1182/blood-2018-01-829937
105
-## 6 TP53     TRUE              https://doi.org/10.1182/blood-2018-01-829937
106
-}
97
+#> # A tibble: 6 × 3
98
+#>   GeneName ClinicalRelevance DOIReference                                
99
+#>   <chr>    <lgl>             <chr>                                       
100
+#> 1 DNMT3A   TRUE              https://doi.org/10.1182/blood-2018-01-829937
101
+#> 2 TET2     TRUE              https://doi.org/10.1182/blood-2018-01-829937
102
+#> 3 ASXL1    TRUE              https://doi.org/10.1182/blood-2018-01-829937
103
+#> 4 JAK2     TRUE              https://doi.org/10.1182/blood-2018-01-829937
104
+#> 5 CBL      TRUE              https://doi.org/10.1182/blood-2018-01-829937
105
+#> 6 TP53     TRUE              https://doi.org/10.1182/blood-2018-01-829937
106
+}\if{html}{\out{</div>}}
107 107
 }
108 108
 }
109 109
 \examples{
110 110
 data("integration_matrices", package = "ISAnalytics")
111 111
 cis_plot <- CIS_volcano_plot(integration_matrices,
112
-  title_prefix = "PJ01"
112
+    title_prefix = "PJ01"
113 113
 )
114 114
 cis_plot
115 115
 }
... ...
@@ -33,18 +33,18 @@ Plot of the estimated HSC population size for each patient.
33 33
 data("integration_matrices", package = "ISAnalytics")
34 34
 data("association_file", package = "ISAnalytics")
35 35
 aggreg <- aggregate_values_by_key(
36
-  x = integration_matrices,
37
-  association_file = association_file,
38
-  value_cols = c("seqCount", "fragmentEstimate")
36
+    x = integration_matrices,
37
+    association_file = association_file,
38
+    value_cols = c("seqCount", "fragmentEstimate")
39 39
 )
40 40
 aggreg_meta <- aggregate_metadata(
41
-  association_file = association_file
41
+    association_file = association_file
42 42
 )
43 43
 estimate <- HSC_population_size_estimate(
44
-  x = aggreg,
45
-  metadata = aggreg_meta,
46
-  stable_timepoints = c(90, 180, 360),
47
-  cell_type = "Other"
44
+    x = aggreg,
45
+    metadata = aggreg_meta,
46
+    stable_timepoints = c(90, 180, 360),
47
+    cell_type = "Other"
48 48
 )
49 49
 p <- HSC_population_plot(estimate, "PJ01")
50 50
 p
... ...
@@ -85,16 +85,16 @@ distinct non-zero time points.
85 85
 data("integration_matrices", package = "ISAnalytics")
86 86
 data("association_file", package = "ISAnalytics")
87 87
 aggreg <- aggregate_values_by_key(
88
-  x = integration_matrices,
89
-  association_file = association_file,
90
-  value_cols = c("seqCount", "fragmentEstimate")
88
+    x = integration_matrices,
89
+    association_file = association_file,
90
+    value_cols = c("seqCount", "fragmentEstimate")
91 91
 )
92 92
 aggreg_meta <- aggregate_metadata(association_file = association_file)
93 93
 estimate <- HSC_population_size_estimate(
94
-  x = aggreg,
95
-  metadata = aggreg_meta,
96
-  stable_timepoints = c(90, 180, 360),
97
-  cell_type = "Other"
94
+    x = aggreg,
95
+    metadata = aggreg_meta,
96
+    stable_timepoints = c(90, 180, 360),
97
+    cell_type = "Other"
98 98
 )
99 99
 }
100 100
 \concept{Population estimates}
... ...
@@ -105,8 +105,6 @@ and Annotation of Vector Integration Sites}
105 105
 package = "ISAnalytics")}
106 106
 \item \code{vignette("aggregate_function_usage",
107 107
 package = "ISAnalytics")}
108
-\item \code{vignette("report_system",
109
-package = "ISAnalytics")}
110 108
 \item \code{vignette("sharing_analyses",
111 109
 package = "ISAnalytics")}
112 110
 }
... ...
@@ -40,7 +40,7 @@ summary of info for each group. For more details on how to use this function:
40 40
 \examples{
41 41
 data("association_file", package = "ISAnalytics")
42 42
 aggreg_meta <- aggregate_metadata(
43
-  association_file = association_file
43
+    association_file = association_file
44 44
 )
45 45
 head(aggreg_meta)
46 46
 }
... ...
@@ -92,9 +92,9 @@ will be added to the final data frame.
92 92
 data("integration_matrices", package = "ISAnalytics")
93 93
 data("association_file", package = "ISAnalytics")
94 94
 aggreg <- aggregate_values_by_key(
95
-  x = integration_matrices,
96
-  association_file = association_file,
97
-  value_cols = c("seqCount", "fragmentEstimate")
95
+    x = integration_matrices,
96
+    association_file = association_file,
97
+    value_cols = c("seqCount", "fragmentEstimate")
98 98
 )
99 99
 head(aggreg)
100 100
 }
... ...
@@ -73,16 +73,16 @@ otherwise an error message is thrown.
73 73
 data("integration_matrices", package = "ISAnalytics")
74 74
 data("association_file", package = "ISAnalytics")
75 75
 aggreg <- aggregate_values_by_key(
76
-  x = integration_matrices,
77
-  association_file = association_file,
78
-  value_cols = c("seqCount", "fragmentEstimate")
76
+    x = integration_matrices,
77
+    association_file = association_file,
78
+    value_cols = c("seqCount", "fragmentEstimate")
79 79
 )
80 80
 by_subj <- aggreg \%>\%
81
-  dplyr::group_by(.data$SubjectID) \%>\%
82
-  dplyr::group_split()
81
+    dplyr::group_by(.data$SubjectID) \%>\%
82
+    dplyr::group_split()
83 83
 circos_genomic_density(by_subj,
84
-  track_colors = c("navyblue", "gold"),
85
-  grDevice = "default", track.height = 0.1
84
+    track_colors = c("navyblue", "gold"),
85
+    grDevice = "default", track.height = 0.1
86 86
 )
87 87
 }
88 88
 }
... ...
@@ -47,16 +47,16 @@ of reference.
47 47
 fs_path <- system.file("extdata", "fs.zip", package = "ISAnalytics")
48 48
 fs <- unzip_file_system(fs_path, "fs")
49 49
 af_path <- system.file("extdata", "asso.file.tsv.gz",
50
-  package = "ISAnalytics"
50
+    package = "ISAnalytics"
51 51
 )
52 52
 af <- import_association_file(af_path,
53
-  root = fs,
54
-  import_iss = FALSE,
55
-  report_path = NULL
53
+    root = fs,
54
+    import_iss = FALSE,
55
+    report_path = NULL
56 56
 )
57 57
 matrices <- import_parallel_Vispa2Matrices(af,
58
-  c("seqCount", "fragmentEstimate"),
59
-  mode = "AUTO", report_path = NULL, multi_quant_matrix = FALSE
58
+    c("seqCount", "fragmentEstimate"),
59
+    mode = "AUTO", report_path = NULL, multi_quant_matrix = FALSE
60 60
 )
61 61
 multi_quant <- comparison_matrix(matrices)
62 62
 head(multi_quant)
... ...
@@ -49,9 +49,9 @@ column) will be produced.
49 49
 \examples{
50 50
 data("integration_matrices", package = "ISAnalytics")
51 51
 abund <- compute_abundance(
52
-  x = integration_matrices,
53
-  columns = "fragmentEstimate",
54
-  key = "CompleteAmplificationID"
52
+    x = integration_matrices,
53
+    columns = "fragmentEstimate",
54
+    key = "CompleteAmplificationID"
55 55
 )
56 56
 head(abund)
57 57
 }
... ...
@@ -83,7 +83,7 @@ all quantification matrices.
83 83
 \examples{
84 84
 data("integration_matrices", package = "ISAnalytics")
85 85
 rec <- compute_near_integrations(
86
-  x = integration_matrices, map_as_file = FALSE
86
+    x = integration_matrices, map_as_file = FALSE
87 87
 )
88 88
 head(rec)
89 89
 }
... ...
@@ -77,9 +77,9 @@ the chosen column to avoid undesired results.
77 77
 data("integration_matrices", package = "ISAnalytics")
78 78
 data("association_file", package = "ISAnalytics")
79 79
 aggreg <- aggregate_values_by_key(
80
-  x = integration_matrices,
81
-  association_file = association_file,
82
-  value_cols = c("seqCount", "fragmentEstimate")
80
+    x = integration_matrices,
81
+    association_file = association_file,
82
+    value_cols = c("seqCount", "fragmentEstimate")
83 83
 )
84 84
 cumulative_count <- cumulative_count_union(aggreg)
85 85
 cumulative_count
... ...
@@ -43,9 +43,9 @@ time point "t+1".
43 43
 data("integration_matrices", package = "ISAnalytics")
44 44
 data("association_file", package = "ISAnalytics")
45 45
 aggreg <- aggregate_values_by_key(
46
-  x = rlang::current_env()$integration_matrices,
47
-  association_file = rlang::current_env()$association_file,
48
-  value_cols = c("seqCount", "fragmentEstimate")
46
+    x = rlang::current_env()$integration_matrices,
47
+    association_file = rlang::current_env()$association_file,
48
+    value_cols = c("seqCount", "fragmentEstimate")
49 49
 )
50 50
 cumulated_is <- cumulative_is(aggreg)
51 51
 cumulated_is
... ...
@@ -45,16 +45,16 @@ file has been aligned with the file system
45 45
 fs_path <- system.file("extdata", "fs.zip", package = "ISAnalytics")
46 46
 fs <- unzip_file_system(fs_path, "fs")
47 47
 af_path <- system.file("extdata", "asso.file.tsv.gz",
48
-  package = "ISAnalytics"
48
+    package = "ISAnalytics"
49 49
 )
50 50
 af <- import_association_file(af_path,
51
-  root = fs,
52
-  import_iss = FALSE,
53
-  report_path = NULL
51
+    root = fs,
52
+    import_iss = FALSE,
53
+    report_path = NULL
54 54
 )
55 55
 stats_files <- import_Vispa2_stats(af,
56
-  join_with_af = FALSE,
57
-  report_path = NULL
56
+    join_with_af = FALSE,
57
+    report_path = NULL
58 58
 )
59 59
 head(stats_files)
60 60
 }
... ...
@@ -69,16 +69,16 @@ For more details see the "How to use import functions" vignette:
69 69
 fs_path <- system.file("extdata", "fs.zip", package = "ISAnalytics")
70 70
 fs <- unzip_file_system(fs_path, "fs")
71 71
 af_path <- system.file("extdata", "asso.file.tsv.gz",
72
-  package = "ISAnalytics"
72
+    package = "ISAnalytics"
73 73
 )
74 74
 af <- import_association_file(af_path,
75
-  root = fs,
76
-  import_iss = FALSE,
77
-  report_path = NULL
75
+    root = fs,
76
+    import_iss = FALSE,
77
+    report_path = NULL
78 78
 )
79 79
 matrices <- import_parallel_Vispa2Matrices(af,
80
-  c("seqCount", "fragmentEstimate"),
81
-  mode = "AUTO", report_path = NULL
80
+    c("seqCount", "fragmentEstimate"),
81
+    mode = "AUTO", report_path = NULL
82 82
 )
83 83
 head(matrices)
84 84
 }
... ...
@@ -39,11 +39,11 @@ For more details see the "How to use import functions" vignette:
39 39
 fs_path <- system.file("extdata", "fs.zip", package = "ISAnalytics")
40 40
 fs <- unzip_file_system(fs_path, "fs")
41 41
 matrix_path <- fs::path(
42
-  fs,
43
-  "PJ01",
44
-  "quantification",
45
-  "POOL01-1",
46
-  "PJ01_POOL01-1_seqCount_matrix.no0.annotated.tsv.gz"
42
+    fs,
43
+    "PJ01",
44
+    "quantification",
45
+    "POOL01-1",
46
+    "PJ01_POOL01-1_seqCount_matrix.no0.annotated.tsv.gz"
47 47
 )
48 48
 matrix <- import_single_Vispa2Matrix(matrix_path)
49 49
 head(matrix)
... ...
@@ -72,21 +72,21 @@ as transparent in the strata.
72 72
 data("integration_matrices", package = "ISAnalytics")
73 73
 data("association_file", package = "ISAnalytics")
74 74
 aggreg <- aggregate_values_by_key(
75
-  x = integration_matrices,
76
-  association_file = association_file,
77
-  value_cols = c("seqCount", "fragmentEstimate")
75
+    x = integration_matrices,
76
+    association_file = association_file,
77
+    value_cols = c("seqCount", "fragmentEstimate")
78 78
 )
79 79
 abund <- compute_abundance(x = aggreg)
80 80
 alluvial_plots <- integration_alluvial_plot(abund,
81
-  alluvia_plot_y_threshold = 0.5
81
+    alluvia_plot_y_threshold = 0.5
82 82
 )
83 83
 ex_plot <- alluvial_plots[[1]]$plot +
84
-  ggplot2::labs(
85
-    title = "IS distribution over time",
86
-    subtitle = "Patient 1, MNC BM",
87
-    y = "Abundance (\%)",
88
-    x = "Time point (days after GT)"
89
-  )
84
+    ggplot2::labs(
85
+        title = "IS distribution over time",
86
+        subtitle = "Patient 1, MNC BM",
87
+        y = "Abundance (\%)",
88
+        x = "Time point (days after GT)"
89
+    )
90 90
 print(ex_plot)
91 91
 }
92 92
 \seealso{
... ...
@@ -81,9 +81,9 @@ function \code{\link{sharing_heatmap}} or via the function
81 81
 data("integration_matrices", package = "ISAnalytics")
82 82
 data("association_file", package = "ISAnalytics")
83 83
 aggreg <- aggregate_values_by_key(
84
-  x = integration_matrices,
85
-  association_file = association_file,
86
-  value_cols = c("seqCount", "fragmentEstimate")
84
+    x = integration_matrices,
85
+    association_file = association_file,
86
+    value_cols = c("seqCount", "fragmentEstimate")
87 87
 )
88 88
 sharing <- is_sharing(aggreg)
89 89
 sharing
... ...
@@ -34,8 +34,8 @@ Filter out outliers in metadata.
34 34
 \examples{
35 35
 data("association_file", package = "ISAnalytics")
36 36
 filtered_af <- outlier_filter(association_file,
37
-  key = "BARCODE_MUX",
38
-  report_path = NULL
37
+    key = "BARCODE_MUX",
38
+    report_path = NULL
39 39
 )
40 40
 head(filtered_af)
41 41
 }
... ...
@@ -94,7 +94,7 @@ in sequence.
94 94
 \examples{
95 95
 data("association_file", package = "ISAnalytics")
96 96
 flagged <- outliers_by_pool_fragments(association_file,
97
-  report_path = NULL
97
+    report_path = NULL
98 98
 )
99 99
 head(flagged)
100 100
 }
... ...
@@ -35,17 +35,17 @@ For more details on how to use collision removal functionality:
35 35
 data("integration_matrices", package = "ISAnalytics")
36 36
 data("association_file", package = "ISAnalytics")
37 37
 separated <- separate_quant_matrices(
38
-  integration_matrices
38
+    integration_matrices
39 39
 )
40 40
 no_coll <- remove_collisions(
41
-  x = separated$seqCount,
42
-  association_file = association_file,
43
-  quant_cols = c(seqCount = "Value"),
44
-  report_path = NULL
41
+    x = separated$seqCount,
42
+    association_file = association_file,
43
+    quant_cols = c(seqCount = "Value"),
44
+    report_path = NULL
45 45
 )
46 46
 realigned <- realign_after_collisions(
47
-  sc_matrix = no_coll,
48
-  other_matrices = list(fragmentEstimate = separated$fragmentEstimate)
47
+    sc_matrix = no_coll,
48
+    other_matrices = list(fragmentEstimate = separated$fragmentEstimate)
49 49
 )
50 50
 realigned
51 51
 }
... ...
@@ -4,21 +4,16 @@
4 4
 \name{refGenes_hg19}
5 5
 \alias{refGenes_hg19}
6 6
 \alias{refGenes_mm9}
7
-\alias{refGenes_mm10}
8 7
 \title{Gene annotation files for hg19, mm9 and mm10.}
9 8
 \format{
10 9
 An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 27275 rows and 12 columns.
11 10
 
12 11
 An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 24487 rows and 12 columns.
13
-
14
-An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 24627 rows and 11 columns.
15 12
 }
16 13
 \usage{
17 14
 data("refGenes_hg19")
18 15
 
19 16
 data("refGenes_mm9")
20
-
21
-data("refGenes_mm10")
22 17
 }
23 18
 \description{
24 19
 This file was obtained following this steps:
... ...
@@ -46,8 +41,6 @@ ORDER BY kg.chrom ASC , kg.txStart ASC
46 41
 \section{Functions}{
47 42
 \itemize{
48 43
 \item \code{refGenes_mm9}: Data frame for murine mm9 genome
49
-
50
-\item \code{refGenes_mm10}: Data frame for murine mm10 genome
51 44
 }}
52 45
 
53 46
 \keyword{datasets}
... ...
@@ -54,9 +54,9 @@ For more details refer to the vignette "Collision removal functionality":
54 54
 data("integration_matrices", package = "ISAnalytics")
55 55
 data("association_file", package = "ISAnalytics")
56 56
 no_coll <- remove_collisions(
57
-  x = integration_matrices,
58
-  association_file = association_file,
59
-  report_path = NULL
57
+    x = integration_matrices,
58
+    association_file = association_file,
59
+    report_path = NULL
60 60
 )
61 61
 head(no_coll)
62 62
 }
... ...
@@ -64,9 +64,9 @@ sample_key = c("SubjectID", "CellMarker","Tissue", "TimePoint"))
64 64
 data("integration_matrices", package = "ISAnalytics")
65 65
 data("association_file", package = "ISAnalytics")
66 66
 stats <- sample_statistics(
67
-  x = integration_matrices,
68
-  metadata = association_file,
69
-  value_columns = c("seqCount", "fragmentEstimate")
67
+    x = integration_matrices,
68
+    metadata = association_file,
69
+    value_columns = c("seqCount", "fragmentEstimate")
70 70
 )
71 71
 stats
72 72
 }
... ...
@@ -48,7 +48,7 @@ quantification matrices as a named list of tibbles.
48 48
 \examples{
49 49
 data("integration_matrices", package = "ISAnalytics")
50 50
 separated <- separate_quant_matrices(
51
-  integration_matrices
51
+    integration_matrices
52 52
 )
53 53
 separated
54 54
 }
... ...
@@ -53,13 +53,13 @@ Displays the IS sharing calculated via \link{is_sharing} as heatmaps.
53 53
 data("integration_matrices", package = "ISAnalytics")
54 54
 data("association_file", package = "ISAnalytics")
55 55
 aggreg <- aggregate_values_by_key(
56
-  x = integration_matrices,
57
-  association_file = association_file,
58
-  value_cols = c("seqCount", "fragmentEstimate")
56
+    x = integration_matrices,
57
+    association_file = association_file,
58
+    value_cols = c("seqCount", "fragmentEstimate")
59 59
 )
60 60
 sharing <- is_sharing(aggreg,
61
-  minimal = FALSE,
62
-  include_self_comp = TRUE
61
+    minimal = FALSE,
62
+    include_self_comp = TRUE
63 63
 )
64 64
 sharing_heatmaps <- sharing_heatmap(sharing_df = sharing)
65 65
 sharing_heatmaps$absolute
... ...
@@ -40,9 +40,9 @@ for more detail on this.
40 40
 data("integration_matrices", package = "ISAnalytics")
41 41
 data("association_file", package = "ISAnalytics")
42 42
 aggreg <- aggregate_values_by_key(
43
-  x = integration_matrices,
44
-  association_file = association_file,
45
-  value_cols = c("seqCount", "fragmentEstimate")
43
+    x = integration_matrices,
44
+    association_file = association_file,
45
+    value_cols = c("seqCount", "fragmentEstimate")
46 46
 )
47 47
 sharing <- is_sharing(aggreg, n_comp = 3, table_for_venn = TRUE)
48 48
 venn_tbls <- sharing_venn(sharing, row_range = 1:3, euler = FALSE)
... ...
@@ -78,7 +78,8 @@ It is also possible to filter different data frames with different
78 78
 sets of conditions. Besides having the possibility of defining the
79 79
 other parameters as simple vector, which has the same results as
80 80
 operating on an unnamed list, the user can define the parameters as
81
-named lists containing vectors. For example:\if{html}{\out{<div class="r">}}\preformatted{example_df <- tibble::tibble(a = c(20, 30, 40),
81
+named lists containing vectors. For example:\if{html}{\out{<div class="r">}}\preformatted{
82
+example_df <- tibble::tibble(a = c(20, 30, 40),
82 83
                              b = c(40, 50, 60),
83 84
                              c = c("a", "b", "c"),
84 85
                              d = c(3L, 4L, 5L))
... ...
@@ -86,30 +87,31 @@ example_list <- list(first = example_df,
86 87
                      second = example_df,
87 88
                      third = example_df)
88 89
 print(example_list)
89
-}\if{html}{\out{</div>}}\preformatted{## $first
90
-## # A tibble: 3 × 4
91
-##       a     b c         d
92
-##   <dbl> <dbl> <chr> <int>
93
-## 1    20    40 a         3
94
-## 2    30    50 b         4
95
-## 3    40    60 c         5
96
-## 
97
-## $second
98
-## # A tibble: 3 × 4
99
-##       a     b c         d
100
-##   <dbl> <dbl> <chr> <int>
101
-## 1    20    40 a         3
102
-## 2    30    50 b         4
103
-## 3    40    60 c         5
104
-## 
105
-## $third
106
-## # A tibble: 3 × 4
107
-##       a     b c         d
108
-##   <dbl> <dbl> <chr> <int>
109
-## 1    20    40 a         3
110
-## 2    30    50 b         4
111
-## 3    40    60 c         5
112
-}\if{html}{\out{<div class="r">}}\preformatted{filtered <- threshold_filter(example_list,
90
+#> $first
91
+#> # A tibble: 3 × 4
92
+#>       a     b c         d
93
+#>   <dbl> <dbl> <chr> <int>
94
+#> 1    20    40 a         3
95
+#> 2    30    50 b         4
96
+#> 3    40    60 c         5
97
+#> 
98
+#> $second
99
+#> # A tibble: 3 × 4
100
+#>       a     b c         d
101
+#>   <dbl> <dbl> <chr> <int>
102
+#> 1    20    40 a         3
103
+#> 2    30    50 b         4
104
+#> 3    40    60 c         5
105
+#> 
106
+#> $third
107
+#> # A tibble: 3 × 4
108
+#>       a     b c         d
109
+#>   <dbl> <dbl> <chr> <int>
110
+#> 1    20    40 a         3
111
+#> 2    30    50 b         4
112
+#> 3    40    60 c         5
113
+
114
+filtered <- threshold_filter(example_list,
113 115
 threshold = list(first = c(20, 60),
114 116
 third = c(25)),
115 117
 cols_to_compare = list(first = c("a", "b"),
... ...
@@ -117,27 +119,27 @@ third = c("a")),
117 119
 comparators = list(first = c(">", "<"),
118 120
 third = c(">=")))
119 121
 print(filtered)
120
-}\if{html}{\out{</div>}}\preformatted{## $first
121
-## # A tibble: 1 × 4
122
-##       a     b c         d
123
-##   <dbl> <dbl> <chr> <int>
124
-## 1    30    50 b         4
125
-## 
126
-## $second
127
-## # A tibble: 3 × 4
128
-##       a     b c         d
129
-##   <dbl> <dbl> <chr> <int>
130
-## 1    20    40 a         3
131
-## 2    30    50 b         4
132
-## 3    40    60 c         5
133
-## 
134
-## $third
135
-## # A tibble: 2 × 4
136
-##       a     b c         d
137
-##   <dbl> <dbl> <chr> <int>
138
-## 1    30    50 b         4
139
-## 2    40    60 c         5
140
-}
122
+#> $first
123
+#> # A tibble: 1 × 4
124
+#>       a     b c         d
125
+#>   <dbl> <dbl> <chr> <int>
126
+#> 1    30    50 b         4
127
+#> 
128
+#> $second
129
+#> # A tibble: 3 × 4
130
+#>       a     b c         d
131
+#>   <dbl> <dbl> <chr> <int>
132
+#> 1    20    40 a         3
133
+#> 2    30    50 b         4
134
+#> 3    40    60 c         5
135
+#> 
136
+#> $third
137
+#> # A tibble: 2 × 4
138
+#>       a     b c         d
139
+#>   <dbl> <dbl> <chr> <int>
140
+#> 1    30    50 b         4
141
+#> 2    40    60 c         5
142
+}\if{html}{\out{</div>}}
141 143
 
142 144
 The above signature will roughly be translated as:
143 145
 \itemize{
... ...
@@ -176,30 +178,30 @@ be filtered
176 178
 }
177 179
 \examples{
178 180
 example_df <- tibble::tibble(
179
-  a = c(20, 30, 40),
180
-  b = c(40, 50, 60),
181
-  c = c("a", "b", "c"),
182
-  d = c(3L, 4L, 5L)
181
+    a = c(20, 30, 40),
182
+    b = c(40, 50, 60),
183
+    c = c("a", "b", "c"),
184
+    d = c(3L, 4L, 5L)
183 185
 )
184 186
 example_list <- list(
185
-  first = example_df,
186
-  second = example_df,
187
-  third = example_df
187
+    first = example_df,
188
+    second = example_df,
189
+    third = example_df
188 190
 )
189 191
 
190 192
 filtered <- threshold_filter(example_list,
191
-  threshold = list(
192
-    first = c(20, 60),
193
-    third = c(25)
194
-  ),
195
-  cols_to_compare = list(
196
-    first = c("a", "b"),
197
-    third = c("a")
198
-  ),
199
-  comparators = list(
200
-    first = c(">", "<"),
201
-    third = c(">=")
202
-  )
193
+    threshold = list(
194
+        first = c(20, 60),
195
+        third = c(25)
196
+    ),
197
+    cols_to_compare = list(
198
+        first = c("a", "b"),
199
+        third = c("a")
200
+    ),
201
+    comparators = list(
202
+        first = c(">", "<"),
203
+        third = c(">=")
204
+    )
203 205
 )
204 206
 filtered
205 207
 }
... ...
@@ -64,9 +64,9 @@ is required. To visualize the resulting object:\preformatted{gridExtra::grid.arr
64 64
 data("integration_matrices", package = "ISAnalytics")
65 65
 data("association_file", package = "ISAnalytics")
66 66
 aggreg <- aggregate_values_by_key(
67
-  x = integration_matrices,
68
-  association_file = association_file,
69
-  value_cols = c("seqCount", "fragmentEstimate")
67
+    x = integration_matrices,
68
+    association_file = association_file,
69
+    value_cols = c("seqCount", "fragmentEstimate")
70 70
 )
71 71
 abund <- compute_abundance(x = aggreg)
72 72
 grob <- top_abund_tableGrob(abund)
... ...
@@ -50,24 +50,24 @@ by passing a vector of column names or passing 2 "shortcuts":
50 50
 }
51 51
 \examples{
52 52
 smpl <- tibble::tibble(
53
-  chr = c("1", "2", "3", "4", "5", "6"),
54
-  integration_locus = c(14536, 14544, 14512, 14236, 14522, 14566),
55
-  strand = c("+", "+", "-", "+", "-", "+"),
56
-  CompleteAmplificationID = c("ID1", "ID2", "ID1", "ID1", "ID3", "ID2"),
57
-  Value = c(3, 10, 40, 2, 15, 150),
58
-  Value2 = c(456, 87, 87, 9, 64, 96),
59
-  Value3 = c("a", "b", "c", "d", "e", "f")
53
+    chr = c("1", "2", "3", "4", "5", "6"),
54
+    integration_locus = c(14536, 14544, 14512, 14236, 14522, 14566),
55
+    strand = c("+", "+", "-", "+", "-", "+"),
56
+    CompleteAmplificationID = c("ID1", "ID2", "ID1", "ID1", "ID3", "ID2"),
57
+    Value = c(3, 10, 40, 2, 15, 150),
58
+    Value2 = c(456, 87, 87, 9, 64, 96),
59
+    Value3 = c("a", "b", "c", "d", "e", "f")
60 60
 )
61 61
 top <- top_integrations(smpl,
62
-  n = 3,
63
-  columns = c("Value", "Value2"),
64
-  keep = "nothing"
62
+    n = 3,
63
+    columns = c("Value", "Value2"),
64
+    keep = "nothing"
65 65
 )
66 66
 top_key <- top_integrations(smpl,
67
-  n = 3,
68
-  columns = "Value",
69
-  keep = "Value2",
70
-  key = "CompleteAmplificationID"
67
+    n = 3,
68
+    columns = "Value",
69
+    keep = "Value2",
70
+    key = "CompleteAmplificationID"
71 71
 )
72 72
 }
73 73
 \seealso{
... ...
@@ -78,7 +78,7 @@ A default is already supplied:
78 78
 
79 79
 ```{r echo=FALSE}
80 80
 library(ISAnalytics)
81
-knitr::kable(default_meta_agg()) 
81
+print(default_meta_agg(), width = Inf)
82 82
 ```
83 83
 
84 84
 You can either provide purrr-style lambdas (as given in the example above),
... ...
@@ -102,10 +102,7 @@ aggregated_meta <- aggregate_metadata(association_file = association_file)
102 102
 ```
103 103
 
104 104
 ```{r echo=FALSE}
105
-DT::datatable(aggregated_meta, 
106
-              rownames = FALSE,
107
-              options = list(dom = "t", 
108
-                             scrollX = 120))
105
+print(aggregated_meta)
109 106
 ```
110 107
 
111 108
 # Aggregation of values by key
... ...
@@ -131,10 +128,7 @@ aggreg <- aggregate_values_by_key(
131 128
 ```
132 129
 
133 130
 ```{r echo=FALSE}
134
-DT::datatable(head(aggreg),
135
-              rownames = FALSE,
136
-              options = list(dom = "t",
137
-                             scrollX = 120))
131
+print(aggreg, width = Inf)
138 132
 ```
139 133
 
140 134
 The function `aggregate_values_by_key` can perform the aggregation both on the 
... ...
@@ -164,10 +158,7 @@ agg1 <- aggregate_values_by_key(
164 158
 ```
165 159
 
166 160
 ```{r echo=FALSE}
167
-DT::datatable(head(agg1),
168
-              rownames = FALSE,
169
-              options = list(dom = "t",
170
-                             scrollX = 120))
161
+print(agg1, width = Inf)
171 162
 ```
172 163
 
173 164
 2. **Changing the `lambda` value**  
... ...
@@ -193,10 +184,7 @@ agg2 <- aggregate_values_by_key(
193 184
 ```
194 185
 
195 186
 ```{r echo=FALSE}
196
-DT::datatable(head(agg2),
197
-              rownames = FALSE,
198
-              options = list(dom = "t",
199
-                             scrollX = 120))
187
+print(agg2, width = Inf)
200 188
 ```
201 189
 
202 190
 Note that, when specifying purrr-style lambdas (formulas), the first 
... ...
@@ -217,10 +205,7 @@ agg3 <- aggregate_values_by_key(
217 205
 ```
218 206
 
219 207
 ```{r echo=FALSE}
220
-DT::datatable(head(agg3),
221
-              rownames = FALSE,
222
-              options = list(dom = "t",
223
-                             scrollX = 120))
208
+print(agg3, width = Inf)
224 209
 ```
225 210
 
226 211
 3. **Changing the `value_cols` value**  
... ...
@@ -241,10 +226,7 @@ agg4 <- aggregate_values_by_key(
241 226
 ```
242 227
 
243 228
 ```{r echo=FALSE}
244
-DT::datatable(head(agg4),
245
-              rownames = FALSE,
246
-              options = list(dom = "t",
247
-                             scrollX = 120))
229
+print(agg4, width = Inf)
248 230
 ```
249 231
 
250 232
 4. **Changing the `group` value**  
... ...
@@ -267,10 +249,7 @@ agg5 <- aggregate_values_by_key(
267 249
 ```
268 250
 
269 251
 ```{r echo=FALSE}
270
-DT::datatable(head(agg5),
271
-              rownames = FALSE,
272
-              options = list(dom = "t",
273
-                             scrollX = 120))
252
+print(agg5, width = Inf)
274 253
 ```
275 254
 
276 255
 # Reproducibility
... ...
@@ -124,9 +124,7 @@ sample_sparse_matrix <- tibble::tribble(
124 124
   "6", 657532, "+", "LOC100507487", "+", 76,545,5,
125 125
   "7", 657532, "+", "EDIL3", "-", NA_integer_,56,NA_integer_,
126 126
 )
127
-DT::datatable(sample_sparse_matrix, 
128
-              rownames = FALSE,
129
-              options = list(dom = "t", scrollX = 120))
127
+print(sample_sparse_matrix, width = Inf)
130 128
 ```
131 129
 
132 130
 The package uses a more compact form of these matrices, limiting the amount
... ...
@@ -167,9 +165,7 @@ withr::with_options(list(ISAnalytics.reports = FALSE), code = {
167 165
 ```
168 166
 
169 167
 ```{r echo=FALSE}
170
-DT::datatable(head(af), 
171
-              rownames = FALSE,
172
-              options = list(dom = "t", scrollX = 120))
168
+print(head(af), width = Inf)
173 169
 ```
174 170
 
175 171
 ## Function arguments
... ...
@@ -242,9 +238,7 @@ withr::with_options(list(ISAnalytics.reports = FALSE), {
242 238
 ```
243 239
 
244 240
 ```{r echo=FALSE}
245
-DT::datatable(head(vispa_stats), 
246
-              rownames = FALSE,
247
-              options = list(dom = "t", scrollX = 120))
241
+print(head(vispa_stats))
248 242
 ```
249 243
 
250 244
 The function requires as input the imported and file system aligned
... ...
@@ -276,9 +270,7 @@ matrix <- import_single_Vispa2Matrix(matrix_path)
276 270
 ```
277 271
 
278 272
 ```{r echo=FALSE}
279
-DT::datatable(head(matrix), 
280
-              rownames = FALSE,
281
-              options = list(dom = "t", scrollX = 120))
273
+matrix
282 274
 ```
283 275
 
284 276
 Other arguments you can pass to the function are
... ...
@@ -357,9 +349,7 @@ single data frames that has a dedicated column for each quantification.
357 349
 For example, for the matrices we've imported before:
358 350
 
359 351
 ```{r echo=FALSE}
360
-DT::datatable(head(matrices), 
361
-              rownames = FALSE,
362
-              options = list(dom = "t", scrollX = 120))
352
+print(head(matrices), width = Inf)
363 353
 ```
364 354
 
365 355
 ### `report_path` argument
366 356
deleted file mode 100644
... ...
@@ -1,122 +0,0 @@
1
-title: "ISAnalytics report system"
2
-author: 
3
-  - name: Giulia Pais
4
-    affiliation: | 
5
-     San Raffaele Telethon Institute for Gene Therapy - SR-Tiget, 
6
-     Via Olgettina 60, 20132 Milano - Italia
7
-    email: giuliapais1@gmail.com, calabria.andrea@hsr.it
8
-output: 
9
-  BiocStyle::html_document:
10
-    self_contained: yes
11
-    toc: true
12
-    toc_float: true
13
-    toc_depth: 2
14
-    code_folding: show
15
-date: "`r doc_date()`"
16
-package: "`r pkg_ver('ISAnalytics')`"
17
-vignette: >
18
-  %\VignetteIndexEntry{report_system}
19
-  %\VignetteEngine{knitr::rmarkdown}
20
-  %\VignetteEncoding{UTF-8}
21
-
22
-```{r GenSetup, include = FALSE}
23
-knitr::opts_chunk$set(
24
-    collapse = TRUE,
25
-    comment = "#>",
26
-    crop = NULL ## Related to https://stat.ethz.ch/pipermail/bioc-devel/2020-April/016656.html
27
-)
28
-```
29
-
30
-```{r vignetteSetup, echo=FALSE, message=FALSE, warning = FALSE}
31
-## Bib setup
32
-library("RefManageR")
33
-
34
-## Write bibliography information
35
-bib <- c(
36
-    R = citation(),
37
-    BiocStyle = citation("BiocStyle")[1],
38
-    knitr = citation("knitr")[1],
39
-    RefManageR = citation("RefManageR")[1],
40
-    rmarkdown = citation("rmarkdown")[1],
41
-    sessioninfo = citation("sessioninfo")[1],
42
-    testthat = citation("testthat")[1],
43
-    ISAnalytics = citation("ISAnalytics")[1],
44
-    flexdashboard = citation("flexdashboard")[1],
45
-    DT = citation("DT")[1],
46
-    plotly = citation("plotly")[1],
47
-    eulerr = citation("eulerr")[1]
48
-)
49
-```
50
-
51
-# Introduction
52
-
53
-In `ISAnalytics`, several implemented functions produce interactive reports in 
54
-HTML format that not only provide a summary of the process but also provide 
55
-guarantee of reproducibility of results. In this article we're going to
56
-explain more in depth how the report system works.
57
-
58
-```{r echo=FALSE}
59
-inst_chunk_path <- system.file("rmd", "install_and_options.Rmd", package = "ISAnalytics")
60
-```
61
-
62
-```{r child=inst_chunk_path}
63
-
64
-```
65
-
66
-# Enabling reports and required tools
67
-
68
-Report production is in no way mandatory, in fact it must be enabled through 
69
-the option `ISAnalytics.reports`. By default the option is enabled when the 
70
-package is loaded. 
71
-
72
-Reports require a few additional packages that are listed under the package
73
-"Suggests" list, among these we find:
74
-
75
-* `r CRANpkg("rmarkdown")` `r Citep(bib[["rmarkdown"]])`
76
-* `r CRANpkg("flexdashboard")` `r Citep(bib[["flexdashboard"]])`
77
-* `r CRANpkg("DT")` `r Citep(bib[["DT"]])`
78
-* `r CRANpkg("plotly")` `r Citep(bib[["plotly"]])`
79
-* `r CRANpkg("eulerr")` `r Citep(bib[["eulerr"]])`
80
-
81
-# Functions
82
-
83
-Functions that produce interactive reports always have a function argument
84
-`report_path`, which must contain a valid path on disk where the compiled
85
-report should be saved. By default this is set to the 
86
-`{user home}/ISAnalytics_reports`, but it can be changed according to user
87
-preference. Accepted formats include:
88
-
89
-* `NULL`: it is a convenient and fast way to disable report production only
90
-for that particular execution. If you want to disable reports for all 
91
-functions set `ISAnalytics.reports` to `FALSE` instead.
92
-* A folder: if the folder doesn't exist the function creates it (provided
93
-the user has permission to write in the given path)
94
-* A file
95
-
96
-If report production fails for any reason, functions return their result
97
-correctly regardless and a warning message is displayed.
98
-
99
-# Reproducibility
100
-
101
-`R` session information.
102
-
103
-```{r reproduce3, echo=FALSE}
104
-## Session info
105
-library("sessioninfo")
106
-options(width = 120)
107
-session_info()
108
-```
109
-
110
-# Bibliography
111
-
112
-This vignette was generated using `r Biocpkg("BiocStyle")` `r Citep(bib[["BiocStyle"]])`
113
-with `r CRANpkg("knitr")` `r Citep(bib[["knitr"]])` and `r CRANpkg("rmarkdown")` `r Citep(bib[["rmarkdown"]])` running behind the scenes.
114
-
115
-Citations made with `r CRANpkg("RefManageR")` `r Citep(bib[["RefManageR"]])`.
116
-
117
-```{r vignetteBiblio, results = "asis", echo = FALSE, warning = FALSE, message = FALSE}
118
-## Print bibliography
119
-PrintBibliography(bib, .opts = list(hyperlink = "to.doc", style = "html"))
120
-```
... ...
@@ -74,10 +74,7 @@ data("association_file")
74 74
 ```
75 75
 
76 76
 ```{r echo=FALSE}
77
-DT::datatable(head(integration_matrices),
78
-              rownames = FALSE,
79
-              options = list(dom = "t",
80
-                             scrollX = 120))
77
+print(head(integration_matrices))
81 78
 ```
82 79
 
83 80
 We can aggregate our data in different ways according to our needs (to
... ...
@@ -90,13 +87,11 @@ sites.
90 87
 agg <- aggregate_values_by_key(integration_matrices,
91 88
                                association_file,
92 89
                                value_cols = c("seqCount", "fragmentEstimate"))
90
+agg <- agg %>% dplyr::filter(TimePoint %in% c("0030", "0060"))
93 91
 ```
94 92
 
95 93
 ```{r echo=FALSE}
96
-DT::datatable(head(agg),
97
-              rownames = FALSE,
98
-              options = list(dom = "t",
99
-                             scrollX = 120))
94
+print(agg, width = Inf)
100 95
 ```
101 96
 
102 97
 An integration site is *shared* between two or more groups if the same triple
... ...
@@ -281,7 +276,7 @@ df1 <- agg %>%
281 276
 df2 <- agg %>%
282 277
   dplyr::filter(TimePoint == "0060")
283 278
 df3 <- agg %>%
284
-  dplyr::filter(TimePoint == "0180")
279
+  dplyr::filter(Tissue == "BM")
285 280
 
286 281
 keys <- list(g1 = c("SubjectID", "CellMarker", "Tissue"),
287 282
              g2 = c("SubjectID", "Tissue"),