vignettes/rMD_V2_TwoConditionDemonstrationWithPlots.rmd
rMD_V2_TwoConditionDemonstrationWithPlots.rmd
## Loading One Condition Data
data("twoConditionsExample", package = "NetPhorce")
## ## Identify the Key Columns
identifiedCols <- confirmColumnNames(rawMaxQuant = twoConditionsExample,
positionCol = "Position",
reverseCol = "Reverse",
localizationProbCol = "Localization prob",
potentialContaminationCol = "Potential contaminant",
aminoAcidCol = "Amino acid",
uniqueIDCol = "Protein",
seqWindowIDCol = "Sequence window",
fastaIDCol = "Fasta headers")
## Identify the Intensity Columns with Condition, Time Point and Replication Information
intensityCols <- confirmIntensityColumns(rawMaxQuant = twoConditionsExample,
intensityPattern = "con_time_rep",
verbose = TRUE)
## Process the data based on the identified columns
netPhorceData <- processData(rawMaxQuant = twoConditionsExample,
processedColNames = identifiedCols,
processedIntensity = intensityCols,
minReplication = 3,
minLocalProb = 0.75)
#>
#> Number of Conditions Found: 2. Undergoing a time consuming step, please wait...
#>
#> Complete.
## Validating the Kinase/Phosphatase Information
netPhorceData <- validateKinaseTable(netPhorceData = netPhorceData,
defaultKinaseTable = TRUE,
abbrev = "Ath")
#> Kinase and Phosphatase Matching Table:
## Regulation Validation based on user inputs
netPhorceData <- regulationCheck(netPhorceData = netPhorceData,
upReg = 0.25,
downReg = 0.25,
absMinThreshold = 0.1,
qValueCutOff = 0.05,
verbose = TRUE)
## Network Analysis
netPhorceData <- networkAnalysis(netPhorceData = netPhorceData,
requestPlotData = TRUE)
#>
#> Undergoing a time consuming step, please wait...
plotDistribution(netPhorceData = netPhorceData,
condition = "Col0",
plotly = FALSE)
plotDistribution(netPhorceData = netPhorceData,
condition = "Col0",
plotly = TRUE)
plotHistBox(netPhorceData = netPhorceData,
condition = "tot3",
histogram = TRUE,
boxplot = TRUE)
plotHistBox(netPhorceData = netPhorceData,
condition = "tot3",
histogram = FALSE,
boxplot = TRUE)
plotHistBox(netPhorceData = netPhorceData,
condition = "tot3",
histogram = TRUE,
boxplot = FALSE)
plotPCA(netPhorceData = netPhorceData,
condition = "Col0",
normalized = FALSE,
plotly = FALSE)
plotPCA(netPhorceData = netPhorceData,
condition = "tot3",
normalized = TRUE,
plotly = TRUE)
uniqueIDs <-
findUniqueIDs(netPhorceData = netPhorceData,
uniqueIDList = c(
# Significant Set Examples:
"AT1G13030.1", "AT1G13360.3", "AT1G42550.1",
# Unique/Abscence Set Examples
"AT1G17280.9", "AT1G22310.2", "AT1G23890.2"
),
verbose = TRUE)
#> All 6 provided unqiue IDs are matched to existing Protein IDs
plotUniqueIDsHeatmaps(netPhorceData = netPhorceData,
foundUniqueIDs = uniqueIDs,
heatmapType = "Significant",
minQVal = 0.05,
plotly = TRUE)
#> Joining with `by = join_by(UniqueID)`
#> ..cutHeight not given, setting it to 18.3 ===> 99% of the (truncated) height range in dendro.
#> cutHeight set too low: no merges below the cut.
plotUniqueIDsHeatmaps(netPhorceData = netPhorceData,
foundUniqueIDs = uniqueIDs,
heatmapType = "AbsencePresence",
plotly = FALSE)
#> ..cutHeight not given, setting it to 84.2 ===> 99% of the (truncated) height range in dendro.
#> ..done.
clusterIDs_Sig <-
findClusters(netPhorceData = netPhorceData,
clusterIDs = c(0),
heatmapType = "Significant",
minQVal = 0.1,
verbose = TRUE)
#> Joining with `by = join_by(UniqueID)`
#> ..cutHeight not given, setting it to 33.7 ===> 99% of the (truncated) height range in dendro.
#> cutHeight set too low: no merges below the cut.
#> All 1 cluster are matched with provided q-value cut-off: 0.1
Note, you do not need to supply minQVal for Abscence Presence Heatmap
clusterIDs_AbsPrs <-
findClusters(netPhorceData = netPhorceData,
clusterIDs = c(1),
minQVal = 0.1,
heatmapType = "AbsencePresence",
verbose = TRUE)
#> ..cutHeight not given, setting it to 84.2 ===> 99% of the (truncated) height range in dendro.
#> ..done.
#> All 1 cluster are matched with provided q-value cut-off: 0.1
plotClustersHeatmap(netPhorceData = netPhorceData,
foundClusterIDs = clusterIDs_Sig,
plotly = TRUE)
#> Joining with `by = join_by(UniqueID)`
#> ..cutHeight not given, setting it to 33.7 ===> 99% of the (truncated) height range in dendro.
#> cutHeight set too low: no merges below the cut.
plotClustersHeatmap(netPhorceData = netPhorceData,
foundClusterIDs = clusterIDs_AbsPrs,
plotly = FALSE)
#> ..cutHeight not given, setting it to 84.2 ===> 99% of the (truncated) height range in dendro.
#> ..done.
peptideIDs <-
findPeptideIDs(netPhorceData = netPhorceData,
peptideIDList = c("AT1G01320.2_S1349_1", "AT1G05560.1_S153_1", "AT1G01320.2_S149_1"))
#> All 3 provided phosphopeptide IDs are matched to existing phosphopeptide IDs
plotSinglePeptide(netPhorceData = netPhorceData,
foundPepetidesIDs = peptideIDs,
plotAll = FALSE,
plotly = TRUE)
#> Multiple Phosphopeptide IDs provided, only plotting the first one. Please
#> use plotAll if you want to plot all the found phosphopeptide IDS.
plotSinglePeptide(netPhorceData = netPhorceData,
foundPepetidesIDs = peptideIDs,
plotAll = FALSE,
plotly = FALSE)
#> Multiple Phosphopeptide IDs provided, only plotting the first one. Please
#> use plotAll if you want to plot all the found phosphopeptide IDS.
plotMultiPeptides(netPhorceData = netPhorceData,
foundPepetidesIDs = peptideIDs,
condition = "Col0",
plotly = TRUE)
plotMultiPeptides(netPhorceData = netPhorceData,
foundPepetidesIDs = peptideIDs,
condition = "tot3",
plotly = FALSE)
plotRegulation(netPhorceData = netPhorceData ,
condition = "Col0",
plotly = TRUE)
plotRegulation(netPhorceData = netPhorceData ,
condition = "tot3",
plotly = FALSE)
plotNetPhorce(netPhorceData = netPhorceData,
condition = "tot3",
FASTADescription = TRUE)