diff --git a/Makefile b/Makefile index 34ed34703..156e1c68b 100644 --- a/Makefile +++ b/Makefile @@ -97,7 +97,7 @@ renv: FORCE FORCE: ; DATE = `date +%y%m%d|sed 's/\ //g'` -VERSION = "v3.5.0-beta2" +VERSION = "v3.5.0-beta3" BUILD := $(VERSION)"+"$(BRANCH)""$(DATE) version: FORCE diff --git a/VERSION b/VERSION index f0195208f..40c573efc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v3.5.0-beta2+master240726 +v3.5.0-beta3+master240730 diff --git a/components/00SourceAll.R b/components/00SourceAll.R index d899e2173..e1f9a8255 100644 --- a/components/00SourceAll.R +++ b/components/00SourceAll.R @@ -1,250 +1,250 @@ ## Generated automatically: do not edit by hand -message("source all called from wd = ", getwd()) -if (!file.exists("00SourceAll.R")) { - message("WARNING: not in source folder. skipping.") +message('source all called from wd = ',getwd()) +if(!file.exists('00SourceAll.R')) { + message('WARNING: not in source folder. skipping.') } else { - message("Note: sourcing all code...") - source("app/R/utils/auth.R", encoding = "UTF-8") - source("app/R/utils/database.R", encoding = "UTF-8") - source("app/R/utils/open_url.R", encoding = "UTF-8") - source("app/R/utils/utils.R", encoding = "UTF-8") - source("board.biomarker/R/biomarker_plot_boxplots.R", encoding = "UTF-8") - source("board.biomarker/R/biomarker_plot_decisiontree.R", encoding = "UTF-8") - source("board.biomarker/R/biomarker_plot_featurerank.R", encoding = "UTF-8") - source("board.biomarker/R/biomarker_plot_heatmap.R", encoding = "UTF-8") - source("board.biomarker/R/biomarker_plot_importance.R", encoding = "UTF-8") - source("board.biomarker/R/biomarker_server.R", encoding = "UTF-8") - source("board.biomarker/R/biomarker_ui.R", encoding = "UTF-8") - source("board.clustering/R/clustering_plot_clustannot.R", encoding = "UTF-8") - source("board.clustering/R/clustering_plot_clusterpca.R", encoding = "UTF-8") - source("board.clustering/R/clustering_plot_genemodule.R", encoding = "UTF-8") - source("board.clustering/R/clustering_plot_PCAplot.R", encoding = "UTF-8") - source("board.clustering/R/clustering_plot_phenoplot.R", encoding = "UTF-8") - source("board.clustering/R/clustering_plot_splitmap.R", encoding = "UTF-8") - source("board.clustering/R/clustering_plot_table_parcoord.R", encoding = "UTF-8") - source("board.clustering/R/clustering_server.R", encoding = "UTF-8") - source("board.clustering/R/clustering_table_clustannot.R", encoding = "UTF-8") - source("board.clustering/R/clustering_ui.R", encoding = "UTF-8") - source("board.compare/R/compare_plot_compare1.R", encoding = "UTF-8") - source("board.compare/R/compare_plot_compare2.R", encoding = "UTF-8") - source("board.compare/R/compare_plot_cum_fc1.R", encoding = "UTF-8") - source("board.compare/R/compare_plot_cum_fc2.R", encoding = "UTF-8") - source("board.compare/R/compare_plot_expression.R", encoding = "UTF-8") - source("board.compare/R/compare_plot_fc_correlation.R", encoding = "UTF-8") - source("board.compare/R/compare_plot_gene_corr.R", encoding = "UTF-8") - source("board.compare/R/compare_server.R", encoding = "UTF-8") - source("board.compare/R/compare_table_corr_score.R", encoding = "UTF-8") - source("board.compare/R/compare_ui.R", encoding = "UTF-8") - source("board.connectivity/R/connectivity_plot_connectivityHeatmap.R", encoding = "UTF-8") - source("board.connectivity/R/connectivity_plot_connectivityMap.R", encoding = "UTF-8") - source("board.connectivity/R/connectivity_plot_cumEnrichmentPlot.R", encoding = "UTF-8") - source("board.connectivity/R/connectivity_plot_cumFCplot.R", encoding = "UTF-8") - source("board.connectivity/R/connectivity_plot_enrichmentGraph.R", encoding = "UTF-8") - source("board.connectivity/R/connectivity_plot_FCFCplots.R", encoding = "UTF-8") - source("board.connectivity/R/connectivity_plot_leadingEdgeGraph.R", encoding = "UTF-8") - source("board.connectivity/R/connectivity_plot_scatterPlot.R", encoding = "UTF-8") - source("board.connectivity/R/connectivity_server.R", encoding = "UTF-8") - source("board.connectivity/R/connectivity_table_foldchange.R", encoding = "UTF-8") - source("board.connectivity/R/connectivity_table_similarity_scores.R", encoding = "UTF-8") - source("board.connectivity/R/connectivity_ui.R", encoding = "UTF-8") - source("board.correlation/R/correlation_plot_barplot.R", encoding = "UTF-8") - source("board.correlation/R/correlation_plot_cor_graph.R", encoding = "UTF-8") - source("board.correlation/R/correlation_plot_correlation_UMAP.R", encoding = "UTF-8") - source("board.correlation/R/correlation_plot_scattercorr.R", encoding = "UTF-8") - source("board.correlation/R/correlation_server.R", encoding = "UTF-8") - source("board.correlation/R/correlation_table_corr.R", encoding = "UTF-8") - source("board.correlation/R/correlation_ui.R", encoding = "UTF-8") - source("board.dataview/R/dataview_module_geneinfo.R", encoding = "UTF-8") - source("board.dataview/R/dataview_plot_abundance.R", encoding = "UTF-8") - source("board.dataview/R/dataview_plot_averagecounts.R", encoding = "UTF-8") - source("board.dataview/R/dataview_plot_averagerank.R", encoding = "UTF-8") - source("board.dataview/R/dataview_plot_boxplot.R", encoding = "UTF-8") - source("board.dataview/R/dataview_plot_correlation.R", encoding = "UTF-8") - source("board.dataview/R/dataview_plot_expression.R", encoding = "UTF-8") - source("board.dataview/R/dataview_plot_genetypes.R", encoding = "UTF-8") - source("board.dataview/R/dataview_plot_histogram.R", encoding = "UTF-8") - source("board.dataview/R/dataview_plot_phenoassociation.R", encoding = "UTF-8") - source("board.dataview/R/dataview_plot_phenoheatmap.R", encoding = "UTF-8") - source("board.dataview/R/dataview_plot_tissue.R", encoding = "UTF-8") - source("board.dataview/R/dataview_plot_totalcounts.R", encoding = "UTF-8") - source("board.dataview/R/dataview_plot_tsneplot.R", encoding = "UTF-8") - source("board.dataview/R/dataview_server.R", encoding = "UTF-8") - source("board.dataview/R/dataview_table_contrasts.R", encoding = "UTF-8") - source("board.dataview/R/dataview_table_rawdata.R", encoding = "UTF-8") - source("board.dataview/R/dataview_table_samples.R", encoding = "UTF-8") - source("board.dataview/R/dataview_ui.R", encoding = "UTF-8") - source("board.drugconnectivity/R/drugconnectivity_plot_actmap.R", encoding = "UTF-8") - source("board.drugconnectivity/R/drugconnectivity_plot_cmap_dsea.R", encoding = "UTF-8") - source("board.drugconnectivity/R/drugconnectivity_plot_cmap_enplot.R", encoding = "UTF-8") - source("board.drugconnectivity/R/drugconnectivity_plot_enplots.R", encoding = "UTF-8") - source("board.drugconnectivity/R/drugconnectivity_plot_moa.R", encoding = "UTF-8") - source("board.drugconnectivity/R/drugconnectivity_server.R", encoding = "UTF-8") - source("board.drugconnectivity/R/drugconnectivity_table_cmap.R", encoding = "UTF-8") - source("board.drugconnectivity/R/drugconnectivity_table_dsea.R", encoding = "UTF-8") - source("board.drugconnectivity/R/drugconnectivity_ui.R", encoding = "UTF-8") - source("board.enrichment/R/enrichment_plot_barplot.R", encoding = "UTF-8") - source("board.enrichment/R/enrichment_plot_compare.R", encoding = "UTF-8") - source("board.enrichment/R/enrichment_plot_freq_top_gsets.R", encoding = "UTF-8") - source("board.enrichment/R/enrichment_plot_geneplot.R", encoding = "UTF-8") - source("board.enrichment/R/enrichment_plot_scatter.R", encoding = "UTF-8") - source("board.enrichment/R/enrichment_plot_top_enrich_gsets.R", encoding = "UTF-8") - source("board.enrichment/R/enrichment_plot_volcano.R", encoding = "UTF-8") - source("board.enrichment/R/enrichment_plot_volcanoall.R", encoding = "UTF-8") - source("board.enrichment/R/enrichment_plot_volcanomethods.R", encoding = "UTF-8") - source("board.enrichment/R/enrichment_server.R", encoding = "UTF-8") - source("board.enrichment/R/enrichment_table_enrichment_analysis.R", encoding = "UTF-8") - source("board.enrichment/R/enrichment_table_genes_in_geneset_ui.R", encoding = "UTF-8") - source("board.enrichment/R/enrichment_table_gset_enrich_all_contrasts.R", encoding = "UTF-8") - source("board.enrichment/R/enrichment_table_n_sig_gsets.R", encoding = "UTF-8") - source("board.enrichment/R/enrichment_ui.R", encoding = "UTF-8") - source("board.expression/R/expression_plot_barplot.R", encoding = "UTF-8") - source("board.expression/R/expression_plot_maplot.R", encoding = "UTF-8") - source("board.expression/R/expression_plot_topfoldchange.R", encoding = "UTF-8") - source("board.expression/R/expression_plot_topgenes.R", encoding = "UTF-8") - source("board.expression/R/expression_plot_volcano.R", encoding = "UTF-8") - source("board.expression/R/expression_plot_volcanoAll.R", encoding = "UTF-8") - source("board.expression/R/expression_plot_volcanoMethods.R", encoding = "UTF-8") - source("board.expression/R/expression_server.R", encoding = "UTF-8") - source("board.expression/R/expression_table_fctable.R", encoding = "UTF-8") - source("board.expression/R/expression_table_FDRtable.R", encoding = "UTF-8") - source("board.expression/R/expression_table_genetable.R", encoding = "UTF-8") - source("board.expression/R/expression_table_gsettable.R", encoding = "UTF-8") - source("board.expression/R/expression_ui.R", encoding = "UTF-8") - source("board.featuremap/R/featuremap_plot_gene_sig.R", encoding = "UTF-8") - source("board.featuremap/R/featuremap_plot_gset_sig.R", encoding = "UTF-8") - source("board.featuremap/R/featuremap_plot_table_gene_map.R", encoding = "UTF-8") - source("board.featuremap/R/featuremap_plot_table_geneset_map.R", encoding = "UTF-8") - source("board.featuremap/R/featuremap_server.R", encoding = "UTF-8") - source("board.featuremap/R/featuremap_ui.R", encoding = "UTF-8") - source("board.intersection/R/intersection_plot_contrast_correlation.R", encoding = "UTF-8") - source("board.intersection/R/intersection_plot_foldchange_heatmap.R", encoding = "UTF-8") - source("board.intersection/R/intersection_plot_scatterplot_pairs.R", encoding = "UTF-8") - source("board.intersection/R/intersection_plot_table_venn_diagram.R", encoding = "UTF-8") - source("board.intersection/R/intersection_server.R", encoding = "UTF-8") - source("board.intersection/R/intersection_ui.R", encoding = "UTF-8") - source("board.loading/R/loading_module_received.R", encoding = "UTF-8") - source("board.loading/R/loading_module_shared.R", encoding = "UTF-8") - source("board.loading/R/loading_server.R", encoding = "UTF-8") - source("board.loading/R/loading_table_datasets_public.R", encoding = "UTF-8") - source("board.loading/R/loading_table_datasets.R", encoding = "UTF-8") - source("board.loading/R/loading_tsneplot.R", encoding = "UTF-8") - source("board.loading/R/loading_ui.R", encoding = "UTF-8") - source("board.loading/R/loading_utils.R", encoding = "UTF-8") - source("board.pathway/R/pathway_enrichmap.R", encoding = "UTF-8") - source("board.pathway/R/pathway_plot_enrichmap.R", encoding = "UTF-8") - source("board.pathway/R/pathway_plot_go_actmap.R", encoding = "UTF-8") - source("board.pathway/R/pathway_plot_go_network.R", encoding = "UTF-8") - source("board.pathway/R/pathway_plot_reactome_actmap.R", encoding = "UTF-8") - source("board.pathway/R/pathway_plot_reactome_graph.R", encoding = "UTF-8") - source("board.pathway/R/pathway_plot_wikipathway_actmap.R", encoding = "UTF-8") - source("board.pathway/R/pathway_plot_wikipathway_graph.R", encoding = "UTF-8") - source("board.pathway/R/pathway_server.R", encoding = "UTF-8") - source("board.pathway/R/pathway_table_go_table.R", encoding = "UTF-8") - source("board.pathway/R/pathway_table_reactome.R", encoding = "UTF-8") - source("board.pathway/R/pathway_table_wikipathway.R", encoding = "UTF-8") - source("board.pathway/R/pathway_ui.R", encoding = "UTF-8") - source("board.pathway/R/pathway_wikipathview.R", encoding = "UTF-8") - source("board.pcsf/R/pcsf_plot_heatmap.R", encoding = "UTF-8") - source("board.pcsf/R/pcsf_plot_network.R", encoding = "UTF-8") - source("board.pcsf/R/pcsf_server.R", encoding = "UTF-8") - source("board.pcsf/R/pcsf_ui.R", encoding = "UTF-8") - source("board.pcsf/R/util_pcsf.R", encoding = "UTF-8") - source("board.signature/R/signature_plot_enplots.R", encoding = "UTF-8") - source("board.signature/R/signature_plot_markers.R", encoding = "UTF-8") - source("board.signature/R/signature_plot_overlap.R", encoding = "UTF-8") - source("board.signature/R/signature_plot_volcano.R", encoding = "UTF-8") - source("board.signature/R/signature_server.R", encoding = "UTF-8") - source("board.signature/R/signature_table_enrich_by_contrasts.R", encoding = "UTF-8") - source("board.signature/R/signature_table_genes_in_signature.R", encoding = "UTF-8") - source("board.signature/R/signature_table_overlap.R", encoding = "UTF-8") - source("board.signature/R/signature_ui.R", encoding = "UTF-8") - source("board.singlecell/R/singlecell_plot_crosstabPlot.R", encoding = "UTF-8") - source("board.singlecell/R/singlecell_plot_cytoplot.R", encoding = "UTF-8") - source("board.singlecell/R/singlecell_plot_icpplot.R", encoding = "UTF-8") - source("board.singlecell/R/singlecell_plot_mappingplot.R", encoding = "UTF-8") - source("board.singlecell/R/singlecell_plot_markersplot.R", encoding = "UTF-8") - source("board.singlecell/R/singlecell_plot_phenoplot.R", encoding = "UTF-8") - source("board.singlecell/R/singlecell_server.R", encoding = "UTF-8") - source("board.singlecell/R/singlecell_ui.R", encoding = "UTF-8") - source("board.tcga/R/tcga_plot_survival.R", encoding = "UTF-8") - source("board.tcga/R/tcga_server.R", encoding = "UTF-8") - source("board.tcga/R/tcga_ui.R", encoding = "UTF-8") - source("board.upload/R/upload_module_batchcorrect.R", encoding = "UTF-8") - source("board.upload/R/upload_module_computepgx.R", encoding = "UTF-8") - source("board.upload/R/upload_module_initial_settings.R", encoding = "UTF-8") - source("board.upload/R/upload_module_makecontrast.R", encoding = "UTF-8") - source("board.upload/R/upload_module_normalization.R", encoding = "UTF-8") - source("board.upload/R/upload_module_outliers.R", encoding = "UTF-8") - source("board.upload/R/upload_module_preview_contrasts.R", encoding = "UTF-8") - source("board.upload/R/upload_module_preview_counts.R", encoding = "UTF-8") - source("board.upload/R/upload_module_preview_samples.R", encoding = "UTF-8") - source("board.upload/R/upload_plot_contraststats.R", encoding = "UTF-8") - source("board.upload/R/upload_plot_countstats.R", encoding = "UTF-8") - source("board.upload/R/upload_plot_pcaplot.R", encoding = "UTF-8") - source("board.upload/R/upload_plot_phenostats.R", encoding = "UTF-8") - source("board.upload/R/upload_server.R", encoding = "UTF-8") - source("board.upload/R/upload_ui.R", encoding = "UTF-8") - source("board.upload/R/upload_utils.R", encoding = "UTF-8") - source("board.user/R/appsettings_server.R", encoding = "UTF-8") - source("board.user/R/appsettings_ui.R", encoding = "UTF-8") - source("board.user/R/user_table_resources.R", encoding = "UTF-8") - source("board.user/R/userprofile_server.R", encoding = "UTF-8") - source("board.user/R/userprofile_ui.R", encoding = "UTF-8") - source("board.wgcna/R/wgcna_plot_correlation_network.R", encoding = "UTF-8") - source("board.wgcna/R/wgcna_plot_eigengene_clustering.R", encoding = "UTF-8") - source("board.wgcna/R/wgcna_plot_enrichment.R", encoding = "UTF-8") - source("board.wgcna/R/wgcna_plot_gclustering.R", encoding = "UTF-8") - source("board.wgcna/R/wgcna_plot_gdendogram.R", encoding = "UTF-8") - source("board.wgcna/R/wgcna_plot_heatmap_membership.R", encoding = "UTF-8") - source("board.wgcna/R/wgcna_plot_membership_v_trait.R", encoding = "UTF-8") - source("board.wgcna/R/wgcna_plot_module_graph.R", encoding = "UTF-8") - source("board.wgcna/R/wgcna_plot_module_membership.R", encoding = "UTF-8") - source("board.wgcna/R/wgcna_plot_MTrelationships.R", encoding = "UTF-8") - source("board.wgcna/R/wgcna_plot_s_independence.R", encoding = "UTF-8") - source("board.wgcna/R/wgcna_plot_TOMheatmap.R", encoding = "UTF-8") - source("board.wgcna/R/wgcna_server.R", encoding = "UTF-8") - source("board.wgcna/R/wgcna_table_enrichment.R", encoding = "UTF-8") - source("board.wgcna/R/wgcna_table_genes.R", encoding = "UTF-8") - source("board.wgcna/R/wgcna_ui.R", encoding = "UTF-8") - source("board.wordcloud/R/wordcloud_plot_enrichment.R", encoding = "UTF-8") - source("board.wordcloud/R/wordcloud_plot_wordcloud.R", encoding = "UTF-8") - source("board.wordcloud/R/wordcloud_plot_wordtsne.R", encoding = "UTF-8") - source("board.wordcloud/R/wordcloud_server.R", encoding = "UTF-8") - source("board.wordcloud/R/wordcloud_table_enrichment.R", encoding = "UTF-8") - source("board.wordcloud/R/wordcloud_table_leading_edge.R", encoding = "UTF-8") - source("board.wordcloud/R/wordcloud_ui.R", encoding = "UTF-8") - source("modules/AuthenticationModule_functions.R", encoding = "UTF-8") - source("modules/AuthenticationModule_ui.R", encoding = "UTF-8") - source("modules/AuthenticationModule.R", encoding = "UTF-8") - source("modules/CookiesModule.R", encoding = "UTF-8") - source("modules/DatasetReport.R", encoding = "UTF-8") - source("modules/InfoModals.R", encoding = "UTF-8") - source("modules/InviteFriend.R", encoding = "UTF-8") - source("modules/NormalizeCountsModule.R", encoding = "UTF-8") - source("modules/PlotDownloadLogger.R", encoding = "UTF-8") - source("modules/QuestionModule.R", encoding = "UTF-8") - source("modules/TimerModule.R", encoding = "UTF-8") - source("modules/UserAccessControl.R", encoding = "UTF-8") - source("modules/UserInactivityControl.R", encoding = "UTF-8") - source("modules/UsersMapModule.R", encoding = "UTF-8") - source("modules/WelcomeBoard.R", encoding = "UTF-8") - source("ui/bs-components.R", encoding = "UTF-8") - source("ui/ui-alerts.R", encoding = "UTF-8") - source("ui/ui-bigdashplus.R", encoding = "UTF-8") - source("ui/ui-boardHeader.R", encoding = "UTF-8") - source("ui/ui-code.R", encoding = "UTF-8") - source("ui/ui-colors.R", encoding = "UTF-8") - source("ui/ui-defaults.R", encoding = "UTF-8") - source("ui/ui-DropDownMenu.R", encoding = "UTF-8") - source("ui/ui-fileInputArea.R", encoding = "UTF-8") - source("ui/ui-links.R", encoding = "UTF-8") - source("ui/ui-modalUI.R", encoding = "UTF-8") - source("ui/ui-PlotModule.R", encoding = "UTF-8") - source("ui/ui-startupModal.R", encoding = "UTF-8") - source("ui/ui-TableModule2.R", encoding = "UTF-8") - source("ui/ui-tooltip.R", encoding = "UTF-8") - source("ui/ui-utils.R", encoding = "UTF-8") - source("ui/ui-vizpanels.R", encoding = "UTF-8") - message("done! (sourcing all code)") + message('Note: sourcing all code...') + source('app/R/utils/auth.R',encoding='UTF-8') + source('app/R/utils/database.R',encoding='UTF-8') + source('app/R/utils/open_url.R',encoding='UTF-8') + source('app/R/utils/utils.R',encoding='UTF-8') + source('board.biomarker/R/biomarker_plot_boxplots.R',encoding='UTF-8') + source('board.biomarker/R/biomarker_plot_decisiontree.R',encoding='UTF-8') + source('board.biomarker/R/biomarker_plot_featurerank.R',encoding='UTF-8') + source('board.biomarker/R/biomarker_plot_heatmap.R',encoding='UTF-8') + source('board.biomarker/R/biomarker_plot_importance.R',encoding='UTF-8') + source('board.biomarker/R/biomarker_server.R',encoding='UTF-8') + source('board.biomarker/R/biomarker_ui.R',encoding='UTF-8') + source('board.clustering/R/clustering_plot_clustannot.R',encoding='UTF-8') + source('board.clustering/R/clustering_plot_clusterpca.R',encoding='UTF-8') + source('board.clustering/R/clustering_plot_genemodule.R',encoding='UTF-8') + source('board.clustering/R/clustering_plot_PCAplot.R',encoding='UTF-8') + source('board.clustering/R/clustering_plot_phenoplot.R',encoding='UTF-8') + source('board.clustering/R/clustering_plot_splitmap.R',encoding='UTF-8') + source('board.clustering/R/clustering_plot_table_parcoord.R',encoding='UTF-8') + source('board.clustering/R/clustering_server.R',encoding='UTF-8') + source('board.clustering/R/clustering_table_clustannot.R',encoding='UTF-8') + source('board.clustering/R/clustering_ui.R',encoding='UTF-8') + source('board.compare/R/compare_plot_compare1.R',encoding='UTF-8') + source('board.compare/R/compare_plot_compare2.R',encoding='UTF-8') + source('board.compare/R/compare_plot_cum_fc1.R',encoding='UTF-8') + source('board.compare/R/compare_plot_cum_fc2.R',encoding='UTF-8') + source('board.compare/R/compare_plot_expression.R',encoding='UTF-8') + source('board.compare/R/compare_plot_fc_correlation.R',encoding='UTF-8') + source('board.compare/R/compare_plot_gene_corr.R',encoding='UTF-8') + source('board.compare/R/compare_server.R',encoding='UTF-8') + source('board.compare/R/compare_table_corr_score.R',encoding='UTF-8') + source('board.compare/R/compare_ui.R',encoding='UTF-8') + source('board.connectivity/R/connectivity_plot_connectivityHeatmap.R',encoding='UTF-8') + source('board.connectivity/R/connectivity_plot_connectivityMap.R',encoding='UTF-8') + source('board.connectivity/R/connectivity_plot_cumEnrichmentPlot.R',encoding='UTF-8') + source('board.connectivity/R/connectivity_plot_cumFCplot.R',encoding='UTF-8') + source('board.connectivity/R/connectivity_plot_enrichmentGraph.R',encoding='UTF-8') + source('board.connectivity/R/connectivity_plot_FCFCplots.R',encoding='UTF-8') + source('board.connectivity/R/connectivity_plot_leadingEdgeGraph.R',encoding='UTF-8') + source('board.connectivity/R/connectivity_plot_scatterPlot.R',encoding='UTF-8') + source('board.connectivity/R/connectivity_server.R',encoding='UTF-8') + source('board.connectivity/R/connectivity_table_foldchange.R',encoding='UTF-8') + source('board.connectivity/R/connectivity_table_similarity_scores.R',encoding='UTF-8') + source('board.connectivity/R/connectivity_ui.R',encoding='UTF-8') + source('board.correlation/R/correlation_plot_barplot.R',encoding='UTF-8') + source('board.correlation/R/correlation_plot_cor_graph.R',encoding='UTF-8') + source('board.correlation/R/correlation_plot_correlation_UMAP.R',encoding='UTF-8') + source('board.correlation/R/correlation_plot_scattercorr.R',encoding='UTF-8') + source('board.correlation/R/correlation_server.R',encoding='UTF-8') + source('board.correlation/R/correlation_table_corr.R',encoding='UTF-8') + source('board.correlation/R/correlation_ui.R',encoding='UTF-8') + source('board.dataview/R/dataview_module_geneinfo.R',encoding='UTF-8') + source('board.dataview/R/dataview_plot_abundance.R',encoding='UTF-8') + source('board.dataview/R/dataview_plot_averagecounts.R',encoding='UTF-8') + source('board.dataview/R/dataview_plot_averagerank.R',encoding='UTF-8') + source('board.dataview/R/dataview_plot_boxplot.R',encoding='UTF-8') + source('board.dataview/R/dataview_plot_correlation.R',encoding='UTF-8') + source('board.dataview/R/dataview_plot_expression.R',encoding='UTF-8') + source('board.dataview/R/dataview_plot_genetypes.R',encoding='UTF-8') + source('board.dataview/R/dataview_plot_histogram.R',encoding='UTF-8') + source('board.dataview/R/dataview_plot_phenoassociation.R',encoding='UTF-8') + source('board.dataview/R/dataview_plot_phenoheatmap.R',encoding='UTF-8') + source('board.dataview/R/dataview_plot_tissue.R',encoding='UTF-8') + source('board.dataview/R/dataview_plot_totalcounts.R',encoding='UTF-8') + source('board.dataview/R/dataview_plot_tsneplot.R',encoding='UTF-8') + source('board.dataview/R/dataview_server.R',encoding='UTF-8') + source('board.dataview/R/dataview_table_contrasts.R',encoding='UTF-8') + source('board.dataview/R/dataview_table_rawdata.R',encoding='UTF-8') + source('board.dataview/R/dataview_table_samples.R',encoding='UTF-8') + source('board.dataview/R/dataview_ui.R',encoding='UTF-8') + source('board.drugconnectivity/R/drugconnectivity_plot_actmap.R',encoding='UTF-8') + source('board.drugconnectivity/R/drugconnectivity_plot_cmap_dsea.R',encoding='UTF-8') + source('board.drugconnectivity/R/drugconnectivity_plot_cmap_enplot.R',encoding='UTF-8') + source('board.drugconnectivity/R/drugconnectivity_plot_enplots.R',encoding='UTF-8') + source('board.drugconnectivity/R/drugconnectivity_plot_moa.R',encoding='UTF-8') + source('board.drugconnectivity/R/drugconnectivity_server.R',encoding='UTF-8') + source('board.drugconnectivity/R/drugconnectivity_table_cmap.R',encoding='UTF-8') + source('board.drugconnectivity/R/drugconnectivity_table_dsea.R',encoding='UTF-8') + source('board.drugconnectivity/R/drugconnectivity_ui.R',encoding='UTF-8') + source('board.enrichment/R/enrichment_plot_barplot.R',encoding='UTF-8') + source('board.enrichment/R/enrichment_plot_compare.R',encoding='UTF-8') + source('board.enrichment/R/enrichment_plot_freq_top_gsets.R',encoding='UTF-8') + source('board.enrichment/R/enrichment_plot_geneplot.R',encoding='UTF-8') + source('board.enrichment/R/enrichment_plot_scatter.R',encoding='UTF-8') + source('board.enrichment/R/enrichment_plot_top_enrich_gsets.R',encoding='UTF-8') + source('board.enrichment/R/enrichment_plot_volcano.R',encoding='UTF-8') + source('board.enrichment/R/enrichment_plot_volcanoall.R',encoding='UTF-8') + source('board.enrichment/R/enrichment_plot_volcanomethods.R',encoding='UTF-8') + source('board.enrichment/R/enrichment_server.R',encoding='UTF-8') + source('board.enrichment/R/enrichment_table_enrichment_analysis.R',encoding='UTF-8') + source('board.enrichment/R/enrichment_table_genes_in_geneset_ui.R',encoding='UTF-8') + source('board.enrichment/R/enrichment_table_gset_enrich_all_contrasts.R',encoding='UTF-8') + source('board.enrichment/R/enrichment_table_n_sig_gsets.R',encoding='UTF-8') + source('board.enrichment/R/enrichment_ui.R',encoding='UTF-8') + source('board.expression/R/expression_plot_barplot.R',encoding='UTF-8') + source('board.expression/R/expression_plot_maplot.R',encoding='UTF-8') + source('board.expression/R/expression_plot_topfoldchange.R',encoding='UTF-8') + source('board.expression/R/expression_plot_topgenes.R',encoding='UTF-8') + source('board.expression/R/expression_plot_volcano.R',encoding='UTF-8') + source('board.expression/R/expression_plot_volcanoAll.R',encoding='UTF-8') + source('board.expression/R/expression_plot_volcanoMethods.R',encoding='UTF-8') + source('board.expression/R/expression_server.R',encoding='UTF-8') + source('board.expression/R/expression_table_fctable.R',encoding='UTF-8') + source('board.expression/R/expression_table_FDRtable.R',encoding='UTF-8') + source('board.expression/R/expression_table_genetable.R',encoding='UTF-8') + source('board.expression/R/expression_table_gsettable.R',encoding='UTF-8') + source('board.expression/R/expression_ui.R',encoding='UTF-8') + source('board.featuremap/R/featuremap_plot_gene_sig.R',encoding='UTF-8') + source('board.featuremap/R/featuremap_plot_gset_sig.R',encoding='UTF-8') + source('board.featuremap/R/featuremap_plot_table_gene_map.R',encoding='UTF-8') + source('board.featuremap/R/featuremap_plot_table_geneset_map.R',encoding='UTF-8') + source('board.featuremap/R/featuremap_server.R',encoding='UTF-8') + source('board.featuremap/R/featuremap_ui.R',encoding='UTF-8') + source('board.intersection/R/intersection_plot_contrast_correlation.R',encoding='UTF-8') + source('board.intersection/R/intersection_plot_foldchange_heatmap.R',encoding='UTF-8') + source('board.intersection/R/intersection_plot_scatterplot_pairs.R',encoding='UTF-8') + source('board.intersection/R/intersection_plot_table_venn_diagram.R',encoding='UTF-8') + source('board.intersection/R/intersection_server.R',encoding='UTF-8') + source('board.intersection/R/intersection_ui.R',encoding='UTF-8') + source('board.loading/R/loading_module_received.R',encoding='UTF-8') + source('board.loading/R/loading_module_shared.R',encoding='UTF-8') + source('board.loading/R/loading_server.R',encoding='UTF-8') + source('board.loading/R/loading_table_datasets_public.R',encoding='UTF-8') + source('board.loading/R/loading_table_datasets.R',encoding='UTF-8') + source('board.loading/R/loading_tsneplot.R',encoding='UTF-8') + source('board.loading/R/loading_ui.R',encoding='UTF-8') + source('board.loading/R/loading_utils.R',encoding='UTF-8') + source('board.pathway/R/pathway_enrichmap.R',encoding='UTF-8') + source('board.pathway/R/pathway_plot_enrichmap.R',encoding='UTF-8') + source('board.pathway/R/pathway_plot_go_actmap.R',encoding='UTF-8') + source('board.pathway/R/pathway_plot_go_network.R',encoding='UTF-8') + source('board.pathway/R/pathway_plot_reactome_actmap.R',encoding='UTF-8') + source('board.pathway/R/pathway_plot_reactome_graph.R',encoding='UTF-8') + source('board.pathway/R/pathway_plot_wikipathway_actmap.R',encoding='UTF-8') + source('board.pathway/R/pathway_plot_wikipathway_graph.R',encoding='UTF-8') + source('board.pathway/R/pathway_server.R',encoding='UTF-8') + source('board.pathway/R/pathway_table_go_table.R',encoding='UTF-8') + source('board.pathway/R/pathway_table_reactome.R',encoding='UTF-8') + source('board.pathway/R/pathway_table_wikipathway.R',encoding='UTF-8') + source('board.pathway/R/pathway_ui.R',encoding='UTF-8') + source('board.pathway/R/pathway_wikipathview.R',encoding='UTF-8') + source('board.pcsf/R/pcsf_plot_heatmap.R',encoding='UTF-8') + source('board.pcsf/R/pcsf_plot_network.R',encoding='UTF-8') + source('board.pcsf/R/pcsf_server.R',encoding='UTF-8') + source('board.pcsf/R/pcsf_ui.R',encoding='UTF-8') + source('board.pcsf/R/util_pcsf.R',encoding='UTF-8') + source('board.signature/R/signature_plot_enplots.R',encoding='UTF-8') + source('board.signature/R/signature_plot_markers.R',encoding='UTF-8') + source('board.signature/R/signature_plot_overlap.R',encoding='UTF-8') + source('board.signature/R/signature_plot_volcano.R',encoding='UTF-8') + source('board.signature/R/signature_server.R',encoding='UTF-8') + source('board.signature/R/signature_table_enrich_by_contrasts.R',encoding='UTF-8') + source('board.signature/R/signature_table_genes_in_signature.R',encoding='UTF-8') + source('board.signature/R/signature_table_overlap.R',encoding='UTF-8') + source('board.signature/R/signature_ui.R',encoding='UTF-8') + source('board.singlecell/R/singlecell_plot_crosstabPlot.R',encoding='UTF-8') + source('board.singlecell/R/singlecell_plot_cytoplot.R',encoding='UTF-8') + source('board.singlecell/R/singlecell_plot_icpplot.R',encoding='UTF-8') + source('board.singlecell/R/singlecell_plot_mappingplot.R',encoding='UTF-8') + source('board.singlecell/R/singlecell_plot_markersplot.R',encoding='UTF-8') + source('board.singlecell/R/singlecell_plot_phenoplot.R',encoding='UTF-8') + source('board.singlecell/R/singlecell_server.R',encoding='UTF-8') + source('board.singlecell/R/singlecell_ui.R',encoding='UTF-8') + source('board.tcga/R/tcga_plot_survival.R',encoding='UTF-8') + source('board.tcga/R/tcga_server.R',encoding='UTF-8') + source('board.tcga/R/tcga_ui.R',encoding='UTF-8') + source('board.upload/R/upload_module_batchcorrect.R',encoding='UTF-8') + source('board.upload/R/upload_module_computepgx.R',encoding='UTF-8') + source('board.upload/R/upload_module_initial_settings.R',encoding='UTF-8') + source('board.upload/R/upload_module_makecontrast.R',encoding='UTF-8') + source('board.upload/R/upload_module_normalization.R',encoding='UTF-8') + source('board.upload/R/upload_module_outliers.R',encoding='UTF-8') + source('board.upload/R/upload_module_preview_contrasts.R',encoding='UTF-8') + source('board.upload/R/upload_module_preview_counts.R',encoding='UTF-8') + source('board.upload/R/upload_module_preview_samples.R',encoding='UTF-8') + source('board.upload/R/upload_plot_contraststats.R',encoding='UTF-8') + source('board.upload/R/upload_plot_countstats.R',encoding='UTF-8') + source('board.upload/R/upload_plot_pcaplot.R',encoding='UTF-8') + source('board.upload/R/upload_plot_phenostats.R',encoding='UTF-8') + source('board.upload/R/upload_server.R',encoding='UTF-8') + source('board.upload/R/upload_ui.R',encoding='UTF-8') + source('board.upload/R/upload_utils.R',encoding='UTF-8') + source('board.user/R/appsettings_server.R',encoding='UTF-8') + source('board.user/R/appsettings_ui.R',encoding='UTF-8') + source('board.user/R/user_table_resources.R',encoding='UTF-8') + source('board.user/R/userprofile_server.R',encoding='UTF-8') + source('board.user/R/userprofile_ui.R',encoding='UTF-8') + source('board.wgcna/R/wgcna_plot_correlation_network.R',encoding='UTF-8') + source('board.wgcna/R/wgcna_plot_eigengene_clustering.R',encoding='UTF-8') + source('board.wgcna/R/wgcna_plot_enrichment.R',encoding='UTF-8') + source('board.wgcna/R/wgcna_plot_gclustering.R',encoding='UTF-8') + source('board.wgcna/R/wgcna_plot_gdendogram.R',encoding='UTF-8') + source('board.wgcna/R/wgcna_plot_heatmap_membership.R',encoding='UTF-8') + source('board.wgcna/R/wgcna_plot_membership_v_trait.R',encoding='UTF-8') + source('board.wgcna/R/wgcna_plot_module_graph.R',encoding='UTF-8') + source('board.wgcna/R/wgcna_plot_module_membership.R',encoding='UTF-8') + source('board.wgcna/R/wgcna_plot_MTrelationships.R',encoding='UTF-8') + source('board.wgcna/R/wgcna_plot_s_independence.R',encoding='UTF-8') + source('board.wgcna/R/wgcna_plot_TOMheatmap.R',encoding='UTF-8') + source('board.wgcna/R/wgcna_server.R',encoding='UTF-8') + source('board.wgcna/R/wgcna_table_enrichment.R',encoding='UTF-8') + source('board.wgcna/R/wgcna_table_genes.R',encoding='UTF-8') + source('board.wgcna/R/wgcna_ui.R',encoding='UTF-8') + source('board.wordcloud/R/wordcloud_plot_enrichment.R',encoding='UTF-8') + source('board.wordcloud/R/wordcloud_plot_wordcloud.R',encoding='UTF-8') + source('board.wordcloud/R/wordcloud_plot_wordtsne.R',encoding='UTF-8') + source('board.wordcloud/R/wordcloud_server.R',encoding='UTF-8') + source('board.wordcloud/R/wordcloud_table_enrichment.R',encoding='UTF-8') + source('board.wordcloud/R/wordcloud_table_leading_edge.R',encoding='UTF-8') + source('board.wordcloud/R/wordcloud_ui.R',encoding='UTF-8') + source('modules/AuthenticationModule_functions.R',encoding='UTF-8') + source('modules/AuthenticationModule_ui.R',encoding='UTF-8') + source('modules/AuthenticationModule.R',encoding='UTF-8') + source('modules/CookiesModule.R',encoding='UTF-8') + source('modules/DatasetReport.R',encoding='UTF-8') + source('modules/InfoModals.R',encoding='UTF-8') + source('modules/InviteFriend.R',encoding='UTF-8') + source('modules/NormalizeCountsModule.R',encoding='UTF-8') + source('modules/PlotDownloadLogger.R',encoding='UTF-8') + source('modules/QuestionModule.R',encoding='UTF-8') + source('modules/TimerModule.R',encoding='UTF-8') + source('modules/UserAccessControl.R',encoding='UTF-8') + source('modules/UserInactivityControl.R',encoding='UTF-8') + source('modules/UsersMapModule.R',encoding='UTF-8') + source('modules/WelcomeBoard.R',encoding='UTF-8') + source('ui/bs-components.R',encoding='UTF-8') + source('ui/ui-alerts.R',encoding='UTF-8') + source('ui/ui-bigdashplus.R',encoding='UTF-8') + source('ui/ui-boardHeader.R',encoding='UTF-8') + source('ui/ui-code.R',encoding='UTF-8') + source('ui/ui-colors.R',encoding='UTF-8') + source('ui/ui-defaults.R',encoding='UTF-8') + source('ui/ui-DropDownMenu.R',encoding='UTF-8') + source('ui/ui-fileInputArea.R',encoding='UTF-8') + source('ui/ui-links.R',encoding='UTF-8') + source('ui/ui-modalUI.R',encoding='UTF-8') + source('ui/ui-PlotModule.R',encoding='UTF-8') + source('ui/ui-startupModal.R',encoding='UTF-8') + source('ui/ui-TableModule2.R',encoding='UTF-8') + source('ui/ui-tooltip.R',encoding='UTF-8') + source('ui/ui-utils.R',encoding='UTF-8') + source('ui/ui-vizpanels.R',encoding='UTF-8') + message('done! (sourcing all code)') } diff --git a/components/app/R/.#server.R b/components/app/R/.#server.R new file mode 120000 index 000000000..4ac3a32d3 --- /dev/null +++ b/components/app/R/.#server.R @@ -0,0 +1 @@ +kwee@tokyo.12702:1721819251 \ No newline at end of file diff --git a/components/app/R/www/styles.min.css b/components/app/R/www/styles.min.css index c65302177..74f32bde0 100644 --- a/components/app/R/www/styles.min.css +++ b/components/app/R/www/styles.min.css @@ -1 +1 @@ -html #app{min-height:calc(100vh - 48px)}html body{font-size:14px}html body a{color:#0a3c64;text-decoration:none}html .alert{margin-bottom:0 !important}html .content{min-height:800px}html h2{font-size:1.85em}html h3{font-size:1.5em}html h4{font-weight:600;font-size:1.2em}html h5{font-weight:300;font-size:1.2em}html .control-label{margin-bottom:0px;margin-top:2px}html hr{margin-top:1.3rem;margin-bottom:0.9rem}html .accordion-title{font-size:1.05em;font-weight:600}html .tabbable .nav-tabs{padding:0px;margin:5px 0px 20px 0px;border-radius:0px;font-size:18px}html .nav-tabs>li>a{margin:0px 20px 20px 0px;padding:2px 0px;border-radius:0px}html .nav-tabs>li.active{border-top:3px solid #0a3c64;margin-top:-3px}html .box{border-top:0px !important}html #datainfo{background:#fcfcfc;font-size:12px;padding:20px 10px;line-height:1em}html .well{font-size:14px;line-height:1.2em;background:transparent}html .code{color:#1f1f1fFF;background-color:#F9F9F9FF;font-weight:400}html .gene-info{font-size:0.9em;line-height:1.1em}html .bg-cover-image{background-color:#dde6f0;background-color:#fff}html .btn-circle-xs,html .btn-circle-xs:focus{background:#FFFFFF;color:#DDD;text-shadow:0 0 0px #ccc;border:0px;border-radius:3px !important}html .btn-circle-xs:hover{background-color:#fff;color:#444;border:0px;border-radius:3px}html .module-label{color:#AAA;font-family:"Arial";font-size:18px;font-weight:600;padding-right:8px}html .chart-wrapper .chart-notes{font-size:11px;font-weight:400;line-height:1.3em}html .caption{font-size:13px;font-weight:400;line-height:1.1em;margin:6px 4px 3px 6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}html .caption2{font-size:22px;font-weight:400;line-height:1.1em;padding:2rem 0rem 0rem 0rem}html .current-user{position:fixed;font-weight:200;font-size:11px;color:#fff;color:#000;top:1px;right:20px;z-index:9999}html .current-dataset{position:relative;padding:8px 0vw;font-weight:200;font-size:16px;color:#000;text-align:left}html .current-section{padding:8px 0vw;font-weight:400;font-size:18px;color:#000;text-align:center;min-width:0vw}html .run-button,html .load-button{outline:none;border-color:#1967be;box-shadow:0 0 5px #1967be}html .action-button .fab .fa{font-size:16px;margin-top:0px}html .btn-social-icon{padding:0px;width:28px;height:24px}html #social-buttons{position:fixed;font-weight:300;font-size:30px !important;color:#FFFFFF88;bottom:10px;left:10px;z-index:9999}html .radioGroupButtons{margin-top:-3px;margin-bottom:-3px}html .btn-xl{padding:.3rem 1.5rem;margin:20px;font-size:2.0rem;border-radius:.3rem}html .red-button{color:white;background-color:#e45c00;background-image:none;border:0px;padding:8px 12px}html .red-button:hover,html .red-button:focus,html .red-button:active,html .red-button:active:hover{background-color:#b44c00}html .blue-button{color:white;background-color:#337ab7;border-color:#2e6da4}html .blue-button:hover,html .blue-button:focus,html .blue-button:active,html .blue-button:active:hover{background-color:#286090;border-color:#204d74}html .quick-button{width:auto;background-color:white;padding:2px 12px;font-size:13px;color:#3181DE;margin:6px 6px 6px 0px;height:25px}html div#navheader-current-section{font-size:30px;font-weight:400;margin:15px 0 5px 0px}html div#navheader-dataset-stats{margin:22px 0px 0px 40px;font-size:24px;color:#3181DE}html div#navheader-current-dataset{margin:35px 10px 0px 0px;font-size:14px;color:black}html .footer{position:absolute;right:0;left:0;bottom:0;padding:3rem 1rem;text-align:center;font-size:0.8em}html .action-text #sig_example1 #sig_example2 #sig_example3{font-size:0.9em;color:#2244AA;background-color:transparent;border-style:none;padding:0}html .action-text #sig_example1 #sig_example2 #sig_example3{font-size:0.9em;background-color:#eee;border-style:none;padding:0}html #emailLinkWrapper{display:none;padding-left:20rem}html .white{color:white}html textarea.form-control{font-size:0.95em;line-height:1.1em}html .form-group{margin-bottom:0.3rem}.tooltip{pointer-events:none}html .big-tab{padding:0px 15px}html .navbar{padding-top:0.3rem;border-bottom:2px solid #004ca7}html .nav-tabs .nav-link{color:#b8b8b8;border-bottom:solid 1px}html .nav-link.dropdown-toggle::after{font-family:"Font Awesome 5 Free";font-weight:900;content:"\f078";border-top:none;vertical-align:0}html #logo-bigomics:hover{cursor:pointer}html .btn.dropdown-toggle::after{content:none}html ul.nav.navbar-nav>li>a{padding:0px 6px 1px 6px;color:grey;background-color:#e7eaed;border-radius:5px;font-size:calc(100% - 12%)}html ul.nav.navbar-nav>li>a:hover ul.nav.navbar-nav>li>a:active{color:black;font-size:calc(100% - 20%)}html ul.nav.navbar-nav>li{display:inline-block}html ul.nav.navbar-nav{display:inline-block !important}html .sidebar-container{height:calc(100vh - 48px)}html .sidebar-expanded>.sidebar{width:12rem;min-width:12rem;max-height:calc(100vh - 300px);overflow-y:auto}html #sidebar-help-title{padding-top:10rem}html #sidebar-help-container{width:11.5rem;font-size:12px;line-height:1.2em;background:url("mascotte-sc.png") no-repeat;background-size:5rem 5rem;background-position:3.5rem 5rem;position:absolute;bottom:10px}html .sidebar-menu{font-size:18px;font-weight:bold;color:#333 !important}html .sidebar-item{font-size:18px;font-weight:bold;color:#333 !important}html .sidebar-menu-item{font-size:17px;line-height:1.1rem;font-weight:400;color:#333 !important;padding:0 0.4rem 0 0.4rem}html .sidebar-label{font-size:18px}html .text-muted{color:#333 !important}html .active-sidebar{background-color:#EFEFEF}html .tab-sidebar{line-height:1.1rem;padding:0.65rem 0rem 0.65rem 0.7rem}html .settings-container{height:calc(100vh - 48px)}html .settings-expanded{width:12rem;min-width:12rem}html .valuebox-value{font-weight:800;color:white;padding:16px 0 0 0;margin:0 0 0 20px}html .valuebox-label{margin:0 0 0 20px;font-weight:400;color:white;padding-bottom:25px}html #shiny-modal{display:flex !important;margin:auto}html .modal-title{margin-right:auto;margin-left:auto;margin-top:-5px;margin-bottom:5px;font-size:2em;font-weight:600}html .modal-content .well{font-size:1.3em;line-height:1.2em;width:100%}html .modal-dialog{box-shadow:10px 10px 30px #999;display:flex !important;margin:auto}html .modal-dialog.modal-lg{width:640px;justify-content:center;align-items:center}html .modal-dialog.modal-sm{width:300px;justify-content:center;align-items:center}html .modal-footer .btn{margin-left:5px;margin-bottom:0;font-size:14px}html .img-fluid{display:block;margin-right:auto;margin-left:auto}html .modal-content{border:0}html .modal-backdrop{background-color:#000;background-color:#FFF}html .modal-backdrop.show,html .modal-backdrop.in{opacity:0.85}html .bg-cover-image{background-color:#fff}html .swal2-popup{font-size:1rem !important}html .modal-body{height:auto}html .sweet-alert p{color:black}html .tablewidget{padding:5px 15px 25px 15px}html .tablewidget-header{border-bottom:1px solid #ccc;height:24px;margin-bottom:5px}html .table-caption{font-size:13px;font-weight:400;line-height:1.1em;position:relative;padding:5px 0px 10px 0px;bottom:0px}html div.dataTables_wrapper div.dataTables_filter{text-align:left}html .popup-table div.dataTables_wrapper div.dataTables_filter{text-align:left;font-size:18px}html .popup-table div.dataTables_info{font-size:18px}html div.dataTables_wrapper div.dataTables_filter input{width:350px;background-color:#f7fafd}html table.dataTable{border-collapse:collapse !important}html table.dataTable td,html table.dataTable th{border-bottom:solid 1px #aaa !important;vertical-align:middle}html table.dataTable>thead>tr>th{font-size:13px;padding:0px 0px 4px 0px;line-height:1em}html table.dataTable>tbody>tr>td{font-size:13px;padding:5px}html .popup-table table.dataTable>thead>tr>th{font-size:18px}html .popup-table table.dataTable>tbody>tr>td{font-size:16px;padding:7px}html .table.dataTable tbody td.active,html .table.dataTable tbody tr.active td{background-color:#e9ecef;color:black;font-weight:600}html .icon_container{position:relative}html .icon_nested{position:absolute;left:1px;color:#d9534f}html .blank_icon{color:transparent}html table.dataTable>tbody>tr.selected>*{--dt-row-selected: 204, 204, 204;--dt-row-selected-text: 0, 0, 0}html #init-load-data,html #init-upload-data{margin-right:2rem}html #welcome-page{text-align:center;background-color:#f0f9fd;min-height:calc(100vh - 48px)}html #welcome-text{font-size:50px;font-weight:600;color:#2484bb;padding-top:300px;background:url("monster-hi.png") no-repeat;background-size:300px 300px;background-position:53% 0px}html .welcome-btn{padding:10px 26px;margin-top:20px;margin-left:6px;font-size:24px;width:300px;color:black;border-width:2.5px}html #welcome-subtext{padding:0 25%;text-align:center;font-size:1.8em;line-height:1.4em}html #welcome-carousel{margin-top:20px}html .welcome-slide{width:50%;margin-left:auto;margin-right:auto;text-align:center;line-height:1.4em}html div#startup_modal .modal-content{background-color:#f0f9fd}html .plotmodule{padding:0px}html .plotmodule-header{padding:5px 6px 5px 12px;border-bottom:1px solid #ccc}html .plotmodule-title{font-size:16px;margin-top:-1px}html .plotmodule-info{padding:5px;font-size:15px;line-height:1.2em}html .popup-modal>div{margin-left:auto;margin-right:auto}html .popup-modal .modal-title{font-size:2.5em}html .popup-modal .modal-footer{display:none}html .popup-plot>div{margin-left:auto;margin-right:auto}html .tablemodule{padding:0px}html .tablemodule-header{padding:5px 6px 4px 12px;border-bottom:1px solid #ccc}html .tablemodule-title{font-size:16px;margin-top:-1px}html .tablemodule-info{padding:5px;font-size:15px;line-height:1.2em}html .popup-table{width:90%;margin-left:auto;margin-right:auto}html .popup-table>div{margin-left:auto;margin-right:auto}html .popup-table-caption{width:90%;margin-left:auto;margin-right:auto}html #modal-splash{height:32rem;width:100%;background-color:#004ca7;padding:0px !important}html #particles-target{position:absolute;top:0px;width:100%;height:500px}html div#splash-fullscreen{background-color:#2780e3 !important;padding:2rem 2rem}html .splash-logo2{height:3rem}html img#splash-image{max-height:65vh}html #splash-panel{margin-top:65%;text-align:center;max-width:350px}html #splash-panel .card{color:#555;background:white;padding:10px 10px;text-align:center;box-shadow:10px 10px 20px #0002;margin-top:-50%}html #splash-panel .card-title{margin-top:0.5rem;margin-bottom:0.5rem}html #splash-panel .shiny-input-container{width:100%;max-width:100%}html #splash-buttons .btn-xl{padding:5px 20px;font-size:24px;border-radius:8px}html button#auth-emailSubmit{border:1px solid #ccc;padding:5px 40px;margin:0 0 10px 0;width:100%}html .social-button{border:1px solid #fff;padding:8px 10px;border-radius:5px;text-decoration:none !important}html .google-button{background-color:#dd4b39;color:white !important}html .facebook-button{background-color:#4267B2;color:white !important}html .apple-button{background-color:#ccc;color:white !important}html .twitter-button{background-color:#26a7de;color:white !important}html a#auth-launchGoogle{color:white !important;text-decoration:none !important}html a#auth-launchFacebook{color:white !important;text-decoration:none !important}html a#auth-launchApple{color:black !important;text-decoration:none !important}html a#auth-launchTwitter{color:white !important;text-decoration:none !important}html .btn-social{padding:3px !important;background-color:white !important;border-color:white !important;font-size:32px !important;color:steelblue !important}html .progress{border-radius:0px;background-color:#eee;box-shadow:none}html .progress-bar{background-color:#2780e3}html .shiny-notification{border-radius:0px;background-color:#fff}html .spinner-container{position:absolute;z-index:999;top:50%;transform:translateY(-50%);left:-50px}html .spinner-container .spinner-text{display:none;position:absolute;top:calc(50% + 30px);left:calc(50% + 1.5rem);transform:translate(-50%, -50%);white-space:nowrap;z-index:1}html #spinner-container:hover .spinner-text{display:block}.dropdown-menu{margin:5px 1px !important}.dropdown-menu.show{font-size:0.95em}.dropdown-menu .form-group{margin-bottom:0rem}.shiny-download-link{background-color:white;border-color:lightgrey}html .card{--bs-card-spacer-y: 0.6rem !important}html .caption{margin:4px}html .caption:hover{overflow:auto}html .card-footer{background-color:#F7FAFD;padding:2px 0 0 2px;height:3em !important;max-height:3em !important;min-height:3em !important;display:none}html .form-check.form-switch{font-size:1em;float:left}html .form-check-input:checked{background-color:#4081dc;border-color:#b8ddff}.nav-pills .nav-link{color:#888888}.nav-pills .nav-link.active{color:black;background-color:#FFFFFF}html .row{--bs-gutter-x: 0.5rem}html #chirp_button{width:auto;background-color:white;padding:2px 12px;font-size:13px;color:#3181DE;margin:6px 12px 6px 0px;height:25px}html .chatContainer{background-color:white;box-shadow:none}html .offcanvas.offcanvas-bottom{right:auto;left:auto;width:60%;background-color:transparent}html .chatMessage{float:left;text-align:left;margin-bottom:5px;padding:2px 20px;border-radius:5px;clear:both;box-shadow:none}html .chatMessage>p{margin:0.1rem}html .chatTitle{font-size:16px;font-weight:600;margin-bottom:10px;text-align:center}.popover-body{border:1px solid;border-color:var(--bs-border-color-translucent);border-radius:.375rem}.btn-active{background-color:#fff !important;color:#444 !important;border:0px !important}.popover{max-width:500px;max-height:500px}.wizard .wizard-nav.progress .wizard-step.active~.wizard-step{background-color:#ffffff !important}.wizard .wizard-nav.progress .wizard-step{background-color:#009C9F !important}.wizard .wizard-buttons{justify-content:space-between !important}.wizard .wizard-nav.dots .wizard-step .dot{top:-25px;height:18px;width:18px}.wizard .wizard-content{transition:none;padding:2.5rem 0 0rem 0}.wizard .html-fill-container{min-width:100%}.form-check,.shiny-input-container .checkbox,.shiny-input-container .radio{min-height:0rem;margin-bottom:0rem}html .carousel{interval:10s}html .carousel-item{transition-duration:1.3s}html .carousel-indicators{bottom:-20px}html .carousel-indicators .active{background-color:#b6d3E888}html .carousel-indicators button{background-color:#b6d3E888}html .carousel-control-next{width:5%;right:-20px}html .carousel-control-prev{width:5%;left:-20px}html .carousel-control-prev-icon,html .carousel-control-next-icon{filter:invert(0.3) sepia(1) saturate(1.5) hue-rotate(175deg)} +html #app{min-height:calc(100vh - 48px)}html body{font-size:14px}html body a{color:#0a3c64;text-decoration:none}html .alert{margin-bottom:0 !important}html .content{min-height:800px}html h2{font-size:1.85em}html h3{font-size:1.5em}html h4{font-weight:600;font-size:1.2em}html h5{font-weight:300;font-size:1.2em}html .control-label{margin-bottom:0px;margin-top:2px}html hr{margin-top:1.3rem;margin-bottom:0.9rem}html .accordion-title{font-size:1.05em;font-weight:600}html .tabbable .nav-tabs{padding:0px;margin:5px 0px 20px 0px;border-radius:0px;font-size:18px}html .nav-tabs>li>a{margin:0px 20px 20px 0px;padding:2px 0px;border-radius:0px}html .nav-tabs>li.active{border-top:3px solid #0a3c64;margin-top:-3px}html .box{border-top:0px !important}html #datainfo{background:#fcfcfc;font-size:12px;padding:20px 10px;line-height:1em}html .well{font-size:14px;line-height:1.2em;background:transparent}html .code{color:#1f1f1fFF;background-color:#F9F9F9FF;font-weight:400}html .gene-info{font-size:0.9em;line-height:1.1em}html .bg-cover-image{background-color:#dde6f0;background-color:#fff}html .btn-circle-xs,html .btn-circle-xs:focus{background:#FFFFFF;color:#DDD;text-shadow:0 0 0px #ccc;border:0px;border-radius:3px !important}html .btn-circle-xs:hover{background-color:#fff;color:#444;border:0px;border-radius:3px}html .module-label{color:#AAA;font-family:"Arial";font-size:18px;font-weight:600;padding-right:8px}html .chart-wrapper .chart-notes{font-size:11px;font-weight:400;line-height:1.3em}html .caption{font-size:13px;font-weight:400;line-height:1.1em;margin:6px 4px 3px 6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}html .caption2{font-size:22px;font-weight:400;line-height:1.1em;padding:2rem 0rem 0rem 0rem}html .current-user{position:fixed;font-weight:200;font-size:11px;color:#fff;color:#000;top:1px;right:20px;z-index:9999}html .current-dataset{position:relative;padding:8px 0vw;font-weight:200;font-size:16px;color:#000;text-align:left}html .current-section{padding:8px 0vw;font-weight:400;font-size:18px;color:#000;text-align:center;min-width:0vw}html .run-button,html .load-button{outline:none;border-color:#1967be;box-shadow:0 0 5px #1967be}html .action-button .fab .fa{font-size:16px;margin-top:0px}html .btn-social-icon{padding:0px;width:28px;height:24px}html #social-buttons{position:fixed;font-weight:300;font-size:30px !important;color:#FFFFFF88;bottom:10px;left:10px;z-index:9999}html .radioGroupButtons{margin-top:-3px;margin-bottom:-3px}html .btn-xl{padding:.3rem 1.5rem;margin:20px;font-size:2.0rem;border-radius:.3rem}html .red-button{color:white;background-color:#e45c00;background-image:none;border:0px;padding:8px 12px}html .red-button:hover,html .red-button:focus,html .red-button:active,html .red-button:active:hover{background-color:#b44c00}html .blue-button{color:white;background-color:#337ab7;border-color:#2e6da4}html .blue-button:hover,html .blue-button:focus,html .blue-button:active,html .blue-button:active:hover{background-color:#286090;border-color:#204d74}html .quick-button{width:auto;background-color:white;padding:2px 12px;font-size:13px;color:#3181DE;margin:6px 6px 6px 0px;height:25px}html div#navheader-current-section{font-size:30px;font-weight:400;margin:15px 0 5px 0px}html div#navheader-dataset-stats{margin:22px 0px 0px 40px;font-size:24px;color:#3181DE}html div#navheader-current-dataset{margin:35px 10px 0px 0px;font-size:14px;color:black}html .footer{position:absolute;right:0;left:0;bottom:0;padding:3rem 1rem;text-align:center;font-size:0.8em}html .action-text #sig_example1 #sig_example2 #sig_example3{font-size:0.9em;color:#2244AA;background-color:transparent;border-style:none;padding:0}html .action-text #sig_example1 #sig_example2 #sig_example3{font-size:0.9em;background-color:#eee;border-style:none;padding:0}html #emailLinkWrapper{display:none;padding-left:20rem}html .white{color:white}html textarea.form-control{font-size:0.95em;line-height:1.1em}html .form-group{margin-bottom:0.3rem}.tooltip{pointer-events:none}html .big-tab{padding:0px 15px}html .navbar{padding-top:0.3rem;border-bottom:2px solid #004ca7}html .nav-tabs .nav-link{color:#b8b8b8;border-bottom:solid 1px}html .nav-link.dropdown-toggle::after{font-family:"Font Awesome 5 Free";font-weight:900;content:"\f078";border-top:none;vertical-align:0}html #logo-bigomics:hover{cursor:pointer}html .btn.dropdown-toggle::after{content:none}html ul.nav.navbar-nav>li>a{padding:0px 6px 1px 6px;color:grey;background-color:#e7eaed;border-radius:5px;font-size:calc(100% - 12%)}html ul.nav.navbar-nav>li>a:hover ul.nav.navbar-nav>li>a:active{color:black;font-size:calc(100% - 20%)}html ul.nav.navbar-nav>li{display:inline-block}html ul.nav.navbar-nav{display:inline-block !important}html .sidebar-container{height:calc(100vh - 48px)}html .sidebar-expanded>.sidebar{width:12rem;min-width:12rem;max-height:calc(100vh - 300px);overflow-y:auto}html #sidebar-help-title{padding-top:10rem}html #sidebar-help-container{width:11.5rem;font-size:12px;line-height:1.2em;background:url("mascotte-sc.png") no-repeat;background-size:5rem 5rem;background-position:3.5rem 5rem;position:absolute;bottom:10px}html .sidebar-menu{font-size:18px;font-weight:bold;color:#333 !important}html .sidebar-item{font-size:18px;font-weight:bold;color:#333 !important}html .sidebar-menu-item{font-size:17px;line-height:1.1rem;font-weight:400;color:#333 !important;padding:0 0.4rem 0 0.4rem}html .sidebar-label{font-size:18px}html .text-muted{color:#333 !important}html .active-sidebar{background-color:#EFEFEF}html .tab-sidebar{line-height:1.1rem;padding:0.65rem 0rem 0.65rem 0.7rem}html .settings-container{height:calc(100vh - 48px)}html .settings-expanded{width:12rem;min-width:12rem}html .valuebox-value{font-weight:800;color:white;padding:16px 0 0 0;margin:0 0 0 20px}html .valuebox-label{margin:0 0 0 20px;font-weight:400;color:white;padding-bottom:25px}html #shiny-modal{display:flex !important;margin:auto}html .modal-title{margin-right:auto;margin-left:auto;margin-top:-5px;margin-bottom:5px;font-size:2em;font-weight:600}html .modal-content .well{font-size:1.3em;line-height:1.2em;width:100%}html .modal-dialog{box-shadow:10px 10px 30px #999;display:flex !important;margin:auto}html .modal-dialog.modal-lg{width:640px;justify-content:center;align-items:center}html .modal-dialog.modal-sm{width:300px;justify-content:center;align-items:center}html .modal-footer .btn{margin-left:5px;margin-bottom:0;font-size:14px}html .img-fluid{display:block;margin-right:auto;margin-left:auto}html .modal-content{border:0}html .modal-backdrop{background-color:#000;background-color:#FFF}html .modal-backdrop.show,html .modal-backdrop.in{opacity:0.85}html .bg-cover-image{background-color:#fff}html .swal2-popup{font-size:1rem !important}html .modal-body{height:auto}html .sweet-alert p{color:black}html .tablewidget{padding:5px 15px 25px 15px}html .tablewidget-header{border-bottom:1px solid #ccc;height:24px;margin-bottom:5px}html .table-caption{font-size:13px;font-weight:400;line-height:1.1em;position:relative;padding:5px 0px 10px 0px;bottom:0px}html div.dataTables_wrapper div.dataTables_filter{text-align:left}html .popup-table div.dataTables_wrapper div.dataTables_filter{text-align:left;font-size:18px}html .popup-table div.dataTables_info{font-size:18px}html div.dataTables_wrapper div.dataTables_filter input{width:350px;background-color:#f7fafd}html table.dataTable{border-collapse:collapse !important}html table.dataTable td,html table.dataTable th{border-bottom:solid 1px #aaa !important;vertical-align:middle}html table.dataTable>thead>tr>th{font-size:13px;padding:0px 0px 4px 0px;line-height:1em}html table.dataTable>tbody>tr>td{font-size:13px;padding:5px}html .popup-table table.dataTable>thead>tr>th{font-size:18px}html .popup-table table.dataTable>tbody>tr>td{font-size:16px;padding:7px}html .table.dataTable tbody td.active,html .table.dataTable tbody tr.active td{background-color:#e9ecef;color:black;font-weight:600}html .icon_container{position:relative}html .icon_nested{position:absolute;left:1px;color:#d9534f}html .blank_icon{color:transparent}html table.dataTable>tbody>tr.selected>*{--dt-row-selected: 204, 204, 204;--dt-row-selected-text: 0, 0, 0}html #init-load-data,html #init-upload-data{margin-right:2rem}html #welcome-page{text-align:center;background-color:#f0f9fd;min-height:calc(100vh - 48px)}html #welcome-text{font-size:50px;font-weight:600;color:#2484bb;padding-top:300px;background:url("monster-hi.png") no-repeat;background-size:300px 300px;background-position:53% 0px}html .welcome-btn{padding:10px 26px;margin-top:20px;margin-left:6px;font-size:24px;width:300px;color:black;border-width:2.5px}html #welcome-subtext{padding:0 25%;text-align:center;font-size:1.8em;line-height:1.4em}html #welcome-carousel{margin-top:20px}html .welcome-slide{width:50%;margin-left:auto;margin-right:auto;text-align:center;line-height:1.4em}html div#startup_modal .modal-content{background-color:#f0f9fd}html .plotmodule{padding:0px}html .plotmodule-header{padding:5px 6px 5px 12px;border-bottom:1px solid #ccc}html .plotmodule-title{font-size:16px;margin-top:-1px}html .plotmodule-info{padding:5px;font-size:15px;line-height:1.2em}html .popup-modal>div{margin-left:auto;margin-right:auto}html .popup-modal .modal-title{font-size:2.5em}html .popup-modal .modal-footer{display:none}html .popup-plot>div{margin-left:auto;margin-right:auto}html .tablemodule{padding:0px}html .tablemodule-header{padding:5px 6px 4px 12px;border-bottom:1px solid #ccc}html .tablemodule-title{font-size:16px;margin-top:-1px}html .tablemodule-info{padding:5px;font-size:15px;line-height:1.2em}html .popup-table{width:90%;margin-left:auto;margin-right:auto}html .popup-table>div{margin-left:auto;margin-right:auto}html .popup-table-caption{width:90%;margin-left:auto;margin-right:auto}html #modal-splash{height:32rem;width:100%;background-color:#004ca7;padding:0px !important}html #particles-target{position:absolute;top:0px;width:100%;height:500px}html div#splash-fullscreen{background-color:#2780e3 !important;padding:2rem 2rem}html .splash-logo2{height:3rem}html img#splash-image{max-height:65vh}html #splash-panel{margin-top:65%;text-align:center;max-width:350px}html #splash-panel .card{color:#555;background:white;padding:10px 10px;text-align:center;box-shadow:10px 10px 20px #0002;margin-top:-50%}html #splash-panel .card-title{margin-top:0.5rem;margin-bottom:0.5rem}html #splash-panel .shiny-input-container{width:100%;max-width:100%}html #splash-buttons .btn-xl{padding:5px 20px;font-size:24px;border-radius:8px}html button#auth-emailSubmit{border:1px solid #ccc;padding:5px 40px;margin:0 0 10px 0;width:100%}html .social-button{border:1px solid #fff;padding:8px 10px;border-radius:5px;text-decoration:none !important}html .google-button{background-color:#dd4b39;color:white !important}html .facebook-button{background-color:#4267B2;color:white !important}html .apple-button{background-color:#ccc;color:white !important}html .twitter-button{background-color:#26a7de;color:white !important}html a#auth-launchGoogle{color:white !important;text-decoration:none !important}html a#auth-launchFacebook{color:white !important;text-decoration:none !important}html a#auth-launchApple{color:black !important;text-decoration:none !important}html a#auth-launchTwitter{color:white !important;text-decoration:none !important}html .btn-social{padding:3px !important;background-color:white !important;border-color:white !important;font-size:32px !important;color:steelblue !important}html .progress{border-radius:0px;background-color:#eee;box-shadow:none}html .progress-bar{background-color:#2780e3}html .shiny-notification{border-radius:0px;background-color:#fff}html .spinner-container{position:absolute;z-index:999;top:50%;transform:translateY(-50%);left:-50px}html .spinner-container .spinner-text{display:none;position:absolute;top:calc(50% + 30px);left:calc(50% + 1.5rem);transform:translate(-50%, -50%);white-space:nowrap;z-index:1}html #spinner-container:hover .spinner-text{display:block}.dropdown-menu{margin:5px 1px !important}.dropdown-menu.show{font-size:0.95em}.dropdown-menu .form-group{margin-bottom:0rem}html .card{--bs-card-spacer-y: 0.6rem !important}html .caption{margin:4px}html .caption:hover{overflow:auto}html .card-footer{background-color:#F7FAFD;padding:2px 0 0 2px;height:3em !important;max-height:3em !important;min-height:3em !important;display:none}html .form-check.form-switch{font-size:1em;float:left}html .form-check-input:checked{background-color:#4081dc;border-color:#b8ddff}.nav-pills .nav-link{color:#888888}.nav-pills .nav-link.active{color:black;background-color:#FFFFFF}html .row{--bs-gutter-x: 0.5rem}html #chirp_button{width:auto;background-color:white;padding:2px 12px;font-size:13px;color:#3181DE;margin:6px 12px 6px 0px;height:25px}html .chatContainer{background-color:white;box-shadow:none}html .offcanvas.offcanvas-bottom{right:auto;left:auto;width:60%;background-color:transparent}html .chatMessage{float:left;text-align:left;margin-bottom:5px;padding:2px 20px;border-radius:5px;clear:both;box-shadow:none}html .chatMessage>p{margin:0.1rem}html .chatTitle{font-size:16px;font-weight:600;margin-bottom:10px;text-align:center}.popover-body{border:1px solid;border-color:var(--bs-border-color-translucent);border-radius:.375rem}.btn-active{background-color:#fff !important;color:#444 !important;border:0px !important}.popover{max-width:500px;max-height:500px}.wizard .wizard-nav.progress .wizard-step.active~.wizard-step{background-color:#ffffff !important}.wizard .wizard-nav.progress .wizard-step{background-color:#009C9F !important}.wizard .wizard-buttons{justify-content:space-between !important}.wizard .wizard-nav.dots .wizard-step .dot{top:-25px;height:18px;width:18px}.wizard .wizard-content{transition:none;padding:2.5rem 0 0rem 0}.wizard .html-fill-container{min-width:100%}.form-check,.shiny-input-container .checkbox,.shiny-input-container .radio{min-height:0rem;margin-bottom:0rem}html .carousel{interval:10s}html .carousel-item{transition-duration:1.3s}html .carousel-indicators{bottom:-20px}html .carousel-indicators .active{background-color:#b6d3E888}html .carousel-indicators button{background-color:#b6d3E888}html .carousel-control-next{width:5%;right:-20px}html .carousel-control-prev{width:5%;left:-20px}html .carousel-control-prev-icon,html .carousel-control-next-icon{filter:invert(0.3) sepia(1) saturate(1.5) hue-rotate(175deg)} diff --git a/components/board.clustering/R/clustering_plot_PCAplot.R b/components/board.clustering/R/clustering_plot_PCAplot.R new file mode 100644 index 000000000..cc5d06615 --- /dev/null +++ b/components/board.clustering/R/clustering_plot_PCAplot.R @@ -0,0 +1,279 @@ +## +## This file is part of the Omics Playground project. +## Copyright (c) 2018-2023 BigOmics Analytics SA. All rights reserved. +## + + + +## Annotate clusters ############ + +clustering_plot_clustpca_ui <- function( + id, + label = "", + height, + width, + title, + info.text, + caption, + parent) { + ns <- shiny::NS(id) + + plot_opts <- shiny::tagList( + withTooltip( + shiny::selectInput(parent("hmpca.colvar"), "Color/label:", choices = NULL, width = "100%"), + "Set colors/labels according to a given phenotype." + ), + withTooltip( + shiny::selectInput(parent("hmpca.shapevar"), "Shape:", choices = NULL, width = "100%"), + "Set shapes according to a given phenotype." + ), + withTooltip( + shiny::selectInput( + ns("pca_label"), + label = "Label:", + choices = list("group", "bottom", "sample", "") + ), + "Place group labels as legend at the bottom or in plot as group or sample labels." + ), + withTooltip( + shiny::checkboxInput(ns("all_clustmethods"), "show all methods"), + "Show an overview of all dimensionality reduction methods." + ), + withTooltip( + shiny::checkboxInput(ns("plot3d"), "plot 3D"), + "Show 3D plot." + ) + ) + + quick_buttons <- tagList( + div(shiny::checkboxInput(ns("plot3d"), "3D"), class = "header-btn") + ) + + PlotModuleUI( + ns("pltmod"), + title = title, + label = label, + plotlib = "plotly", + info.text = info.text, + caption = caption, + options = plot_opts, + download.fmt = c("png", "pdf", "csv"), + width = width, + height = height + ) +} + +clustering_plot_clustpca_server <- function(id, + pgx, + selected_samples, + hmpca.colvar, + hmpca.shapevar, + clustmethod, + watermark = FALSE, + parent) { + moduleServer(id, function(input, output, session) { + ns <- session$ns + + ## Plot ############ + plot_data <- shiny::reactive({ + samples <- selected_samples() + cluster.pos <- pgx$cluster$pos + for (m in names(cluster.pos)) { + colnames(cluster.pos[[m]]) <- paste0(m, ".", colnames(cluster.pos[[m]])) + } + all.pos <- do.call(cbind, cluster.pos) + all.pos <- all.pos[samples, ] + pd <- list( + pos = all.pos + ) + + return(pd) + }) + + + create_plot <- function(pgx, pos, method, colvar, shapevar, label, cex) { + do3d <- (ncol(pos) == 3) + sel <- rownames(pos) + df <- cbind(pos, pgx$Y[sel, ]) + + textvar <- NULL + if (colvar %in% colnames(df)) colvar <- factor(df[, colvar]) + if (shapevar %in% colnames(df)) shapevar <- factor(df[, shapevar]) + ann.text <- rep(" ", nrow(df)) + + label.samples <- (label == "sample") + + if (!do3d && label.samples) ann.text <- rownames(df) + if (!is.null(colvar)) { + textvar <- factor(colvar) + } + symbols <- c( + "circle", "square", "star", "triangle-up", "triangle-down", "pentagon", + "bowtie", "hexagon", "asterisk", "hash", "cross", "triangle-left", + "triangle-right", "+", c(15:0) + ) + + Y <- cbind("sample" = rownames(pos), pgx$Y[sel, ]) + tt.info <- apply(Y, 1, function(y) paste0(colnames(Y), ": ", y, "
", collapse = "")) + tt.info <- as.character(tt.info) + cex1 <- c(1.0, 0.8, 0.6)[1 + 1 * (nrow(pos) > 30) + 1 * (nrow(pos) > 200)] + + if (do3d) { + ## 3D plot + plt <- plotly::plot_ly(df, mode = "markers") %>% + plotly::add_markers( + x = df[, 1], + y = df[, 2], + z = df[, 3], + type = "scatter3d", + color = colvar, + marker = list( + size = 6 * cex1 * cex, + line = list(color = "grey10", width = 0.1) + ), + symbol = shapevar, + symbols = symbols, + text = tt.info + ) %>% + plotly::add_annotations( + x = pos[, 1], + y = pos[, 2], + z = pos[, 3], + text = ann.text, + showarrow = FALSE + ) + ## add cluster annotation labels + if (0 && length(unique(colvar)) > 1) { + ## add cluster annotation labels + grp.pos <- apply(pos, 2, function(x) tapply(x, colvar, median)) + cex2 <- ifelse(length(grp.pos) > 20, 0.8, 1) + plt <- plt %>% plotly::add_annotations( + x = grp.pos[, 1], y = grp.pos[, 2], z = grp.pos[, 3], + text = rownames(grp.pos), + font = list(size = 24 * cex2 * cex, color = "#555"), + showarrow = FALSE + ) + } + + if (label == "") { + plt <- plt %>% + plotly::layout(showlegend = FALSE) + } + } else { + ## 2D plot + plt <- plotly::plot_ly(df, mode = "markers") %>% + plotly::add_markers( + x = df[, 1], + y = df[, 2], + type = "scattergl", + color = colvar, ## size = sizevar, sizes=c(80,140), + marker = list( + size = 16 * cex1 * cex, + line = list(color = "grey20", width = 0.6) + ), + symbol = shapevar, + symbols = symbols, + text = tt.info + ) %>% + plotly::add_annotations( + x = pos[, 1], + y = pos[, 2], + text = ann.text, + ## xref = "x", yref = "y", + showarrow = FALSE + ) + + ## add group/cluster annotation labels + if (label == "inside") { + plt <- plt %>% + plotly::layout(legend = list(x = 0.05, y = 0.95)) + } else if (label == "bottom") { + plt <- plt %>% + plotly::layout(legend = list(orientation = "h")) + } else if (label == "group") { + if (!is.null(textvar) && length(unique(textvar)) > 1) { + grp.pos <- apply(pos, 2, function(x) tapply(x, as.character(textvar), median)) + cex2 <- 1 + if (length(grp.pos) > 20) cex2 <- 0.8 + if (length(grp.pos) > 50) cex2 <- 0.6 + plt <- plt %>% plotly::add_annotations( + x = grp.pos[, 1], + y = grp.pos[, 2], + text = paste0("", rownames(grp.pos), ""), + font = list(size = 24 * cex2 * cex, color = "#555"), + showarrow = FALSE + ) + } + plt <- plt %>% + plotly::layout(showlegend = FALSE) + } else if (label == "sample") { + plt <- plt %>% + plotly::layout(showlegend = FALSE) + } else if (label == "") { + plt <- plt %>% + plotly::layout(showlegend = FALSE) + } + } + return(plt) + } + + create_plotlist <- function() { + samples <- selected_samples() + options <- input$hmpca_options + colvar <- hmpca.colvar() + shapevar <- hmpca.shapevar() + clustmethod <- clustmethod() + label <- input$pca_label + + shiny::req(samples, colvar, shapevar, clustmethod, legend) + + methods <- clustmethod() + if (input$all_clustmethods) { + cluster.names <- names(pgx$cluster$pos) + methods <- sub("2d", "", grep("2d", cluster.names, value = TRUE)) + } + do3d <- (input$plot3d) + multiplot <- length(methods) > 1 + + plist <- list() + for (i in 1:length(methods)) { + m <- methods[i] + m1 <- paste0(m, "2d") + if (do3d) m1 <- paste0(m, "3d") + pos <- pgx$cluster$pos[[m1]] + pos <- pos[samples, ] + plist[[i]] <- create_plot( + pgx = pgx, + pos = pos, + method = m, + colvar = colvar, + shapevar = shapevar, + label = label, + cex = ifelse(length(methods) > 1, 0.6, 1) + ) + } + plist + } + + plot.RENDER <- reactive({ + plist <- create_plotlist() + nc <- ceiling(sqrt(length(plist))) + plotly::subplot( + plist, + nrows = nc, + margin = 0.04 + ) + }) + + PlotModuleServer( + "pltmod", + plotlib = "plotly", + func = plot.RENDER, + csvFunc = plot_data, ## *** downloadable data as CSV + res = c(90, 170), ## resolution of plots + pdf.width = 8, + pdf.height = 8, + add.watermark = watermark + ) + }) +} diff --git a/components/board.dataview/R/dataview_module_geneinfo.R b/components/board.dataview/R/dataview_module_geneinfo.R index 50b974211..6b08f6cde 100644 --- a/components/board.dataview/R/dataview_module_geneinfo.R +++ b/components/board.dataview/R/dataview_module_geneinfo.R @@ -42,39 +42,41 @@ dataview_module_geneinfo_server <- function(id, moduleServer(id, function(input, output, session) { geneinfo_data <- shiny::reactive({ gene <- r.gene() - req(gene) - - jj <- which(pgx$genes$feature == gene) - if (pgx$genes$feature[jj] != pgx$genes$symbol[jj]) { ## Proteomics - gene <- pgx$genes$symbol[jj] - } - - gene <- toupper(sub(".*:", "", gene)) - eg <- AnnotationDbi::mget(gene, - envir = org.Hs.eg.db::org.Hs.egSYMBOL2EG, - ifnotfound = NA - )[[1]] - if (isTRUE(is.na(eg))) { - eg <- AnnotationDbi::mget(gene, - envir = org.Hs.eg.db::org.Hs.egALIAS2EG, ifnotfound = NA - )[[1]] - } - eg <- eg[1] - if (is.null(eg) || length(eg) == 0) { - return(NULL) - } - + shiny::req(gene) + + jj <- match(gene, rownames(pgx$genes)) + symbol <- pgx$genes$symbol[jj] + + dbg("[geneinfo] gene/feature = ", gene) + dbg("[geneinfo] jj = ", jj) + dbg("[geneinfo] symbol = ", symbol) + + ## eg <- AnnotationDbi::mget(symbol, + ## envir = org.Hs.eg.db::org.Hs.egSYMBOL2EG, + ## ifnotfound = NA + ## )[[1]] + ## if (isTRUE(is.na(eg))) { + ## eg <- AnnotationDbi::mget(symbol, + ## envir = org.Hs.eg.db::org.Hs.egALIAS2EG, ifnotfound = NA + ## )[[1]] + ## } + ## eg <- eg[1] + ## if (is.null(eg) || length(eg) == 0) { + ## return(NULL) + ## } + + info <- playbase::getHSGeneInfo(symbol) ## defined in pgx-functions.R res <- "(gene info not available)" - if (length(eg) > 0 && !is.na(eg)) { - info <- playbase::getHSGeneInfo(eg) ## defined in pgx-functions.R + if (!is.null(info)) { info$summary <- "(no info available)" - if (gene %in% names(playdata::GENE_SUMMARY)) { - info$summary <- playdata::GENE_SUMMARY[gene] + if (symbol %in% names(playdata::GENE_SUMMARY)) { + info$summary <- playdata::GENE_SUMMARY[symbol] info$summary <- gsub("Publication Note.*|##.*", "", info$summary) } ## reorder - nn <- intersect(c("symbol", "name", "map_location", "summary", names(info)), names(info)) + nn <- intersect(c("symbol", "name", "map_location", "summary", names(info)), + names(info)) info <- info[nn] info$symbol <- paste0(info$symbol, "
") diff --git a/components/board.dataview/R/dataview_server.R b/components/board.dataview/R/dataview_server.R index acc2d5f79..9bda95230 100644 --- a/components/board.dataview/R/dataview_server.R +++ b/components/board.dataview/R/dataview_server.R @@ -23,8 +23,6 @@ DataViewBoard <- function(id, pgx) { ## ---------------------------------------------------------------------- ## More Info (pop up window) ## ---------------------------------------------------------------------- - dropdown_search_gene <- "Search gene" - menu_grouped <- "Group by" data_infotext <- paste0( 'The DataView module provides information and visualisations of the dataset to quickly lookup a gene, @@ -115,26 +113,38 @@ DataViewBoard <- function(id, pgx) { { shiny::req(input$data_type) if (input$data_type %in% c("counts", "CPM")) { - pp <- rownames(pgx$counts) + features <- rownames(pgx$counts) } else { ## log2CPM - pp <- rownames(pgx$X) + features <- rownames(pgx$X) } ## gene filter. - genes <- sort(pgx$genes[pp, ]$gene_name) fc2 <- rowMeans(playbase::pgx.getMetaFoldChangeMatrix(pgx)$fc**2) - genes <- intersect(names(sort(-fc2)), genes) ## most var gene?? - selgene <- genes[1] - genes1 <- unique(c(selgene, sort(genes))) - if (length(genes1) > 1000) { - genes1 <- c( - sort(genes1[1:1000]), "(type SYMBOL for more genes...)", - genes1[1001:length(genes1)] + features <- intersect(names(sort(-fc2)), features) ## most var gene?? + sel.feature <- features[1] + features <- sort(features) + p1 <- head(rownames(pgx$genes),1000) + p2 <- head(pgx$genes$symbol,1000) + by.symbol <- mean(p1 == p2, na.rm=TRUE) > 0.8 + if(!by.symbol) { + gene <- pgx$genes[match(features,rownames(pgx$genes)),"symbol"] + feature_gene <- paste0(gene,"_",features) + names(features) <- feature_gene + features <- features[order(names(features))] + } + i <- match(sel.feature, features) + features <- c(features[i], features[-i]) + if (length(features) > 1000) { + features <- c( + features[1:1000], "(type for more genes...)", + features[1001:length(features)] ) } - shiny::updateSelectizeInput(session, "search_gene", - choices = genes1, selected = selgene, - # + + shiny::updateSelectizeInput( + session, "search_gene", + choices = features, + selected = sel.feature, options = list(maxOptions = 1001), server = TRUE ) @@ -144,7 +154,7 @@ DataViewBoard <- function(id, pgx) { last_search_gene <- reactiveVal() input_search_gene <- reactive({ - if (input$search_gene %in% c("(type SYMBOL for more genes...)", "")) { + if (input$search_gene == "" || grepl("type for more", input$search_gene)) { gene1 <- last_search_gene() return(gene1) } diff --git a/components/board.dataview/R/dataview_ui.R b/components/board.dataview/R/dataview_ui.R index bd647ee04..87ec0c0ad 100644 --- a/components/board.dataview/R/dataview_ui.R +++ b/components/board.dataview/R/dataview_ui.R @@ -111,7 +111,7 @@ DataViewUI <- function(id) { ns("tsneplot"), label = "c", title = "t-SNE clustering", - info.text = "T-SNE clustering of samples (or cells) colored by an expression of the gene selected in the search_gene dropdown menu. The red color represents an over-expression of the selected gene across samples (or cells).", + info.text = "T-SNE clustering of samples (or cells) colored by an expression of the selected gene. The red color represents an over-expression of the selected gene across samples (or cells).", caption = "t-SNE of samples colored by expression of selected gene.", height = c("100%", TABLE_HEIGHT_MODAL), width = c("auto", "100%") diff --git a/components/board.loading/R/.#loading_server.R b/components/board.loading/R/.#loading_server.R new file mode 120000 index 000000000..4ac3a32d3 --- /dev/null +++ b/components/board.loading/R/.#loading_server.R @@ -0,0 +1 @@ +kwee@tokyo.12702:1721819251 \ No newline at end of file diff --git a/components/board.loading/R/loading_table_datasets.R b/components/board.loading/R/loading_table_datasets.R index 1cb4cc640..834daa579 100644 --- a/components/board.loading/R/loading_table_datasets.R +++ b/components/board.loading/R/loading_table_datasets.R @@ -77,7 +77,6 @@ loading_table_datasets_server <- function(id, if (is.null(auth$logged) || !auth$logged) { return(NULL) } - dbg("[loading_table_datasets_server:getPGXINFO] reacted!") ## upstream trigger reload_pgxdir() @@ -92,7 +91,6 @@ loading_table_datasets_server <- function(id, ## before reading the info file, we need to update for new files if (need_update) { - dbg("[loading_server:getPGXINFO] updating pgxdir =", pgxdir) pgx.showSmallModal("Updating your library
Please wait...") shiny::withProgress(message = "Updating your library...", value = 0.33, { playbase::pgxinfo.updateDatasetFolder( @@ -111,8 +109,6 @@ loading_table_datasets_server <- function(id, }) getFilteredPGXINFO <- shiny::reactive({ - dbg("[loading_table_datasets_server:getFilteredPGXINFO] reacted!") - ## get the filtered table of pgx datasets df <- getPGXINFO() if (is.null(df)) { diff --git a/components/board.upload/R/.#upload_module_preview_samples.R b/components/board.upload/R/.#upload_module_preview_samples.R new file mode 120000 index 000000000..520f96383 --- /dev/null +++ b/components/board.upload/R/.#upload_module_preview_samples.R @@ -0,0 +1 @@ +kwee@sapporo.3669:1721624825 \ No newline at end of file diff --git a/components/board.upload/R/upload_module_outliers.R b/components/board.upload/R/upload_module_outliers.R new file mode 100644 index 000000000..68b028b4b --- /dev/null +++ b/components/board.upload/R/upload_module_outliers.R @@ -0,0 +1,727 @@ +## +## This file is part of the Omics Playground project. +## Copyright (c) 2018-2023 BigOmics Analytics SA. All rights reserved. +## + + +## ============================================================================= +## ==================== OUTLIERS UI/SERVER ================================= +## ============================================================================= + + +upload_module_outliers_ui <- function(id, height = "100%") { + ns <- shiny::NS(id) + + score.infotext <- + "The outlier z-score is calculated as the average of z-score from correlation, euclidean distance and avarage feature z-score." + + missing.infotext <- + "Analysis of variables by plotting their significance in correlation with the phenotype against their significance in correlation with a principal component (PC) vector. Strong model variables are situate 'top right'. Batch effect variables with high PC correlation but low phenotype correlation are on the 'top left'. A well-designed experiment shows strong model variables in PC1, else it may be a sign of significant batch-effects." + + missing.options <- tagList( + shiny::radioButtons(ns("missing_plottype"), "Plot type:", c("heatmap", "ratio plot"), + selected = "heatmap", inline = TRUE + ), + ) + + norm.options <- tagList( + shiny::radioButtons(ns("norm_plottype"), "Plot type:", c("boxplot", "histogram", "density"), + selected = "boxplot", inline = TRUE + ), + shiny::checkboxInput(ns("norm_zero_na"), "zero as NA", FALSE) + ) + + outlier.options <- tagList( + ## shiny::radioButtons( ns('outlier_plottype'), "Plot type:", c("pca","heatmap"), inline = TRUE), + shiny::checkboxInput(ns("outlier_shownames"), "show sample names", FALSE) + ) + + bec.options <- tagList( + shiny::radioButtons(ns("bec_plottype"), "Plot type:", c("pca", "tsne", "heatmap"), + inline = TRUE + ) + ) + + bslib::layout_columns( + col_widths = c(2, 10), + height = "calc(100vh - 200px)", + heights_equal = "row", + bslib::card(bslib::card_body( + style = "padding: 0px;", + bslib::accordion( + multiple = FALSE, + style = "background-color: #F7FAFD99;", + bslib::accordion_panel( + title = "1. Missing values", + shiny::p("Replace missing values using an imputation method:\n"), + shiny::selectInput(ns("impute_method"), NULL, + ## choices = c("bpca","LLS","MinDet","MinProb","NMF","RF","SVD2","zero"), + choices = c("MinDet", "MinProb", "NMF", "SVDimpute" = "SVD2", "zero"), + selected = "SVD2" + ), + shiny::checkboxInput(ns("zero_as_na"), label = "Treat zero as NA", value = FALSE), + br() + ), + bslib::accordion_panel( + title = "2. Normalization", + div("Normalize data values:\n"), + shiny::selectInput(ns("scaling_method"), NULL, + choices = c( + "CPM" = "cpm", "median.3" = "m3", "median.4" = "m4", + "zdist.2" = "z2", "quantile.001" = "q0.01" + ), + selected = "cpm" + ), + shiny::checkboxInput(ns("skip_norm"), "skip normalization", value = FALSE), + br() + ), + bslib::accordion_panel( + title = "3. Outlier detection", + p("Analyze and remove outliers (i.e. bad samples) from your dataset.\n"), + shiny::sliderInput(ns("outlier_threshold"), "Threshold:", 1, 12, 6, 1), + br() + ), + bslib::accordion_panel( + title = "4. Batch correction", + shiny::p("Clean up your data from unwanted variation:\n"), + shiny::selectInput(ns("bec_method"), NULL, + choices = c("uncorrected", "ComBat", "SVA", "RUV3", "NNM"), + selected = "uncorrected" + ), + shiny::conditionalPanel( + "input.bec_method == 'ComBat' || input.bec_method == 'limma'", + ns = ns, + ## shiny::selectInput(ns("bec_param"), "Batch parameter:", choices=NULL), + shiny::textOutput(ns("bec_param_text")), + shiny::br(), + ), + shiny::checkboxInput(ns("bec_preview_all"), "Preview all methods", value = TRUE), + ## shiny::actionButton( + ## ns("compute_button"), + ## "Compute", + ## class = "btn btn-primary", + ## width ='80%', + ## style = 'margin-left:10%; margin-top: 15px;' + ## ##style = 'margin-left:10%; position: absolute; bottom: 30px;' + ## ), + br() + ) + ), + br() + )), + + ## ---------------------------- canvas ---------------------------------- + bslib::layout_columns( + width = 12, + bslib::layout_columns( + col_widths = 6, + row_heights = c(3, 3), + height = "calc(100vh - 200px)", + heights_equal = "row", + ## shiny::plotOutput(ns("canvas"), width = "100%", height = height) %>% bigLoaders::useSpinner(), + PlotModuleUI( + ns("plot2"), + title = "Missing values", + info.text = missing.infotext, + caption = missing.infotext, + options = missing.options, + height = c("100%", "70vh") + ), + PlotModuleUI( + ns("plot1"), + title = "Normalization", + # info.text = info.text, + # caption = caption, + options = norm.options, + height = c("100%", "70vh") + ), + PlotModuleUI( + ns("plot3"), + title = "Outlier detection", + info.text = score.infotext, + caption = score.infotext, + options = outlier.options, + height = c("100%", "70vh") + ), + PlotModuleUI( + ns("plot4"), + title = "Batch-effect correction", + # info.text = info.text, + # caption = caption, + ## options = bec.options, + options = NULL, + height = c("100%", "70vh") + ) + ) + ) + ) +} + + +upload_module_outliers_server <- function(id, r_X, r_samples, r_contrasts, + is.count = FALSE, height = 720) { + shiny::moduleServer( + id, + function(input, output, session) { + output$bec_param_text <- renderText({ + pars <- get_model_parameters() + shiny::req(pars) + batch.pars <- pars$batch.pars + paste("Batch parameters:", paste(batch.pars, collapse = "+"), "\n") + }) + + get_model_parameters <- eventReactive( + { + list(r_X(), r_samples(), r_contrasts()) + }, + { + shiny::req(r_X(), r_samples(), r_contrasts()) + + X <- r_X() + samples <- r_samples() + contrasts <- r_contrasts() + ## contrasts <- contrasts[,1,drop=FALSE] + + shiny::req(ncol(X) == nrow(samples)) + shiny::req(nrow(contrasts) == ncol(X)) + + pars <- playbase::get_model_parameters(X, samples, pheno = NULL, contrasts = contrasts) + + list( + batch.pars = pars$batch.pars, + pheno.pars = pars$pheno.pars, + batch = pars$batch, + pheno = pars$pheno + ) + } + ) + + ## ------------------------------------------------------------------ + ## Object reactive chain + ## ------------------------------------------------------------------ + + ## IMPUTE FIRST OR NORMALIZE???? + imputedX <- reactive({ + shiny::req(r_X()) + counts <- r_X() + X <- log2(1 + counts) + X[playbase::is.xxl(X, z = 10)] <- NA ## outlier XXL values + if (input$zero_as_na) X[which(X == 0)] <- NA + ## which.missing <- which( is.na(X) ) + X <- playbase::imputeMissing(X, method = input$impute_method) + + ## sum up duplicates (in linear intensity scale) + X <- log2(rowsum(2**X, rownames(X))) + X <- pmax(X, 0) ## really? + + dbg("[outliers_server] dim.counts = ", dim(counts)) + dbg("[outliers_server] dim.imputedX = ", dim(X)) + + X + }) + + normalizedX <- reactive({ + X <- imputedX() ## log + if (input$skip_norm) { + return(X) ## log + } + samples <- r_samples() + contrasts <- r_contrasts() + shiny::req(dim(X), dim(samples), dim(contrasts)) + + shiny::withProgress(message = "Computing technical variation...", value = 0, { + shiny::incProgress(amount = 0.25, "Global scaling...") + X <- playbase::global_scaling(X, method = input$scaling_method) + + shiny::incProgress(amount = 0.25, "Median centering...") + ## eX <- playbase::pgx.countNormalization( eX, methods = "median.center") + mx <- apply(X, 2, median, na.rm = TRUE) + X <- t(t(X) - mx) + mean(mx) + + ## technical effects correction + shiny::incProgress(amount = 0.25, "Correcting for technical effects...") + pheno <- playbase::contrasts2pheno(contrasts, samples) + X <- playbase::removeTechnicalEffects( + X, samples, pheno, + p.pheno = 0.05, p.pca = 0.5, force = FALSE, + params = c("lib", "mito", "ribo", "cellcycle", "gender"), + nv = 2, k.pca = 10, xrank = NULL + ) + + ## for quantile normalization we omit the zero value and put back later + shiny::incProgress(amount = 0.25, "Quantile normalization...") + jj <- which(X < 0.01) + X[jj] <- NA + X <- limma::normalizeQuantiles(X) + X[jj] <- 0 + }) + dbg("[outliers_server:normalizedX] dim.normalizedX = ", dim(X)) + dbg("[outliers_server:normalizedX] dim.imputedX = ", dim(imputedX())) + X + }) + + + cleanX <- reactive({ + shiny::req(dim(normalizedX())) + + X <- normalizedX() + res <- playbase::detectOutlierSamples(X, plot = FALSE) + is.outlier <- (res$z.outlier > input$outlier_threshold) + if (any(is.outlier) && !all(is.outlier)) { + X <- X[, which(!is.outlier), drop = FALSE] + } + pos <- NULL + if (NCOL(X) > 1) { + pos <- irlba::irlba(X, nv = 2)$v + rownames(pos) <- colnames(X) + } + dbg("[outliers_server] dim.cleanX = ", dim(X)) + list(X = X, pos = pos) + }) + + correctedX <- shiny::reactive({ + shiny::req(dim(cleanX()$X), dim(r_contrasts()), dim(r_samples())) + + ## recompute chosed correction method with full + ## matrix. previous was done on shortened matrix. + X1 <- cleanX()$X + samples <- r_samples() + contrasts <- r_contrasts() + kk <- intersect(colnames(X1), rownames(samples)) + kk <- intersect(kk, rownames(contrasts)) + X1 <- X1[, kk, drop = FALSE] + contrasts <- contrasts[kk, , drop = FALSE] + samples <- samples[kk, , drop = FALSE] + m <- input$bec_method + dbg("[outliers_server] methods = ", m) + mm <- unique(c("uncorrected", input$bec_method)) + pars <- get_model_parameters() + xlist <- playbase::runBatchCorrectionMethods( + X = X1, + batch = pars$batch, + y = pars$pheno, + controls = NULL, + methods = mm, + combatx = FALSE, + ntop = Inf, + sc = FALSE, + remove.failed = TRUE + ) + shiny::removeModal() + + dbg("[outliers_server] names.xlist = ", names(xlist)) + cx <- xlist[[m]] + dbg("[outliers_server] dim.correctedX = ", dim(cx)) + + cx + }) + + ## return object + correctedCounts <- reactive({ + X <- correctedX() + dbg("[outliers_server] dim.correctedCounts = ", dim(X)) + pmax(2**X - 1, 0) + }) + + ## ------------------------------------------------------------------ + ## Compute reactive + ## ------------------------------------------------------------------ + + results_correction_methods <- reactive({ + ## shiny::req(cleanX()$X, r_contrasts(), r_samples()) + shiny::req(dim(cleanX()$X), dim(r_contrasts()), dim(r_samples())) + + X0 <- imputedX() + X1 <- cleanX()$X + samples <- r_samples() + contrasts <- r_contrasts() + kk <- intersect(colnames(X1), colnames(X0)) + kk <- intersect(kk, rownames(samples)) + kk <- intersect(kk, rownames(contrasts)) + X1 <- X1[, kk, drop = FALSE] + X0 <- X0[, kk, drop = FALSE] + contrasts <- contrasts[kk, , drop = FALSE] + samples <- samples[kk, , drop = FALSE] + xlist.init <- list("raw" = X0, "normalized" = X1) + + shiny::withProgress(message = "Comparing batch-correction methods...", value = 0.3, { + res <- playbase::compare_batchcorrection_methods( + X1, samples, + pheno = NULL, contrasts = contrasts, + methods = c("ComBat", "RUV", "SVA", "NNM"), + ntop = 4000, xlist.init = xlist.init + ) + }) + + selected <- res$best.method + shiny::updateSelectInput(session, "bec_method", selected = selected) + + return(res) + }) + + results_outlier_methods <- eventReactive( + { + list(normalizedX()) + }, + { + X <- normalizedX() + shiny::validate(shiny::need(!is.null(X), "no data. please upload.")) + shiny::validate(shiny::need(!is.null(nrow(X)), "no data. please upload.")) + + X <- head(X[order(-matrixStats::rowSds(X)), ], 1000) + out <- playbase::detectOutlierSamples(X, plot = FALSE) + + nb <- min(30, dim(X) / 5) + scaledX <- t(scale(t(scale(t(X), scale = FALSE)))) + corX <- cor(t(scaledX)) + + ## standard dim reduction methods + pos <- list() + ## pos[['tsne']] <- Rtsne::Rtsne(scaledX, check_duplicates=FALSE, perplexity=nb)$Y + pos[["pca"]] <- irlba::irlba(scaledX, nu = 2, nv = 0)$u + ## pos[['umap']] <- uwot::umap(scaledX, n_neighbors = ceiling(nb/2)) + for (i in 1:length(pos)) { + rownames(pos[[i]]) <- rownames(scaledX) + colnames(pos[[i]]) <- paste0(names(pos)[i], "_", 1:2) + } + + out$pos <- pos + out$corX <- corX + out + } + ) + + ## ------------------------------------------------------------------ + ## Plot functions + ## ------------------------------------------------------------------ + + plot_normalization <- function() { + ## rX <- playbase::read.as_matrix("/home/kwee/Downloads/raw_allorenteizquierdo@health.ucsd.edu_7505cdba5/raw_counts.csv") + rX <- r_X() + X0 <- imputedX() + X1 <- normalizedX() + + if (input$norm_zero_na) { + which.zero <- which(rX == 0) + X0[X0 == 0] <- NA + X1[X1 == 0] <- NA + } + + if (input$norm_plottype == "boxplot") { + if (ncol(X0) > 40) { + jj <- sample(ncol(X0), 40) + ii <- rownames(X0) ## names! + ## just downsampling for boxplots + if (length(ii) > 2000) ii <- sample(ii, 2000) + X0 <- X0[ii, jj] + X1 <- X1[ii, jj] + rX <- rX[ii, jj] + } + + ymax <- max(max(X0, na.rm = TRUE), max(X1, na.rm = TRUE)) + ymin <- quantile(X0[which(rX > 0)], probs = 0.001, na.rm = TRUE) + if (ymin > 0) ymin <- 0 + dy <- 0.1 * (ymax - ymin) + ylim <- c(ymin - dy, ymax + dy) + + par(mfrow = c(1, 2), mar = c(3.2, 3, 2, 0.5), mgp = c(2.1, 0.8, 0)) + boxplot(X0, + main = "raw", ylim = ylim, + ylab = "expression (log2)", xlab = "samples" + ) + boxplot(X1, + main = "normalized", ylim = ylim, + ylab = "", xlab = "samples" + ) + } + + if (input$norm_plottype == "histogram") { + xmax0 <- quantile(X0[which(rX > 0)], probs = 0.999, na.rm = TRUE) + xmax1 <- quantile(X1[which(rX > 0)], probs = 0.999, na.rm = TRUE) + xmin0 <- quantile(X1[which(rX > 0)], probs = 0.001, na.rm = TRUE) + xmin1 <- quantile(X1[which(rX > 0)], probs = 0.001, na.rm = TRUE) + xmin0 <- min(xmin0, 0) + xmin1 <- min(xmin1, 0) + xlim0 <- c(xmin0, xmax0) + xlim1 <- c(xmin1, xmax1) + par(mfrow = c(1, 2), mar = c(3.2, 3, 2, 0.5), mgp = c(2.1, 0.8, 0)) + hist(X0, + breaks = 70, main = "raw", xlim = xlim0, + xlab = "expression (log2)" + ) + hist(X1, + breaks = 60, main = "normalized", xlim = xlim1, + xlab = "expression (log2)", ylab = "" + ) + } + + if (input$norm_plottype == "density") { + xmax0 <- quantile(X0[which(rX > 0)], probs = 0.999, na.rm = TRUE) + xmax1 <- quantile(X1[which(rX > 0)], probs = 0.999, na.rm = TRUE) + xmin0 <- quantile(X1[which(rX > 0)], probs = 0.001, na.rm = TRUE) + xmin1 <- quantile(X1[which(rX > 0)], probs = 0.001, na.rm = TRUE) + xmin0 <- min(xmin0, 0) + xmin1 <- min(xmin1, 0) + xlim0 <- c(xmin0, xmax0) + xlim1 <- c(xmin1, xmax1) + + par(mfrow = c(1, 2), mar = c(3.2, 3, 2, 0.5), mgp = c(2.1, 0.8, 0)) + playbase::gx.hist(X0, + breaks = 70, main = "raw", xlim = xlim0, + xlab = "expression (log2)" + ) + playbase::gx.hist(X1, + breaks = 60, main = "normalized", xlim = xlim1, + xlab = "expression (log2)", ylab = "" + ) + } + } + + ## missing values + plot_missingvalues <- function() { + X0 <- r_X() + X1 <- imputedX() + X0 <- X0[rownames(X1), ] ## remove duplicates + + ii <- which(is.na(X0)) + if (isolate(input$zero_as_na)) { + ii <- which(is.na(X0) | X0 == 0) + } + q999 <- quantile(X1, probs = 0.999)[1] + X1[X1 > q999] <- NA + h <- hist(X1, breaks = 80, plot = FALSE) + hh <- h$breaks + + ## set zero value to 1, NA values to 2 + X2 <- 1 * is.na(X0) + ## X2 <- X2 + 1 * (!is.na(X0) & X0 == 0) + if (input$zero_as_na) X2[X0 == 0] <- 1 + ## jj <- head( order(-rowMeans(is.na(X0))), 200) + jj <- head(order(-apply(X2, 1, sd)), 200) + X2 <- X2[jj, ] + + par(mfrow = c(1, 2), mar = c(3.2, 3.2, 0.8, 0.5), mgp = c(2.2, 0.85, 0)) + + if (length(ii) > 0) { + hist(X1[-ii], breaks = hh, main = "", xlab = "expression (log2CPM)") + hist(X1[ii], breaks = hh, add = TRUE, col = "red") + } else { + hist(X1, breaks = hh, main = "", xlab = "expression (log2CPM)") + } + + if (input$missing_plottype == "heatmap") { + if (any(X2 > 0)) { + ## NA heatmap + par(mar = c(3, 3, 2, 2), mgp = c(2.5, 0.85, 0)) + playbase::gx.imagemap(X2, cex = -1) + title("missing values patterns", cex.main = 1.2) + } else { + plot.new() + text(0.5, 0.5, "no missing values") + } + } + + if (input$missing_plottype == "ratio plot") { + if (any(X2 > 0)) { + ## NA ratio plot + par(mar = c(3, 3, 2, 2), mgp = c(2.0, 0.75, 0)) + x.avg <- rowMeans(X1, na.rm = TRUE) + x.nar <- rowMeans(is.na(X0)) + x.avg2 <- cut(x.avg, breaks = 20) + x.nar2 <- tapply(1:nrow(X0), x.avg2, function(i) mean(is.na(X0[i, , drop = FALSE]))) + aa <- sort(unique(as.numeric(gsub(".*,|\\]", "", as.character(x.avg2))))) + barplot(rbind(x.nar2, 1 - x.nar2), + beside = FALSE, names.arg = aa, las = 1, + xlab = "average intensity (log2)", ylab = "missing value ratio" + ) + title("missingness vs. average intensity") + } else { + plot.new() + text(0.5, 0.5, "no missing values") + } + } + } + + ## sample outlier PCA plot + plot.outlierPCA <- function(pos, z, z0, shownames) { + is.outlier <- (z > z0) + col1 <- "grey70" + ## col1 <- res.outliers$dbscan$cluster + 1 + cex1 <- cut(nrow(pos), + breaks = c(0, 40, 100, 250, 1000, 999999), + c(1, 0.85, 0.7, 0.55, 0.4) + ) + cex1 <- 3 * as.numeric(as.character(cex1)) + pos <- playbase::uscale(pos) + + ## How about plotly?? + plot(pos, + col = col1, cex = 0.8 * cex1, pch = 20, + xlim = c(-0.1, 1.1), ylim = c(-0.1, 1.1), + xlab = "PC1", ylab = "PC2", main = "outliers" + ) + + if (shownames) { + pos1 <- pos + j <- which(is.outlier) + if (length(j)) pos1 <- pos[-j, , drop = FALSE] + text(pos1, rownames(pos1), cex = 0.85, offset = 0.8, pos = 1:4) + } + + if (any(is.outlier)) { + j <- which(is.outlier) + points(pos[j, , drop = FALSE], col = "red", cex = 0.8 * cex1, lwd = 3, pch = 1) + outlier.name <- rownames(pos)[j] + text(pos[j, 1], pos[j, 2], outlier.name, cex = 1.0, offset = 0.8, pos = 1:4) + } + } + + ## sample outlier scores + plot_outliers <- function() { + res <- results_outlier_methods() + z0 <- as.numeric(input$outlier_threshold) + zscore <- res$z.outlier + Z <- res$Z + pos <- res$pos[["pca"]] + ## plottype <- input$outlier_plottype + plottype <- "pca" + if (plottype == "pca") { + par(mfrow = c(1, 2), mar = c(3.2, 3, 2, 0.5), mgp = c(2.1, 0.8, 0)) + barplot(zscore, + main = "outlier score", + ylim = c(0, max(7, 1.2 * max(Z))), ylab = "z-score" + ) + abline(h = z0, lty = 3, lwd = 1.5, col = "red") + plot.outlierPCA(pos, zscore, z0, input$outlier_shownames) + } + + if (plottype == "heatmap") { + par(mfrow = c(1, 2), mar = c(0, 3, 0, 1), mgp = c(2.1, 0.8, 0)) + playbase::gx.heatmap(res$corX, + sym = TRUE, mar = c(1, 12), keysize = 0.4, + cexCol = 0.0001, scale = "none", key = FALSE + ) + } + } + + plot_correction <- function() { + if (input$bec_preview_all == FALSE) { + plot_before_after() + } + if (input$bec_preview_all == TRUE) { + plot_all_methods() + } + } + + plot_all_methods <- function() { + res <- results_correction_methods() + pos.list <- res$pos[["tsne"]] + pheno <- res$pheno + xdim <- length(res$pheno) + col1 <- factor(pheno) + cex1 <- cut(xdim, + breaks = c(0, 40, 100, 250, 1000, 999999), + c(1, 0.85, 0.7, 0.55, 0.4) + ) + cex1 <- 2.5 * as.numeric(as.character(cex1)) + + par(mfrow = c(2, 3), mar = c(2, 2, 2, 1)) + for (i in 1:length(pos.list)) { + plot(pos.list[[i]], col = col1, cex = cex1, pch = 20) + title(names(pos.list)[i], cex.main = 1.5) + } + } + + plot_before_after <- function() { + ## out.res <- results_outlier_methods() + res <- results_correction_methods() + + method <- input$bec_method + if (method == "uncorrected") method <- "normalized" + pos0 <- res$pos[["tsne"]][["normalized"]] + pos1 <- res$pos[["tsne"]][[method]] + + kk <- intersect(rownames(pos0), rownames(pos1)) + pos0 <- pos0[kk, ] + pos1 <- pos1[kk, ] + + ## pheno <- r_contrasts()[,1] + pheno <- playbase::contrasts2pheno(r_contrasts(), r_samples()) + pheno <- pheno[rownames(pos0)] + col1 <- factor(pheno) + cex1 <- cut(nrow(pos1), + breaks = c(0, 40, 100, 250, 1000, 999999), + c(1, 0.85, 0.7, 0.55, 0.4) + ) + cex1 <- 2.7 * as.numeric(as.character(cex1)) + + par(mfrow = c(1, 2), mar = c(3.2, 3, 2, 0.5), mgp = c(2.1, 0.8, 0)) + plot(pos0, + col = col1, pch = 20, cex = 1.0 * cex1, main = "before", + xlab = "PC1", ylab = "PC2" + ) + plot(pos1, + col = col1, pch = 20, cex = 1.0 * cex1, main = "after", + xlab = "PC1", ylab = "PC2" + ) + } + + ## ------------------------------------------------------------------ + ## Plot modules + ## ------------------------------------------------------------------ + + PlotModuleServer( + "plot1", + plotlib = "base", + func = plot_normalization, + ## func2 = plot.RENDER, + ## csvFunc = plot_data, + res = c(75, 120), + pdf.width = 12, + pdf.height = 6, + add.watermark = FALSE + ) + + PlotModuleServer( + "plot2", + plotlib = "base", + func = plot_missingvalues, + res = c(75, 120), + pdf.width = 12, + pdf.height = 6, + add.watermark = FALSE + ) + + PlotModuleServer( + "plot3", + plotlib = "base", + func = plot_outliers, + ## func2 = plot.RENDER, + ## csvFunc = plot_data, + res = c(75, 120), + pdf.width = 12, + pdf.height = 6, + add.watermark = FALSE + ) + + PlotModuleServer( + "plot4", + plotlib = "base", + func = plot_correction, + ## func2 = plot.RENDER, + ## csvFunc = plot_data, + res = c(75, 120), + pdf.width = 12, + pdf.height = 6, + add.watermark = FALSE + ) + + return( + list( + correctedCounts = correctedCounts, + results = results_correction_methods + ) + ) ## pointing to reactive + } ## end-of-server + ) +} diff --git a/components/board.upload/R/upload_plot_contraststats.R b/components/board.upload/R/upload_plot_contraststats.R new file mode 100644 index 000000000..5aa5104ef --- /dev/null +++ b/components/board.upload/R/upload_plot_contraststats.R @@ -0,0 +1,108 @@ +## +## This file is part of the Omics Playground project. +## Copyright (c) 2018-2023 BigOmics Analytics SA. All rights reserved. +## + +upload_plot_contraststats_ui <- function(id, + label = "", + height, + width, + title, + caption, + info.text) { + ns <- shiny::NS(id) + + PlotModuleUI( + ns("pltmod"), + title = title, + label = label, + plotlib = "base", + info.text = info.text, + caption = caption, + options = NULL, + download.fmt = c("png", "pdf", "csv"), + width = width, + height = height + ) +} + +upload_plot_contraststats_server <- function(id, checkTables, contrastsRT, samplesRT, watermark = FALSE) { + moduleServer(id, function(input, output, session) { + ## extract data from pgx object + plot_data <- shiny::reactive({ + contrasts <- contrastsRT() + has.contrasts <- !is.null(contrasts) && NCOL(contrasts) > 0 + check <- checkTables() + + status.ok <- check["contrasts.csv", "status"] + status.ds <- tolower(check["contrasts.csv", "description"]) + error.msg <- paste( + toupper(status.ok), "\nPlease upload 'contrasts.csv' (Optional):", + status.ds + ) + + if (is.null(samplesRT()) & !is.null(contrasts)) { + error.msg <- paste( + toupper(check["samples.csv", "status"]), "\nPlease upload 'samples.csv':", + tolower(check["samples.csv", "description"]) + ) + } + + shiny::validate( + shiny::need( + status.ok == "OK" && has.contrasts && !is.null(samplesRT()), + error.msg + ) + ) + + ## we need to return the sample-wise labeled contrast matrix + samples <- samplesRT() + contrasts2 <- playbase::contrasts.convertToLabelMatrix( + contrasts, samples + ) + return(contrasts2) + }) + + plot.RENDER <- function() { + df <- plot_data() + px <- head(colnames(df), 20) ## maximum to show?? + df <- data.frame(df[, px, drop = FALSE], check.names = FALSE) + tt2 <- paste(nrow(df), "samples x", ncol(df), "comparisons") + + p1 <- df %>% + inspectdf::inspect_cat() %>% + inspectdf::show_plot() + + p1 <- p1 + ggplot2::ggtitle("COMPARISONS", subtitle = tt2) + + ggplot2::theme( + axis.text.y = ggplot2::element_text( + size = 12, + margin = ggplot2::margin(0, 0, 0, 25), + hjust = 1 + ) + ) + + return(p1) + } + + regular_plot.RENDER <- function() { + plot.RENDER() + + ggplot2::scale_x_discrete(label = function(x) stringr::str_trunc(x, 12)) + } + + modal_plot.RENDER <- function() { + plot.RENDER() + } + + PlotModuleServer( + "pltmod", + plotlib = "base", + func = regular_plot.RENDER, + func2 = modal_plot.RENDER, + csvFunc = plot_data, ## *** downloadable data as CSV + res = c(90, 90), ## resolution of plots + pdf.width = 4, pdf.height = 4, + add.watermark = watermark + ) + }) ## end of moduleServer +} diff --git a/components/board.upload/R/upload_plot_countstats.R b/components/board.upload/R/upload_plot_countstats.R new file mode 100644 index 000000000..a52396fd9 --- /dev/null +++ b/components/board.upload/R/upload_plot_countstats.R @@ -0,0 +1,82 @@ +## +## This file is part of the Omics Playground project. +## Copyright (c) 2018-2023 BigOmics Analytics SA. All rights reserved. +## + +upload_plot_countstats_ui <- function(id, + label = "", + height, + width, + title, + caption, + info.text) { + ns <- shiny::NS(id) + + PlotModuleUI( + ns("pltmod"), + title = title, + label = label, + plotlib = "base", + info.text = info.text, + caption = caption, + options = NULL, + download.fmt = c("png", "pdf", "csv"), + width = width, + height = height + ) +} + +upload_plot_countstats_server <- function(id, checkTables, countsRT, watermark = FALSE) { + moduleServer(id, function(input, output, session) { + ## extract data from pgx object + plot_data <- shiny::reactive({ + counts <- countsRT() + has.counts <- !is.null(counts) && NCOL(counts) > 0 + check <- checkTables() + shiny::req(check) + + status.ok <- check["counts.csv", "status"] + status.ds <- tolower(check["counts.csv", "description"]) + error.msg <- paste( + toupper(status.ok), "\nPlease upload 'counts.csv' (Required):", + status.ds + ) + shiny::validate( + shiny::need( + status.ok == "OK" && has.counts, + error.msg + ) + ) + return(counts) + }) + + plot.RENDER <- function() { + counts <- plot_data() + xx <- log2(1 + counts) + if (nrow(xx) > 1000) xx <- xx[sample(1:nrow(xx), 1000), , drop = FALSE] + suppressWarnings(dc <- data.table::melt(xx)) + dc$value[dc$value == 0] <- NA + tt2 <- paste(nrow(counts), "genes x", ncol(counts), "samples") + ggplot2::ggplot(dc, ggplot2::aes(x = value, color = Var2)) + + ggplot2::geom_density() + + ggplot2::xlab("log2(1+counts)") + + ggplot2::theme(legend.position = "none") + + ggplot2::ggtitle("COUNTS", subtitle = tt2) + } + + modal_plot.RENDER <- function() { + plot.RENDER() + } + + PlotModuleServer( + "pltmod", + plotlib = "base", + func = plot.RENDER, + func2 = modal_plot.RENDER, + csvFunc = plot_data, ## *** downloadable data as CSV + res = c(90, 90), ## resolution of plots + pdf.width = 4, pdf.height = 4, + add.watermark = watermark + ) + }) ## end of moduleServer +} diff --git a/components/board.upload/R/upload_plot_pcaplot.R b/components/board.upload/R/upload_plot_pcaplot.R new file mode 100644 index 000000000..eba1d587b --- /dev/null +++ b/components/board.upload/R/upload_plot_pcaplot.R @@ -0,0 +1,86 @@ +## +## This file is part of the Omics Playground project. +## Copyright (c) 2018-2023 BigOmics Analytics SA. All rights reserved. +## + + +# PlotModuleUI for pcaplot +upload_plot_pcaplot_ui <- function(id, + title, + info.text, + caption, + label = "", + height, + width) { + ns <- shiny::NS(id) + + options <- shiny::tagList( + withTooltip( + shiny::selectInput(ns("pcaplot.method"), "Method:", + choices = c("pca", "tsne", "umap"), + width = "100%" + ), "Choose clustering method.", + placement = "right", options = list(container = "body") + ) + ) + + PlotModuleUI(ns("plot"), + title = title, + caption = caption, + label = label, + plotlib = "plotly", + info.text = info.text, + options = options, + download.fmt = c("png", "pdf", "csv"), + width = width, + height = height + ) +} + +# PlotModuleServer for pcaplot +upload_plot_pcaplot_server <- function(id, + phenoRT, + countsRT, + sel.conditions, + watermark = FALSE) { + moduleServer( + id, function(input, output, session) { + plot_data <- shiny::reactive({ + pheno <- phenoRT() + counts <- countsRT() + shiny::req(pheno) + shiny::req(counts) + method <- input$pcaplot.method + X <- log2(1 + counts) + X[is.na(X)] <- median(X, na.rm = TRUE) + + ## clust <- playbase::pgx.clusterMatrix.DEPRECATED(X, dims = 2, method = method)$pos2d + clust <- playbase::pgx.clusterBigMatrix(X, dims = 2, method = method[1]) + clust[[1]] + }) + + plot.RENDER <- function() { + pos2d <- plot_data() + cond <- sel.conditions() + shiny::req(cond) + playbase::pgx.scatterPlotXY( + pos2d, + var = cond, + plotlib = "plotly", + legend = FALSE + ) + } + + PlotModuleServer( + "plot", + plotlib = "plotly", + func = plot.RENDER, + func2 = plot.RENDER, + csvFunc = plot_data, + res = c(70, 140), + pdf.width = 8, pdf.height = 8, + add.watermark = watermark + ) + } + ) +} diff --git a/components/board.upload/R/upload_plot_phenostats.R b/components/board.upload/R/upload_plot_phenostats.R new file mode 100644 index 000000000..62ed19de7 --- /dev/null +++ b/components/board.upload/R/upload_plot_phenostats.R @@ -0,0 +1,106 @@ +## +## This file is part of the Omics Playground project. +## Copyright (c) 2018-2023 BigOmics Analytics SA. All rights reserved. +## + +upload_plot_phenostats_ui <- function(id, + label = "", + height, + width, + title, + caption, + info.text) { + ns <- shiny::NS(id) + + PlotModuleUI( + ns("pltmod"), + title = title, + label = label, + plotlib = "base", + info.text = info.text, + caption = caption, + options = NULL, + download.fmt = c("png", "pdf", "csv"), + width = width, + height = height + ) +} + +plotPhenoDistribution <- function(pheno) { + px <- head(colnames(pheno), 20) ## show maximum?? + df <- type.convert(pheno[, px, drop = FALSE], as.is = TRUE) + vt <- df %>% inspectdf::inspect_types() + + ## discretized continuous variable into 10 bins + ii <- unlist(vt$col_name[c("numeric", "integer")]) + if (!is.null(ii) && length(ii)) { + cat("[UploadModule::phenoStats] discretizing variables:", ii, "\n") + df[, ii] <- apply(df[, ii, drop = FALSE], 2, function(x) { + if (any(is.infinite(x))) x[which(is.infinite(x))] <- NA + cut(x, breaks = 10) + }) + } + + p1 <- df %>% + inspectdf::inspect_cat() %>% + inspectdf::show_plot() + tt2 <- paste(nrow(pheno), "samples x", ncol(pheno), "phenotypes") + # + p1 <- p1 + ggplot2::ggtitle("PHENOTYPES", subtitle = tt2) + + ggplot2::theme( + axis.text.y = ggplot2::element_text( + size = 12, + margin = ggplot2::margin(0, 0, 0, 25), + hjust = 1 + ) + ) + return(p1) +} + + +upload_plot_phenostats_server <- function(id, checkTables, samplesRT, watermark = FALSE) { + moduleServer(id, function(input, output, session) { + ## extract data from pgx object + plot_data <- shiny::reactive({ + pheno <- samplesRT() + has.pheno <- !is.null(pheno) && NCOL(pheno) > 0 + check <- checkTables() + + status.ok <- check["samples.csv", "status"] + status.ds <- tolower(check["samples.csv", "description"]) + error.msg <- paste( + toupper(status.ok), "\nPlease upload 'samples.csv' (Required):", + status.ds + ) + shiny::validate( + shiny::need( + status.ok == "OK" && has.pheno, + error.msg + ) + ) + pheno <- as.data.frame(pheno, check.names = FALSE, drop = FALSE) + return(pheno) + }) + + plot.RENDER <- function() { + pheno <- plot_data() + p1 <- plotPhenoDistribution(pheno) + return(p1) + } + + modal_plot.RENDER <- function() { + plot.RENDER() + } + + PlotModuleServer( + "pltmod", + plotlib = "base", + func = plot.RENDER, + func2 = modal_plot.RENDER, + csvFunc = plot_data, ## *** downloadable data as CSV + res = c(90, 90), ## resolution of plots + pdf.width = 4, pdf.height = 4, + add.watermark = watermark + ) + }) ## end of moduleServer +} diff --git a/components/board.user/R/.#userprofile_ui.R b/components/board.user/R/.#userprofile_ui.R new file mode 120000 index 000000000..bf6753ce5 --- /dev/null +++ b/components/board.user/R/.#userprofile_ui.R @@ -0,0 +1 @@ +kwee@tokyo.3135738:1715326131 \ No newline at end of file diff --git a/components/modules/WelcomeBoard.R b/components/modules/WelcomeBoard.R index f9ae45985..5e9084877 100644 --- a/components/modules/WelcomeBoard.R +++ b/components/modules/WelcomeBoard.R @@ -99,7 +99,7 @@ WelcomeBoardUI <- function(id) { ), shiny::actionButton( ns("btn_load_data"), - label = "Use my saved data", + label = "Load from library", class = "btn btn-outline-primary welcome-btn" ) )