Skip to content

Commit

Permalink
Graphical analysis changes
Browse files Browse the repository at this point in the history
  • Loading branch information
robalexclark committed Dec 9, 2021
1 parent 39fff86 commit f19fc72
Show file tree
Hide file tree
Showing 9 changed files with 128 additions and 197 deletions.
177 changes: 16 additions & 161 deletions SilveR/Scripts/Common_Functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -700,26 +700,7 @@ NONCAT_SCAT <- function(typez) {
} else {
g10 <- g9
}

if (XLimLow != "NULL" && XLimHigh != "NULL" && YLimLow == "NULL" && YLimHigh == "NULL") {
g11 <- g10 + coord_cartesian(xlim=c(XLimLow, XLimHigh))
} else {
g11 <- g10
}

if (XLimLow == "NULL" && XLimHigh == "NULL" && YLimLow != "NULL" && YLimHigh != "NULL") {
g12 <- g11 + coord_cartesian(ylim=c(YLimLow, YLimHigh))
} else {
g12 <- g11
}

if (XLimLow != "NULL" && XLimHigh != "NULL" && YLimLow != "NULL" && YLimHigh != "NULL") {
g13 <- g12 + coord_cartesian(xlim=c(XLimLow, XLimHigh), ylim=c(YLimLow, YLimHigh))
} else {
g13 <- g12
}

suppressWarnings(print(g13))
suppressWarnings(print(g10))
}


Expand Down Expand Up @@ -750,26 +731,7 @@ ONECATSEP_SCAT <- function() {
} else {
g3 <- g2
}

if (XLimLow != "NULL" && XLimHigh != "NULL" && YLimLow == "NULL" && YLimHigh == "NULL") {
g4 <- g3 + coord_cartesian(xlim=c(XLimLow, XLimHigh))
} else {
g4 <- g3
}

if (XLimLow == "NULL" && XLimHigh == "NULL" && YLimLow != "NULL" && YLimHigh != "NULL") {
g5 <- g4 + coord_cartesian(ylim=c(YLimLow, YLimHigh))
} else {
g5 <- g4
}

if (XLimLow != "NULL" && XLimHigh != "NULL" && YLimLow != "NULL" && YLimHigh != "NULL") {
g6 <- g5 + coord_cartesian(xlim=c(XLimLow, XLimHigh), ylim=c(YLimLow, YLimHigh))
} else {
g6 <- g5
}

suppressWarnings(print(g6))
suppressWarnings(print(g3))
}

TWOCATSEP_SCAT <- function() {
Expand Down Expand Up @@ -798,24 +760,7 @@ TWOCATSEP_SCAT <- function() {
} else {
g3 <- g2
}
if (XLimLow != "NULL" && XLimHigh != "NULL" && YLimLow == "NULL" && YLimHigh == "NULL") {
g4 <- g3 + coord_cartesian(xlim=c(XLimLow, XLimHigh))
} else {
g4 <- g3
}

if (XLimLow == "NULL" && XLimHigh == "NULL" && YLimLow != "NULL" && YLimHigh != "NULL") {
g5 <- g4 + coord_cartesian(ylim=c(YLimLow, YLimHigh))
} else {
g5 <- g4
}

if (XLimLow != "NULL" && XLimHigh != "NULL" && YLimLow != "NULL" && YLimHigh != "NULL") {
g6 <- g5 + coord_cartesian(xlim=c(XLimLow, XLimHigh), ylim=c(YLimLow, YLimHigh))
} else {
g6 <- g5
}
suppressWarnings(print(g6))
suppressWarnings(print(g3))
}

OVERLAID_SCAT <- function() {
Expand Down Expand Up @@ -852,25 +797,7 @@ OVERLAID_SCAT <- function() {
} else {
g4 <- g3
}

if (XLimLow != "NULL" && XLimHigh != "NULL" && YLimLow == "NULL" && YLimHigh == "NULL") {
g5 <- g4 + coord_cartesian(xlim=c(XLimLow, XLimHigh))
} else {
g5 <- g4
}

if (XLimLow == "NULL" && XLimHigh == "NULL" && YLimLow != "NULL" && YLimHigh != "NULL") {
g6 <- g5 + coord_cartesian(ylim=c(YLimLow, YLimHigh))
} else {
g6 <- g5
}

if (XLimLow != "NULL" && XLimHigh != "NULL" && YLimLow != "NULL" && YLimHigh != "NULL") {
g7 <- g6 + coord_cartesian(xlim=c(XLimLow, XLimHigh), ylim=c(YLimLow, YLimHigh))
} else {
g7 <- g6
}
suppressWarnings(print(g7))
suppressWarnings(print(g4))
}

#===================================================================================================================
Expand Down Expand Up @@ -929,13 +856,7 @@ NONCAT_SEM <- function() {
} else {
g5 <- g4
}

if (YLimLow != "NULL" && YLimHigh != "NULL") {
g6 <- g5 + coord_cartesian(ylim=c(YLimLow, YLimHigh))
} else {
g6 <- g5
}
suppressWarnings(print(g6))
suppressWarnings(print(g5))
}


Expand Down Expand Up @@ -995,13 +916,7 @@ ONECATSEP_SEM <- function() {
} else {
g5 <- g4
}

if (YLimLow != "NULL" && YLimHigh != "NULL") {
g6 <- g5 + coord_cartesian(ylim=c(YLimLow, YLimHigh))
} else {
g6 <- g5
}
suppressWarnings(print(g6))
suppressWarnings(print(g5))
}


Expand Down Expand Up @@ -1061,13 +976,7 @@ TWOCATSEP_SEM <- function() {
} else {
g5 <- g4
}

if (YLimLow != "NULL" && YLimHigh != "NULL") {
g6 <- g5 + coord_cartesian(ylim=c(YLimLow, YLimHigh))
} else {
g6 <- g5
}
suppressWarnings(print(g6))
suppressWarnings(print(g5))
}


Expand Down Expand Up @@ -1135,13 +1044,7 @@ OVERLAID_SEM <- function() {
} else {
g5 <- g4
}

if (YLimLow != "NULL" && YLimHigh != "NULL") {
g6 <- g5 + coord_cartesian(ylim=c(YLimLow, YLimHigh))
} else {
g6 <- g5
}
suppressWarnings(print(g6))
suppressWarnings(print(g5))
}

#===================================================================================================================
Expand Down Expand Up @@ -1171,13 +1074,7 @@ NONCAT_CPP <- function() {
} else {
g2 <- g1
}

if (YLimLow != "NULL" && YLimHigh != "NULL") {
g3 <- g2 + coord_cartesian(ylim=c(YLimLow, YLimHigh))
} else {
g3 <- g2
}
suppressWarnings(print(g3))
suppressWarnings(print(g2))
}


Expand Down Expand Up @@ -1205,13 +1102,7 @@ ONECATSEP_CPP <- function() {
} else {
g2 <- g1
}

if (YLimLow != "NULL" && YLimHigh != "NULL") {
g3 <- g2 + coord_cartesian(ylim=c(YLimLow, YLimHigh))
} else {
g3 <- g2
}
suppressWarnings(print(g3))
suppressWarnings(print(g2))
}


Expand Down Expand Up @@ -1239,13 +1130,7 @@ TWOCATSEP_CPP <- function() {
} else {
g2 <- g1
}

if (YLimLow != "NULL" && YLimHigh != "NULL") {
g3 <- g2 + coord_cartesian(ylim=c(YLimLow, YLimHigh))
} else {
g3 <- g2
}
suppressWarnings(print(g3))
suppressWarnings(print(g2))
}


Expand All @@ -1266,13 +1151,7 @@ OVERLAID_CPP <- function() {
} else {
g1 <- g
}

if (YLimLow != "NULL" && YLimHigh != "NULL") {
g2 <- g1 + coord_cartesian(ylim=c(YLimLow, YLimHigh))
} else {
g2 <- g1
}
suppressWarnings(print(g2))
suppressWarnings(print(g1))
}

#AUC case profiles plot - addition of extra area call
Expand Down Expand Up @@ -1323,13 +1202,7 @@ NONCAT_BOX <- function() {
} else {
g3 <- g2
}

if (YLimLow != "NULL" && YLimHigh != "NULL") {
g4 <- g3 + coord_cartesian(ylim=c(YLimLow, YLimHigh))
} else {
g4 <- g3
}
suppressWarnings(print(g4))
suppressWarnings(print(g3))
}


Expand Down Expand Up @@ -1367,13 +1240,7 @@ ONECATSEP_BOX <- function() {
} else {
g3 <- g2
}

if (YLimLow != "NULL" && YLimHigh != "NULL") {
g4 <- g3 + coord_cartesian(ylim=c(YLimLow, YLimHigh))
} else {
g4 <- g3
}
suppressWarnings(print(g4))
suppressWarnings(print(g3))
}


Expand Down Expand Up @@ -1412,13 +1279,7 @@ TWOCATSEP_BOX <- function() {
} else {
g3 <- g2
}

if (YLimLow != "NULL" && YLimHigh != "NULL") {
g4 <- g3 + coord_cartesian(ylim=c(YLimLow, YLimHigh))
} else {
g4 <- g3
}
suppressWarnings(print(g4))
suppressWarnings(print(g3))
}


Expand Down Expand Up @@ -1455,13 +1316,7 @@ OVERLAID_BOX <- function() {
} else {
g3 <- g2
}

if (YLimLow != "NULL" && YLimHigh != "NULL") {
g4 <- g3 + coord_cartesian(ylim=c(YLimLow, YLimHigh))
} else {
g4 <- g3
}
suppressWarnings(print(g4))
suppressWarnings(print(g3))
}

#===================================================================================================================
Expand Down
8 changes: 2 additions & 6 deletions SilveR/Scripts/GraphicalAnalysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,13 @@ ShowCaseIDsInLegend <- Args[29]
ReferenceLine <- Args[30]
DisplayLegend <-Args[31]
displaypointSEM<-Args[32]
XLimLow <- Args[33]
XLimHigh<-Args[34]
YLimLow<-Args[35]
YLimHigh<- Args[36]

#source(paste(getwd(),"/Common_Functions.R", sep=""))

#Print args
#if (Diplayargs == "Y"){
if (Diplayargs == "Y"){
print(Args)
#}
}

#===================================================================================================================
#Setup the html file and associated css file
Expand Down
14 changes: 7 additions & 7 deletions SilveR/Scripts/PairedTTestAnalysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -1240,14 +1240,14 @@ if (showComps == "Y") {
if (inte==1) {
inte<-inte+1
if (dimfact ==2) {
add<-paste(add, ": The pairwise comparison is statistically significant at the ", sep="")
add<-paste(add, ": The pairwise comparison is statistically significant at the ", sep="")
} else {
add<-paste(add, ": The following pairwise comparisons are statistically significant at the ", sep="")
add<-paste(add, ": The following pairwise comparisons are statistically significant at the ", sep="")
}
add<-paste(add, 100*(1-sig), sep="")
add<-paste(add, "% level", sep="")
add<-paste(add, "% level ", sep="")
if (dimfact > 2) {
add<-paste(add, " : ", rows[i], sep="")
add<-paste(add, ": ", rows[i], sep="")
}
} else {
inte<-inte+1
Expand Down Expand Up @@ -1276,12 +1276,12 @@ if (showComps == "Y") {
#Analysis description
HTML.title("Analysis description", HR=2, align="left")

add<-c("The data were analysed using ")
add<-c("The data were analysed using an ")

if (dimfact ==2 ) { #&& covariatelist == "NULL") {
add<-paste(add, "an extended paired t-test, with treatment factor ", timeFactor, sep="")
add<-paste(add, "extended paired t-test, with treatment factor ", timeFactor, sep="")
} else {
add<-paste(add, "a repeated measures mixed model approach, with treatment factor ", timeFactor, sep="")
add<-paste(add, "repeated measures mixed model approach, with treatment factor ", timeFactor, sep="")
}

if (blocklist != "NULL" && covariatelist != "NULL") {
Expand Down
6 changes: 3 additions & 3 deletions SilveR/SilveR.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<Version>4.3.0</Version>
<Version>4.4.0</Version>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>SilveR.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
Expand All @@ -15,8 +15,8 @@

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<AssemblyVersion>4.3.0.0</AssemblyVersion>
<FileVersion>4.3.0.0</FileVersion>
<AssemblyVersion>4.4.0.0</AssemblyVersion>
<FileVersion>4.4.0.0</FileVersion>
<Nullable>disable</Nullable>
</PropertyGroup>

Expand Down

0 comments on commit f19fc72

Please sign in to comment.