Skip to content

Commit

Permalink
merge dev and master
Browse files Browse the repository at this point in the history
  • Loading branch information
RubD committed Oct 10, 2020
2 parents f8b6d5b + 8be522d commit 627dbf0
Show file tree
Hide file tree
Showing 429 changed files with 17,302 additions and 15,391 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
^_pkgdown\.yml$
^docs$
^pkgdown$
.Rbuildignore.save
43 changes: 28 additions & 15 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,39 +1,41 @@
Package: Giotto
Title: Spatial single-cell transcriptomics toolbox
Version: 0.3.6.9000
Version: 0.3.6.9058
Authors@R: c(
person("Ruben", "Dries", email = "[email protected]",
role = c("aut", "cre")),
person("Huipeng", "Li", email = "[email protected]",
role = c("aut")),
person("Qian", "Zhu", email = "[email protected]",
role = c("aut")),
person("Huipeng", "Li", email = "[email protected]",
role = c("aut")),
person("Rui", "Dong", email = "[email protected]",
role = c("aut")),
person("Guo-Cheng", "Yuan", email = "[email protected]",
role = c("aut"))
)
Description: Toolbox to process, analyze and visualize spatial single-cell expression data
Description: Toolbox to process, analyze and visualize spatial single-cell expression data.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
URL: https://rubd.github.io/Giotto/, https://github.com/RubD/Giotto
BugReports: https://github.com/RubD/Giotto/issues
RoxygenNote: 7.1.1
Depends:
base (>= 3.5.1),
utils (>= 3.5.1),
R (>= 3.5.1)
base (>= 3.5.0),
utils (>= 3.5.0),
R (>= 3.5.0)
Imports:
data.table (>= 1.12.2),
deldir,
dendextend (>= 1.13.0),
ggplot2 (>= 3.1.1),
Matrix,
magick,
matrixStats (>= 0.55.0),
methods,
uwot (>= 0.0.0.9010),
cowplot (>= 0.9.4),
ClusterR,
grDevices,
graphics,
RColorBrewer (>= 1.1-2),
Expand Down Expand Up @@ -61,19 +63,30 @@ Imports:
Rtsne (>= 0.15),
rlang (>= 0.4.3),
R.utils,
fitdistrplus,
fitdistrplus
Suggests:
Biobase,
biomaRt,
circlize,
FactoMineR,
factoextra,
geometry,
ggforce,
ggrepel,
htmlwidgets,
jackstraw,
knitr,
rmarkdown,
MAST,
scran (>= 1.10.1),
multinet (>= 3.0.2),
png,
FactoMineR,
quadprog,
rmarkdown,
RTriangle (>= 1.6-0.10),
scran (>= 1.10.1),
SingleCellExperiment,
SPARK,
tiff,
biomaRt,
trendsceek,
multinet (>= 3.0.2),
RTriangle (>= 1.6-0.10)
trendsceek
biocViews:
VignetteBuilder: knitr
LinkingTo:
Expand Down
Binary file removed Giotto_0.3.5.pdf
Binary file not shown.
Binary file removed Giotto_0.3.6.9000.pdf
Binary file not shown.
71 changes: 34 additions & 37 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Generated by roxygen2: do not edit by hand

export("%>%")
export(FSV_show)
export(PAGEEnrich)
export(addCellIntMetadata)
export(addCellMetadata)
Expand All @@ -15,11 +14,13 @@ export(addHMRF)
export(addNetworkLayout)
export(addStatistics)
export(adjustGiottoMatrix)
export(all_plots_save_function)
export(anndataToGiotto)
export(annotateGiotto)
export(annotateSpatialGrid)
export(annotateSpatialNetwork)
export(binSpect)
export(binSpectMulti)
export(binSpectSingle)
export(calculateHVG)
export(calculateMetaTable)
export(calculateMetaTableCells)
Expand All @@ -31,16 +32,18 @@ export(cellProximitySpatPlot)
export(cellProximitySpatPlot2D)
export(cellProximitySpatPlot3D)
export(cellProximityVisPlot)
export(cellProximityVisPlot_2D_ggplot)
export(cellProximityVisPlot_2D_plotly)
export(cellProximityVisPlot_3D_plotly)
export(changeGiottoInstructions)
export(changeImageBg)
export(checkGiottoEnvironment)
export(clusterCells)
export(clusterSpatialCorGenes)
export(colMeans_giotto)
export(colSums_giotto)
export(combCCcom)
export(combineCPG)
export(combineCellProximityGenes)
export(combineICG)
export(combineInteractionChangedGenes)
export(combineMetadata)
export(convertEnsemblToGeneSymbol)
export(createCrossSection)
Expand All @@ -50,6 +53,7 @@ export(createGiottoObject)
export(createGiottoVisiumObject)
export(createMetagenes)
export(createNearestNetwork)
export(createSpatialDefaultGrid)
export(createSpatialDelaunayNetwork)
export(createSpatialEnrich)
export(createSpatialGrid)
Expand All @@ -75,27 +79,26 @@ export(doKmeans)
export(doLeidenCluster)
export(doLeidenSubCluster)
export(doLouvainCluster)
export(doLouvainCluster_community)
export(doLouvainCluster_multinet)
export(doLouvainSubCluster)
export(doLouvainSubCluster_community)
export(doLouvainSubCluster_multinet)
export(doRandomWalkCluster)
export(doSNNCluster)
export(estimateImageBg)
export(exportGiottoViewer)
export(exprCellCellcom)
export(extractNearestNetwork)
export(fDataDT)
export(filterCPG)
export(filterCellProximityGenes)
export(filterCombinations)
export(filterDistributions)
export(filterGiotto)
export(filterICG)
export(filterInteractionChangedGenes)
export(findCPG)
export(findCellProximityGenes)
export(findGiniMarkers)
export(findGiniMarkers_one_vs_all)
export(findICG)
export(findInteractionChangedGenes)
export(findMarkers)
export(findMarkers_one_vs_all)
export(findMastMarkers)
Expand All @@ -108,14 +111,17 @@ export(getClusterSimilarity)
export(getDendrogramSplits)
export(getDistinctColors)
export(getGiottoImage)
export(getSpatialDataset)
export(heatmSpatialCorGenes)
export(hyperGeometricEnrich)
export(insertCrossSectionGenePlot3D)
export(insertCrossSectionSpatPlot3D)
export(installGiottoEnvironment)
export(jackstrawPlot)
export(loadHMRF)
export(makeSignMatrixPAGE)
export(makeSignMatrixRank)
export(mean_giotto)
export(mergeClusters)
export(normalizeGiotto)
export(pDataDT)
Expand All @@ -127,6 +133,8 @@ export(plotCombineCCcom)
export(plotCombineCPG)
export(plotCombineCellCellCommunication)
export(plotCombineCellProximityGenes)
export(plotCombineICG)
export(plotCombineInteractionChangedGenes)
export(plotGiottoImage)
export(plotHeatmap)
export(plotICG)
Expand All @@ -146,19 +154,25 @@ export(plotUMAP)
export(plotUMAP_2D)
export(plotUMAP_3D)
export(plot_spat_voronoi_layer_ggplot)
export(plotly_axis_scale_2D)
export(plotly_axis_scale_3D)
export(plotly_grid)
export(plotly_network)
export(print.giotto)
export(rankEnrich)
export(rankSpatialCorGroups)
export(readExprMatrix)
export(readGiottoInstructions)
export(removeCellAnnotation)
export(removeGeneAnnotation)
export(removeGiottoEnvironment)
export(replaceGiottoInstructions)
export(rowMeans_giotto)
export(rowSums_giotto)
export(runDWLSDeconv)
export(runHyperGeometricEnrich)
export(runPAGEEnrich)
export(runPAGEEnrich_OLD)
export(runPCA)
export(runPatternSimulation)
export(runRankEnrich)
export(runSpatialDeconv)
export(runSpatialEnrich)
export(runUMAP)
export(runtSNE)
export(screePlot)
Expand All @@ -178,6 +192,9 @@ export(showSaveParameters)
export(showSpatialCorGenes)
export(signPCA)
export(silhouetteRank)
export(silhouetteRankTest)
export(simulateOneGenePatternGiottoObject)
export(spark)
export(spatCellCellcom)
export(spatCellPlot)
export(spatCellPlot2D)
Expand Down Expand Up @@ -206,39 +223,19 @@ export(stitchTileCoordinates)
export(subClusterCells)
export(subsetGiotto)
export(subsetGiottoLocs)
export(t_giotto)
export(trendSceek)
export(updateGiottoImage)
export(viewHMRFresults)
export(viewHMRFresults2D)
export(viewHMRFresults3D)
export(violinPlot)
export(visDimGenePlot)
export(visDimGenePlot_2D_ggplot)
export(visDimGenePlot_3D_plotly)
export(visDimPlot)
export(visDimPlot_2D_ggplot)
export(visDimPlot_2D_plotly)
export(visDimPlot_3D_plotly)
export(visForceLayoutPlot)
export(visGenePlot)
export(visGenePlot_2D_ggplot)
export(visGenePlot_3D_plotly)
export(visPlot)
export(visPlot_2D_ggplot)
export(visPlot_2D_plotly)
export(visPlot_3D_plotly)
export(visSpatDimGenePlot)
export(visSpatDimGenePlot_2D)
export(visSpatDimGenePlot_3D)
export(visSpatDimPlot)
export(visSpatDimPlot_2D)
export(visSpatDimPlot_3D)
export(writeHMRFresults)
exportClasses(giotto)
exportMethods(show)
import(data.table)
import(ggplot2)
import(utils)
importFrom(Rcpp,sourceCpp)
importFrom(magrittr,"%>%")
importFrom(methods,new)
useDynLib(Giotto)
41 changes: 32 additions & 9 deletions R/NN_network.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@
#'
#' @export
#' @examples
#' createNearestNetwork(gobject)
#'
#' data(mini_giotto_single_cell)
#'
#' mini_giotto_single_cell <- createNearestNetwork(gobject = mini_giotto_single_cell,
#' dimensions_to_use = 1:3, k = 3)
#'
createNearestNetwork <- function(gobject,
type = c('sNN', 'kNN'),
dim_reduction_to_use = 'pca',
Expand Down Expand Up @@ -211,8 +216,6 @@ createNearestNetwork <- function(gobject,
#' Currently only the force-directed graph layout "drl", see \code{\link[igraph]{layout_with_drl}},
#' is implemented. This provides an alternative to tSNE or UMAP based visualizations.
#' @export
#' @examples
#' addNetworkLayout(gobject)
addNetworkLayout = function(gobject,
nn_network_to_use = "sNN",
network_name = "sNN.pca",
Expand Down Expand Up @@ -273,9 +276,13 @@ addNetworkLayout = function(gobject,
#' @name nnDT_to_kNN
#' @description Convert a nearest network data.table to a kNN object
#' @param nnDT nearest neighbor network in data.table format
#' @keywords internal
#' @return kNN object
nnDT_to_kNN <- function(nnDT) {

# data.table variable
from = NULL

k = unique(table(nnDT$from))

if(length(k) > 1) {
Expand All @@ -300,18 +307,16 @@ nnDT_to_kNN <- function(nnDT) {



#' @title extractNearestNetwork
#' @name extractNearestNetwork
#' @title select_NearestNetwork
#' @name select_NearestNetwork
#' @description Extracts a NN-network from a Giotto object
#' @param gobject giotto object
#' @param nn_network_to_use kNN or sNN
#' @param network_name name of NN network to be used
#' @param output return a igraph or data.table object
#' @return igraph or data.table object
#' @export
#' @examples
#' extractNearestNetwork(gobject)
extractNearestNetwork = function(gobject,
#' @keywords internal
select_NearestNetwork = function(gobject,
nn_network_to_use = 'sNN',
network_name = 'sNN.pca',
output = c('igraph', 'data.table')) {
Expand Down Expand Up @@ -340,3 +345,21 @@ extractNearestNetwork = function(gobject,

}


#' @title extractNearestNetwork
#' @name extractNearestNetwork
#' @description Function to calculate gene signature enrichment scores per spatial position using a rank based approach.
#' @inheritDotParams select_NearestNetwork
#' @seealso \code{\link{select_NearestNetwork}}
#' @keywords internal
extractNearestNetwork = function(...) {

.Deprecated(new = "select_NearestNetwork")

select_NearestNetwork(...)

}




Loading

0 comments on commit 627dbf0

Please sign in to comment.