Browse code

Bugs fixes in Scanpy

npervaiz authored on 02/01/2023 19:12:26
Showing 1 changed files
... ...
@@ -69,10 +69,10 @@ plotScanpyMarkerGenesMatrixPlot
69 69
 data(scExample, package = "singleCellTK")
70 70
 \dontrun{
71 71
 sce <- runScanpyNormalizeData(sce, useAssay = "counts")
72
+sce <- runScanpyFindHVG(sce, useAssay = "scanpyNormData", method = "seurat")
72 73
 sce <- runScanpyScaleData(sce, useAssay = "scanpyNormData")
73
-sce <- runScanpyFindHVG(sce, useAssay = "scanpyScaledData", method = "seurat")
74
-sce <- runScanpyPCA(sce, useAssay = "scanpyNormData")
75
-sce <- runScanpyFindClusters(sce, useAssay = "counts")
74
+sce <- runScanpyPCA(sce, useAssay = "scanpyScaledData")
75
+sce <- runScanpyFindClusters(sce, useReducedDim = "scanpyPCA")
76 76
 sce <- runScanpyFindMarkers(sce, colDataName = "Scanpy_louvain_1" )
77 77
 plotScanpyMarkerGenesMatrixPlot(sce, groupBy = 'Scanpy_louvain_1')
78 78
 }
Browse code

Minor edits to scanpy functions

npervaiz authored on 22/12/2022 12:16:44
Showing 1 changed files
... ...
@@ -69,6 +69,8 @@ plotScanpyMarkerGenesMatrixPlot
69 69
 data(scExample, package = "singleCellTK")
70 70
 \dontrun{
71 71
 sce <- runScanpyNormalizeData(sce, useAssay = "counts")
72
+sce <- runScanpyScaleData(sce, useAssay = "scanpyNormData")
73
+sce <- runScanpyFindHVG(sce, useAssay = "scanpyScaledData", method = "seurat")
72 74
 sce <- runScanpyPCA(sce, useAssay = "scanpyNormData")
73 75
 sce <- runScanpyFindClusters(sce, useAssay = "counts")
74 76
 sce <- runScanpyFindMarkers(sce, colDataName = "Scanpy_louvain_1" )
Browse code

Bug fixes and documentation

npervaiz authored on 02/11/2022 12:13:26
Showing 1 changed files
... ...
@@ -71,7 +71,7 @@ data(scExample, package = "singleCellTK")
71 71
 sce <- runScanpyNormalizeData(sce, useAssay = "counts")
72 72
 sce <- runScanpyPCA(sce, useAssay = "scanpyNormData")
73 73
 sce <- runScanpyFindClusters(sce, useAssay = "counts")
74
-sce <- runScanpyFindMarkers(sce, colDataName = "Scanpy_louvain" )
75
-plotScanpyMarkerGenesMatrixPlot(sce, groupBy = 'Scanpy_louvain')
74
+sce <- runScanpyFindMarkers(sce, colDataName = "Scanpy_louvain_1" )
75
+plotScanpyMarkerGenesMatrixPlot(sce, groupBy = 'Scanpy_louvain_1')
76 76
 }
77 77
 }
Browse code

Scanpy wrapper functions

npervaiz authored on 12/10/2022 14:09:33
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,77 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/scanpyFunctions.R
3
+\name{plotScanpyMarkerGenesMatrixPlot}
4
+\alias{plotScanpyMarkerGenesMatrixPlot}
5
+\title{plotScanpyMarkerGenesMatrixPlot}
6
+\usage{
7
+plotScanpyMarkerGenesMatrixPlot(
8
+  inSCE,
9
+  groups = NULL,
10
+  nGenes = 10,
11
+  groupBy,
12
+  log2fcThreshold = NULL,
13
+  parameters = "logfoldchanges",
14
+  standardScale = "var",
15
+  features = NULL,
16
+  title = "",
17
+  vmin = NULL,
18
+  vmax = NULL,
19
+  colorBarTitle = "log fold change"
20
+)
21
+}
22
+\arguments{
23
+\item{inSCE}{Input \code{SingleCellExperiment} object.}
24
+
25
+\item{groups}{The groups for which to show the gene ranking. Default \code{NULL}
26
+means that all groups will be considered.}
27
+
28
+\item{nGenes}{Number of genes to show. Default \code{10}}
29
+
30
+\item{groupBy}{The key of the observation grouping to consider. By default, 
31
+the groupby is chosen from the rank genes groups parameter.}
32
+
33
+\item{log2fcThreshold}{Only output DEGs with the absolute values of log2FC
34
+larger than this value. Default \code{NULL}.}
35
+
36
+\item{parameters}{The options for marker genes results to plot are: 
37
+‘scores’, ‘logfoldchanges’, ‘pvals’, ‘pvals_adj’, ‘log10_pvals’, ‘log10_pvals_adj’.
38
+If NULL provided then it uses mean gene value to plot.}
39
+
40
+\item{standardScale}{Whether or not to standardize the given dimension 
41
+between 0 and 1, meaning for each variable or group, subtract the minimum and 
42
+divide each by its maximum. Default \code{NULL} means that it doesn't perform
43
+any scaling.}
44
+
45
+\item{features}{Genes to plot. Sometimes is useful to pass a specific list of
46
+var names (e.g. genes) to check their fold changes or p-values, instead of 
47
+the top/bottom genes. The var_names could be a dictionary or a list. 
48
+Default \code{NULL}}
49
+
50
+\item{title}{Provide title for the figure.}
51
+
52
+\item{vmin}{The value representing the lower limit of the color scale. 
53
+Values smaller than vmin are plotted with the same color as vmin. 
54
+Default \code{NULL}}
55
+
56
+\item{vmax}{The value representing the upper limit of the color scale. 
57
+Values larger than vmax are plotted with the same color as vmax. 
58
+Default \code{NULL}}
59
+
60
+\item{colorBarTitle}{Title for the color bar.}
61
+}
62
+\value{
63
+plot object
64
+}
65
+\description{
66
+plotScanpyMarkerGenesMatrixPlot
67
+}
68
+\examples{
69
+data(scExample, package = "singleCellTK")
70
+\dontrun{
71
+sce <- runScanpyNormalizeData(sce, useAssay = "counts")
72
+sce <- runScanpyPCA(sce, useAssay = "scanpyNormData")
73
+sce <- runScanpyFindClusters(sce, useAssay = "counts")
74
+sce <- runScanpyFindMarkers(sce, colDataName = "Scanpy_louvain" )
75
+plotScanpyMarkerGenesMatrixPlot(sce, groupBy = 'Scanpy_louvain')
76
+}
77
+}