Skip to content

Commit 5d1631f

Browse files
committed
Merge branch 'master' of github.com:lindsayrutter/bigPint
Version 1.0.3 rebase
2 parents cb8bf99 + 876f1ba commit 5d1631f

File tree

601 files changed

+13919
-77893
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

601 files changed

+13919
-77893
lines changed

.github/workflows/no-response.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Configuration for probot-no-response - https://github.com/probot/no-response
2+
3+
# Number of days of inactivity before an Issue is closed for lack of response
4+
daysUntilClose: 14
5+
# Label requiring a response
6+
responseRequiredLabel: more-information-needed
7+
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
8+
closeComment: >
9+
This issue has been automatically closed because there has been no response
10+
to our request for more information from the original author. With only the
11+
information that is currently in the issue, we don't have enough information
12+
to take action. Please reach out if you have or find the answers we need so
13+
that we can investigate further.

DESCRIPTION

Lines changed: 46 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,56 @@
11
Package: bigPint
2-
Version: 1.3.1
3-
Title: Big multivariate data plotted interactively
4-
Description: Methods for visualizing large multivariate datasets using static and interactive scatterplot matrices, parallel coordinate plots, volcano plots, and litre plots. Includes examples for visualizing RNA-sequencing datasets and differentially expressed genes.
5-
Authors@R: c(person("Lindsay", "Rutter", email = "lindsayannerutter@gmail.com", role = c("aut","cre")),
2+
Version: 1.19.1
3+
Title: BIG multivariate data Plotted INTeractively
4+
Description: Make big data pint-sized. Methods for visualizing large multivariate datasets using static and interactive scatterplot matrices, parallel coordinate plots, volcano plots, and litre plots. Includes examples for visualizing RNA-sequencing datasets and differentially expressed genes.
5+
Authors@R: c(person("Lindsay", "Rutter", email = "bigpintpackage@gmail.com", role = c("aut","cre")),
66
person("Dianne", "Cook", email = "dicook@monash.edu", role = c("aut")))
77
License: GPL-3
88
Depends: R (>= 3.6.0)
9-
Imports: DelayedArray (>= 0.12.2), dplyr (>= 0.7.2), GGally (>= 1.3.2),
10-
ggplot2 (>= 2.2.1), graphics (>= 3.5.0), grDevices (>= 3.5.0),
11-
grid (>= 3.5.0), gridExtra (>= 2.3), hexbin (>= 1.27.1),
12-
Hmisc (>= 4.0.3), htmlwidgets (>= 0.9), methods (>= 3.5.2),
13-
plotly (>= 4.7.1), plyr (>= 1.8.4), RColorBrewer (>= 1.1.2),
14-
reshape (>= 0.8.7), shiny (>= 1.0.5), shinycssloaders (>= 0.2.0),
15-
shinydashboard (>= 0.6.1), stats (>= 3.5.0), stringr (>= 1.3.1),
16-
SummarizedExperiment (>= 1.16.1), tidyr (>= 0.7.0), utils (>= 3.5.0)
9+
biocViews:
10+
Imports:
11+
DelayedArray (>= 0.12.2),
12+
dplyr (>= 0.7.2),
13+
GGally (>= 1.3.2),
14+
ggplot2 (>= 2.2.1),
15+
graphics (>= 3.5.0),
16+
grDevices (>= 3.5.0),
17+
grid (>= 3.5.0),
18+
gridExtra (>= 2.3),
19+
hexbin (>= 1.27.1),
20+
Hmisc (>= 4.0.3),
21+
htmlwidgets (>= 0.9),
22+
methods (>= 3.5.2),
23+
plotly (>= 4.7.1),
24+
plyr (>= 1.8.4),
25+
RColorBrewer (>= 1.1.2),
26+
reshape (>= 0.8.7),
27+
shiny (>= 1.0.5),
28+
shinycssloaders (>= 0.2.0),
29+
shinydashboard (>= 0.6.1),
30+
stats (>= 3.5.0),
31+
stringr (>= 1.3.1),
32+
SummarizedExperiment (>= 1.16.1),
33+
tidyr (>= 0.7.0),
34+
utils (>= 3.5.0)
1735
VignetteBuilder: knitr
18-
Suggests: BiocGenerics (>= 0.29.1), data.table (>= 1.11.8), EDASeq (>=
19-
2.14.0), edgeR (>= 3.22.2), gtools (>= 3.5.0), knitr (>= 1.13),
20-
matrixStats (>= 0.53.1), rmarkdown (>= 1.10), roxygen2 (>=
21-
3.0.0), RUnit (>= 0.4.32), tibble (>= 1.4.2),
22-
biocViews: Clustering, DataImport, DifferentialExpression,
23-
GeneExpression, MultipleComparison, Normalization,
24-
Preprocessing, QualityControl, RNASeq, Sequencing, Software,
25-
Transcription, Visualization
26-
RoxygenNote: 7.0.2
36+
Suggests:
37+
BiocStyle (>= 3.18),
38+
BiocGenerics (>= 0.29.1),
39+
data.table (>= 1.11.8),
40+
EDASeq (>= 2.14.0),
41+
edgeR (>= 3.22.2),
42+
gtools (>= 3.5.0),
43+
knitr (>= 1.13),
44+
matrixStats (>= 0.53.1),
45+
rmarkdown (>= 1.10),
46+
roxygen2 (>= 3.0.0),
47+
RUnit (>= 0.4.32),
48+
tibble (>= 1.4.2)
49+
RoxygenNote: 7.2.3
2750
BugReports: https://github.com/lindsayrutter/bigPint/issues
2851
URL: https://github.com/lindsayrutter/bigPint
2952
NeedsCompilation: no
3053
Packaged: 2018-11-30 04:06:13 UTC; suzu
54+
LazyData: true
3155
Encoding: UTF-8
56+
PackageStatus: Deprecated
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-78.4 KB
Binary file not shown.

NEWS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## bigPint 1.5.1 (2020-08-23)
2+
plotClusters() function now has option for superimposing pairs or whole data using the showPairs parameter.
3+
4+
## bigPint 1.3.3 (2020-06-15)
5+
[Our software paper](https://doi.org/10.1371/journal.pcbi.1007912) was published in PLoS Computational Biology. In this paper, we describe how our package created independent layers of interactivity using Plotly in R. Pseudocode and source code are provided. Computational scientists can leverage our open-source code to expand upon our layered interactive technology and apply it in new ways toward other computational biology tasks.
6+
7+
## bigPint 1.3.2 (2020-03-04)
8+
Users can now input SummarizedExperiment data type to create any bigPint plot.
9+
110
## bigPint 1.3.2 (2020-03-04)
211
Users can now input SummarizedExperiment data type to create any bigPint plot.
312

R/convertSEPair.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ convertSEPair <- function(dataSE, group1, group2){
3434
setNames(x, sub(".*\\.", "", names(x)))))
3535

3636
oldData <- as.data.frame(assay(dataSE))
37-
keepDataCol <- which(vapply(colnames(oldData), function(x)
37+
keepDataCol <- which(lapply(colnames(oldData), function(x)
3838
strsplit(x, "[.]")[[1]][1]) %in% c(group1, group2))
3939
keepOldData <- oldData[, keepDataCol]
4040

R/helperCadFALSE.R

Lines changed: 45 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
helperCadFALSE <- function(cData, dataMetrics, metricPair, aggMethod, nC,
1+
helperCadFALSE <- function(data, cData, dataMetrics, metricPair, aggMethod, nC,
22
threshVar, threshVal, verbose, vxAxis, saveFile, boxDat, xAxisLabel,
33
yAxisLabel, lineAlpha, lineSize, plotName, outDir, colList) {
4+
5+
# Convert to data.frame in case tibble
6+
data <- as.data.frame(data)
7+
dataMetrics <- as.data.frame(dataMetrics)
8+
49
dendo = cData
510
rownames(dendo) = NULL
611
d = suppressWarnings(dist(as.matrix(dendo)))
@@ -21,8 +26,8 @@ yAxisLabel, lineAlpha, lineSize, plotName, outDir, colList) {
2126
xNames),]
2227
sigID = metricFDR[which(metricFDR[[threshVar]]<=threshVal),]$ID
2328
xSig = x[which(xNames %in% sigID),]
24-
xSigNames = rownames(xSig)
25-
nGenes = nrow(xSig)
29+
xSigNames = xNames
30+
nGenes = nrow(xSig)
2631
}
2732
else{
2833
xSig = x
@@ -31,34 +36,47 @@ yAxisLabel, lineAlpha, lineSize, plotName, outDir, colList) {
3136
}
3237

3338
if (verbose==TRUE){
34-
IDs = as.character(xNames)
35-
saveRDS(IDs, file = paste(outDir, "/", plotName, "_", nC, "_",
39+
IDs = as.character(sigID)
40+
saveRDS(IDs, file = paste(outDir, "/", plotName, "_", nC, "_",
3641
j, ".rds", sep=""))
3742
}
3843

3944
xSig$ID = xSigNames
40-
lastTwoIndices = c(ncol(xSig) -1, ncol(xSig))
41-
xSig = xSig[, -lastTwoIndices]
42-
43-
pcpDat <- melt(xSig, id.vars="ID")
44-
colnames(pcpDat) <- c("ID", "Sample", "Count")
45-
pcpDat$Sample <- as.character(pcpDat$Sample)
46-
pcpDat$ID <- as.factor(pcpDat$ID)
47-
48-
p <- ggplot(boxDat, aes_string(x = 'Sample', y = 'Count')) +
49-
geom_boxplot() + geom_line(data=pcpDat, aes_string(x = 'Sample',
50-
y = 'Count', group = 'ID'), colour = colList[j], alpha=lineAlpha,
51-
size = lineSize) + ylab(yAxisLabel) + xlab(xAxisLabel) +
52-
ggtitle(paste("Cluster ", j, " Genes (n=", format(nGenes,
53-
big.mark=",", scientific=FALSE), ")",sep="")) +
54-
theme(plot.title = element_text(hjust = 0.5, size=14,
55-
face="plain"), axis.text=element_text(size=11),
56-
axis.title=element_text(size=14))
57-
45+
if (nrow(xSig)>0){
46+
lastTwoIndices = c(ncol(xSig) -1, ncol(xSig))
47+
xSig = xSig[, -lastTwoIndices]
48+
############################## here!
49+
nonPairIndex = which(data$ID %in% xSig$ID)
50+
fullDat = data[nonPairIndex,]
51+
fullDat$ID = as.factor(fullDat$ID)
52+
53+
pcpDat <- melt(fullDat, id.vars="ID")
54+
colnames(pcpDat) <- c("ID", "Sample", "Count")
55+
pcpDat$Sample <- as.character(pcpDat$Sample)
56+
pcpDat$ID <- as.factor(pcpDat$ID)
57+
58+
p <- ggplot(boxDat, aes_string(x = 'Sample', y = 'Count')) +
59+
geom_boxplot() + geom_line(data=pcpDat,
60+
aes_string(x = 'Sample', y = 'Count', group = 'ID'),
61+
colour = colList[j], alpha=lineAlpha, size = lineSize) +
62+
ylab(yAxisLabel) + xlab(xAxisLabel) + ggtitle(paste("Cluster ", j,
63+
" Genes (n=", format(nGenes, big.mark=",", scientific=FALSE), ")",
64+
sep="")) + theme(plot.title = element_text(hjust = 0.5, size=14,
65+
face="plain"), axis.text=element_text(size=11),
66+
axis.title=element_text(size=14))
67+
}
68+
else{
69+
p <- ggplot(boxDat, aes_string(x = 'Sample', y = 'Count')) +
70+
geom_boxplot() + ylab(yAxisLabel) + xlab(xAxisLabel) +
71+
ggtitle(paste("Cluster ", j, " Genes (n=", format(nGenes,
72+
big.mark = ",", scientific=FALSE), ")", sep="")) +
73+
theme(plot.title = element_text(hjust = 0.5, size=14,
74+
face="plain"), axis.text=element_text(size=11),
75+
axis.title=element_text(size=14))
76+
}
5877
if (vxAxis == TRUE){
5978
p <- p + theme(axis.text.x = element_text(angle=90, hjust=1))
6079
}
61-
6280
if (verbose==TRUE){
6381
fileName = paste(outDir, "/", plotName, "_", nC, "_", j, ".jpg",
6482
sep="")
@@ -68,6 +86,7 @@ yAxisLabel, lineAlpha, lineSize, plotName, outDir, colList) {
6886
}
6987
p
7088
})
89+
7190
p = arrangeGrob(grobs=plot_clusters, ncol=2)
7291

7392
if (saveFile == TRUE || verbose == TRUE){
@@ -77,4 +96,5 @@ yAxisLabel, lineAlpha, lineSize, plotName, outDir, colList) {
7796
invisible(dev.off())
7897
}
7998
return(p)
80-
}
99+
}
100+

bigPint/R/helperCadFALSE.R renamed to R/helperCadFALSEPair.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
helperCadFALSE <- function(cData, dataMetrics, metricPair, aggMethod, nC,
1+
helperCadFALSEPair <- function(cData, dataMetrics, metricPair, aggMethod, nC,
22
threshVar, threshVal, verbose, vxAxis, saveFile, boxDat, xAxisLabel,
33
yAxisLabel, lineAlpha, lineSize, plotName, outDir, colList) {
4+
5+
# Convert to data.frame in case tibble
6+
dataMetrics <- as.data.frame(dataMetrics)
7+
48
dendo = cData
59
rownames(dendo) = NULL
610
d = suppressWarnings(dist(as.matrix(dendo)))

R/helperCadTRUE.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
helperCadTRUE <- function(data, dataMetrics, metricPair, aggMethod, nC,
22
threshVar, threshVal, verbose, vxAxis, saveFile, boxDat, xAxisLabel,
33
yAxisLabel, lineAlpha, lineSize, plotName, outDir, colList) {
4+
5+
# Convert to data.frame in case tibble
6+
data <- as.data.frame(data)
7+
dataMetrics <- as.data.frame(dataMetrics)
8+
49
dendo = data
510
rownames(dendo) = NULL
611
d = suppressWarnings(dist(as.matrix(dendo)))

bigPint/R/helperCadTRUE.R renamed to R/helperCadTRUEPair.R

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
helperCadTRUE <- function(data, dataMetrics, metricPair, aggMethod, nC,
1+
helperCadTRUEPair <- function(data, dataMetrics, metricPair, aggMethod, nC,
22
threshVar, threshVal, verbose, vxAxis, saveFile, boxDat, xAxisLabel,
33
yAxisLabel, lineAlpha, lineSize, plotName, outDir, colList) {
4+
5+
# Convert to data.frame in case tibble
6+
data <- as.data.frame(data)
7+
dataMetrics <- as.data.frame(dataMetrics)
8+
49
dendo = data
510
rownames(dendo) = NULL
611
d = suppressWarnings(dist(as.matrix(dendo)))
712
hC = hclust(d, method=aggMethod)
813
k = cutree(hC, k=nC)
9-
14+
1015
seqVec = seq(nC)
1116
plot_clusters = lapply(seq_along(seqVec), function(j){
1217
i = rev(order(table(k)))[j]
@@ -38,29 +43,46 @@ yAxisLabel, lineAlpha, lineSize, plotName, outDir, colList) {
3843
if (nrow(xSig)>0){
3944
lastTwoIndices = c(ncol(xSig) -1, ncol(xSig))
4045
xSig = xSig[, -lastTwoIndices]
46+
47+
#New code to remove extra treatment groups
48+
colNames = levels(boxDat$Sample)
49+
seqVec <- seq_along(colNames)
50+
colGroups <- vapply(seqVec, function(i){
51+
strsplit(colNames[i],"[.]")[[1]][1]
52+
}, character(1))
53+
uColGroups <- unique(colGroups)
54+
55+
xCols = colnames(xSig[,-1])
56+
seqVec <- seq_along(xCols)
57+
colGroupsXSig <- vapply(seqVec, function(i){
58+
strsplit(xCols[i],"[.]")[[1]][1]
59+
}, character(1))
60+
keepCol = which(colGroupsXSig %in% uColGroups) +1
61+
xSig = xSig[,c(1,keepCol)]
62+
4163
pcpDat <- melt(xSig, id.vars="ID")
4264
colnames(pcpDat) <- c("ID", "Sample", "Count")
4365
pcpDat$Sample <- as.character(pcpDat$Sample)
4466
pcpDat$ID <- as.factor(pcpDat$ID)
4567

4668
p <- ggplot(boxDat, aes_string(x = 'Sample', y = 'Count')) +
47-
geom_boxplot() + geom_line(data=pcpDat,
48-
aes_string(x = 'Sample', y = 'Count', group = 'ID'),
49-
colour = colList[j], alpha=lineAlpha, size = lineSize) +
50-
ylab(yAxisLabel) + xlab(xAxisLabel) + ggtitle(paste("Cluster ", j,
51-
" Genes (n=", format(nGenes, big.mark=",", scientific=FALSE), ")",
52-
sep="")) + theme(plot.title = element_text(hjust = 0.5, size=14,
53-
face="plain"), axis.text=element_text(size=11),
54-
axis.title=element_text(size=14))
69+
geom_boxplot() + geom_line(data=pcpDat,
70+
aes_string(x = 'Sample', y = 'Count', group = 'ID'),
71+
colour = colList[j], alpha=lineAlpha, size = lineSize) +
72+
ylab(yAxisLabel) + xlab(xAxisLabel) + ggtitle(paste("Cluster ", j,
73+
" Genes (n=", format(nGenes, big.mark=",", scientific=FALSE), ")",
74+
sep="")) + theme(plot.title = element_text(hjust = 0.5, size=14,
75+
face="plain"), axis.text=element_text(size=11),
76+
axis.title=element_text(size=14))
5577
}
5678
else{
5779
p <- ggplot(boxDat, aes_string(x = 'Sample', y = 'Count')) +
58-
geom_boxplot() + ylab(yAxisLabel) + xlab(xAxisLabel) +
59-
ggtitle(paste("Cluster ", j, " Genes (n=", format(nGenes,
60-
big.mark = ",", scientific=FALSE), ")", sep="")) +
61-
theme(plot.title = element_text(hjust = 0.5, size=14,
62-
face="plain"), axis.text=element_text(size=11),
63-
axis.title=element_text(size=14))
80+
geom_boxplot() + ylab(yAxisLabel) + xlab(xAxisLabel) +
81+
ggtitle(paste("Cluster ", j, " Genes (n=", format(nGenes,
82+
big.mark = ",", scientific=FALSE), ")", sep="")) +
83+
theme(plot.title = element_text(hjust = 0.5, size=14,
84+
face="plain"), axis.text=element_text(size=11),
85+
axis.title=element_text(size=14))
6486
}
6587
if (vxAxis == TRUE){
6688
p <- p + theme(axis.text.x = element_text(angle=90, hjust=1))
@@ -74,9 +96,9 @@ yAxisLabel, lineAlpha, lineSize, plotName, outDir, colList) {
7496
}
7597
p
7698
})
77-
99+
78100
p = arrangeGrob(grobs=plot_clusters, ncol=2)
79-
101+
80102
if (saveFile == TRUE || verbose == TRUE){
81103
fileName = paste(outDir, "/", plotName, "_", nC, ".jpg", sep="")
82104
jpeg(fileName)

R/helperTestData.R

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
helperTestData <- function(data){
2-
2+
33
colNames = colnames(data[,-1])
44
seqVec <- seq_along(colNames)
55

66
generalMessage = "For more information about formatting the data
7-
object, see https://lrutter.github.io/bigPint/articles/data.html"
7+
object, see https://lindsayrutter.github.io/bigPint/articles/data.html"
88

99
if (!methods::is(data, "data.frame")){
1010
stop(paste0("Data object must be of class 'data.frame'. If you are
@@ -13,6 +13,9 @@ if (!methods::is(data, "data.frame")){
1313
generalMessage))
1414
}
1515

16+
# Convert to data.frame in case tibble
17+
data <- as.data.frame(data)
18+
1619
logicClass = vapply(data[,-1], function(x) methods::is(x, "numeric") ||
1720
methods::is(x, "integer"), logical(length=1))
1821

R/helperTestDataMetrics.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
#' @importFrom methods is
21
helperTestDataMetrics <- function(data, dataMetrics, threshVar){
32

3+
# Convert to data.frame in case tibble
4+
data <- as.data.frame(data)
5+
46
colNames = colnames(data[,-1])
57
seqVec <- seq_along(colNames)
68

79
generalMessage = "For more information about formatting the dataMetrics
8-
object, see https://lrutter.github.io/bigPint/articles/dataMetrics.html"
10+
object, see https://lindsayrutter.github.io/bigPint/articles/dataMetrics.html"
911

1012
if (!methods::is(dataMetrics, "list")){
1113
stop(paste0("Data metrics object must be of class 'list'. ",

R/helperTestDataMetricsLitreApp.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
helperTestDataMetricsLitreApp <- function(data, dataMetrics){
33

44
generalMessage = "For more information about formatting the dataMetrics
5-
object, see https://lrutter.github.io/bigPint/articles/dataMetrics.html"
5+
object, see https://lindsayrutter.github.io/bigPint/articles/dataMetrics.html"
66

77
colNames = colnames(data[,-1])
88
seqVec <- seq_along(colNames)

R/helperTestDataMetricsVolcano.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ colNames = colnames(data[,-1])
66
seqVec <- seq_along(colNames)
77

88
generalMessage = "For more information about formatting the dataMetrics
9-
objects, see https://lrutter.github.io/bigPint/articles/dataMetrics.html.
9+
objects, see https://lindsayrutter.github.io/bigPint/articles/dataMetrics.html.
1010
Note that volcano plots require that each element in the dataMetrics object
1111
has additional two columns, a PValue column and a logFC column."
1212

0 commit comments

Comments
 (0)