From 2cbf21acf8fde15a9d10b2285f2a44d8d5709276 Mon Sep 17 00:00:00 2001 From: Justin Sing Date: Sat, 20 Feb 2021 01:06:32 -0500 Subject: [PATCH] [MINOR] Update mzml to xic nomenclature everywhere, python scripts, manuals and vignettes --- man/alignTargetedRuns.Rd | 6 +- man/alignTargetedRuns2.Rd | 4 +- man/alignToMaster.Rd | 2 +- man/createMZML.Rd | 2 +- man/extractXIC_group.Rd | 2 +- man/extractXIC_group2.Rd | 2 +- man/filenamesFromMZML.Rd | 2 +- man/filenamesFromOSW.Rd | 2 +- man/getAlignObjs.Rd | 6 +- man/getChromatogramIndices.Rd | 2 +- man/getNodeRun.Rd | 6 +- man/getOswAnalytes.Rd | 2 +- man/getOswFiles.Rd | 6 +- man/getRunNames.Rd | 2 +- man/getXICs.Rd | 2 +- man/plotAnalyteXICs.Rd | 4 +- man/progAlignRuns.Rd | 8 +- man/progAlignRuns2.Rd | 4 +- man/readMzMLHeader.Rd | 4 +- man/readSqMassHeader.Rd | 4 +- man/recalculateIntensity.Rd | 2 +- man/traverseDown.Rd | 4 +- man/traverseUp.Rd | 6 +- man/uncompressVec.Rd | 2 +- python/scripts/DIAlignR4win.py | 8 +- vignettes/DIAlignR-vignette.Rmd | 6 +- vignettes/DIAlignR-vignette.html | 122 +++++++++++++++---------------- 27 files changed, 111 insertions(+), 111 deletions(-) diff --git a/man/alignTargetedRuns.Rd b/man/alignTargetedRuns.Rd index d473cf96..0878502b 100644 --- a/man/alignTargetedRuns.Rd +++ b/man/alignTargetedRuns.Rd @@ -15,7 +15,7 @@ alignTargetedRuns( ) } \arguments{ -\item{dataPath}{(string) path to mzml and osw directory.} +\item{dataPath}{(string) path to xics and osw directory.} \item{outFile}{(string) name of the output file.} @@ -23,7 +23,7 @@ alignTargetedRuns( \item{oswMerged}{(logical) TRUE for experiment-wide FDR and FALSE for run-specific FDR by pyprophet.} -\item{runs}{(a vector of string) names of mzml file without extension.} +\item{runs}{(a vector of string) names of xics file without extension.} \item{refRun}{(string) reference for alignment. If no run is provided, m-score is used to select reference run.} @@ -34,7 +34,7 @@ An output table with following columns: precursor, run, intensity, RT, leftWidth peak_group_rank, m_score, alignment_rank, peptide_id, sequence, charge, group_label. } \description{ -This function expects osw and mzml directories at dataPath. It first reads osw files and fetches chromatogram indices for each analyte. +This function expects osw and xics directories at dataPath. It first reads osw files and fetches chromatogram indices for each analyte. It then align XICs of its reference XICs. Best peak, which has lowest m-score, about the aligned retention time is picked for quantification. } \examples{ diff --git a/man/alignTargetedRuns2.Rd b/man/alignTargetedRuns2.Rd index 747b3c28..a6eab44c 100644 --- a/man/alignTargetedRuns2.Rd +++ b/man/alignTargetedRuns2.Rd @@ -15,7 +15,7 @@ alignTargetedRuns2( ) } \arguments{ -\item{dataPath}{(string) path to mzml and osw directory.} +\item{dataPath}{(string) path to xics and osw directory.} \item{outFile}{(string) name of the output file.} @@ -23,7 +23,7 @@ alignTargetedRuns2( \item{oswMerged}{(logical) TRUE for experiment-wide FDR and FALSE for run-specific FDR by pyprophet.} -\item{runs}{(string) names of mzml file without extension.} +\item{runs}{(string) names of xics file without extension.} \item{applyFun}{(function) value must be either lapply or BiocParallel::bplapply.} } diff --git a/man/alignToMaster.Rd b/man/alignToMaster.Rd index 5dc3646a..d1db173a 100644 --- a/man/alignToMaster.Rd +++ b/man/alignToMaster.Rd @@ -90,7 +90,7 @@ multipeptide <- alignToMaster(ref = "master1", eXp = "run1", alignedVecs, refRun # Cleanup rm(mzPntrs) file.remove(file.path(dataPath, "master1_av.rds")) -file.remove(file.path(dataPath, "mzml", "master1.chrom.mzML")) +file.remove(file.path(dataPath, "xics", "master1.chrom.mzML")) } } \seealso{ diff --git a/man/createMZML.Rd b/man/createMZML.Rd index 4aa61b68..ea32c39b 100644 --- a/man/createMZML.Rd +++ b/man/createMZML.Rd @@ -23,7 +23,7 @@ Writes an mzML file having chromatograms and their native IDs. } \examples{ dataPath <- system.file("extdata", package = "DIAlignR") -filename <- paste0(dataPath, "/mzml/hroest_K120809_Strep10\%PlasmaBiolRepl2_R04_SW_filt.chrom.mzML") +filename <- paste0(dataPath, "/xics/hroest_K120809_Strep10\%PlasmaBiolRepl2_R04_SW_filt.chrom.mzML") data(XIC_QFNNTDIVLLEDFQK_3_DIAlignR) XICs <- XIC_QFNNTDIVLLEDFQK_3_DIAlignR[["hroest_K120808_Strep10\%PlasmaBiolRepl1_R03_SW_filt"]] nativeIds <- list(27706:27711) diff --git a/man/extractXIC_group.Rd b/man/extractXIC_group.Rd index c947c3d8..adf6b897 100644 --- a/man/extractXIC_group.Rd +++ b/man/extractXIC_group.Rd @@ -19,7 +19,7 @@ Extracts XICs using mz object. Each chromatogram represents a transition of prec } \examples{ dataPath <- system.file("extdata", package = "DIAlignR") -mzmlName<-paste0(dataPath,"/mzml/hroest_K120809_Strep10\%PlasmaBiolRepl2_R04_SW_filt.chrom.mzML") +mzmlName<-paste0(dataPath,"/xics/hroest_K120809_Strep10\%PlasmaBiolRepl2_R04_SW_filt.chrom.mzML") mz <- mzR::openMSfile(mzmlName, backend = "pwiz") chromIndices <- c(37L, 38L, 39L, 40L, 41L, 42L) \dontrun{ diff --git a/man/extractXIC_group2.Rd b/man/extractXIC_group2.Rd index b7a6449e..04afa06f 100644 --- a/man/extractXIC_group2.Rd +++ b/man/extractXIC_group2.Rd @@ -20,7 +20,7 @@ Extracts XICs using connection to sqMass file Each chromatogram represents a tra } \examples{ dataPath <- system.file("extdata", package = "DIAlignR") -sqName <- paste0(dataPath,"/mzml/hroest_K120809_Strep10\%PlasmaBiolRepl2_R04_SW_filt.chrom.sqMass") +sqName <- paste0(dataPath,"/xics/hroest_K120809_Strep10\%PlasmaBiolRepl2_R04_SW_filt.chrom.sqMass") chromIndices <- c(36L, 37L, 38L, 39L, 40L, 41L) \dontrun{ con <- DBI::dbConnect(RSQLite::SQLite(), dbname = sqName) diff --git a/man/filenamesFromMZML.Rd b/man/filenamesFromMZML.Rd index 00290cf0..4d9fff0d 100644 --- a/man/filenamesFromMZML.Rd +++ b/man/filenamesFromMZML.Rd @@ -7,7 +7,7 @@ filenamesFromMZML(dataPath, chromFile) } \arguments{ -\item{dataPath}{(char) Path to mzml and osw directory.} +\item{dataPath}{(char) Path to xics and osw directory.} } \value{ A dataframe with two columns: diff --git a/man/filenamesFromOSW.Rd b/man/filenamesFromOSW.Rd index 61a25bf3..bdcec3f0 100644 --- a/man/filenamesFromOSW.Rd +++ b/man/filenamesFromOSW.Rd @@ -7,7 +7,7 @@ filenamesFromOSW(dataPath, pattern) } \arguments{ -\item{dataPath}{(char) path to mzml and osw directory.} +\item{dataPath}{(char) path to xics and osw directory.} \item{pattern}{(char) must be either *.osw or *merged.osw .} } diff --git a/man/getAlignObjs.Rd b/man/getAlignObjs.Rd index df7a823d..64c2ab85 100644 --- a/man/getAlignObjs.Rd +++ b/man/getAlignObjs.Rd @@ -17,9 +17,9 @@ getAlignObjs( \arguments{ \item{analytes}{(vector of integers) transition_group_ids for which features are to be extracted.} -\item{runs}{(a vector of string) names of mzml file without extension.} +\item{runs}{(a vector of string) names of xics file without extension.} -\item{dataPath}{(string) path to mzml and osw directory.} +\item{dataPath}{(string) path to xics and osw directory.} \item{refRun}{(string) reference for alignment. If no run is provided, m-score is used to select reference run.} @@ -36,7 +36,7 @@ A list of fileInfo and AlignObjs. Each AlignObj is an S4 object. Three most-impo \item{score}{(numeric) cumulative score of alignment.} } \description{ -This function expects osw and mzml directories at dataPath. It first reads osw files and fetches chromatogram indices for each requested analyte. +This function expects osw and xics directories at dataPath. It first reads osw files and fetches chromatogram indices for each requested analyte. It then align XICs of each analyte to its reference XICs. AlignObj is returned which contains aligned indices and cumulative score along the alignment path. } \examples{ diff --git a/man/getChromatogramIndices.Rd b/man/getChromatogramIndices.Rd index 12a13593..6bad9181 100644 --- a/man/getChromatogramIndices.Rd +++ b/man/getChromatogramIndices.Rd @@ -21,7 +21,7 @@ getChromatogramIndices(fileInfo, precursors, mzPntrs, applyFun = lapply) \item{chromatogramIndex}{(integer) index of chromatogram in mzML file.} } \description{ -This function reads the header of chromatogram files. It then fetches chromatogram indices by matching transition_id(osw) with chromatogramID(mzml). +This function reads the header of chromatogram files. It then fetches chromatogram indices by matching transition_id(osw) with chromatogramID(xics). } \examples{ dataPath <- system.file("extdata", package = "DIAlignR") diff --git a/man/getNodeRun.Rd b/man/getNodeRun.Rd index e4ec6ed2..932b9f0c 100644 --- a/man/getNodeRun.Rd +++ b/man/getNodeRun.Rd @@ -30,7 +30,7 @@ getNodeRun( \item{mergeName}{(string) name of the node that is generated with merging of runA and runB.} -\item{dataPath}{(string) path to mzml and osw directory.} +\item{dataPath}{(string) path to xics and osw directory.} \item{fileInfo}{(data-frame) output of \code{\link{getRunNames}}.} @@ -64,7 +64,7 @@ associated with analytes. This is an output of \code{\link{getMultipeptide}}.} } \description{ Get merged features and merged chromatograms from parent runs. Chromatograms are written on the disk -at dataPath/mzml. For each precursor aligned parent time-vectors and corresponding child time-vector +at dataPath/xics. For each precursor aligned parent time-vectors and corresponding child time-vector are also calculated and written as *_av.rda at dataPath. } \examples{ @@ -91,7 +91,7 @@ ropenms <- get_ropenms(condaEnv = "envName", useConda=TRUE) multipeptide <- getNodeRun(runA = "run2", runB = "run0", mergeName = mergeName, dataPath = ".", fileInfo, features, mzPntrs, prec2chromIndex, precursors, params, adaptiveRTs, refRuns, multipeptide, peptideScores, ropenms) rm(mzPntrs) -file.remove(file.path(".", "mzml", paste0(mergeName, ".chrom.mzML"))) +file.remove(file.path(".", "xics", paste0(mergeName, ".chrom.mzML"))) file.remove(list.files(".", pattern = "*_av.rds", full.names = TRUE)) } } diff --git a/man/getOswAnalytes.Rd b/man/getOswAnalytes.Rd index fb259fb6..10e257ce 100644 --- a/man/getOswAnalytes.Rd +++ b/man/getOswAnalytes.Rd @@ -22,7 +22,7 @@ FALSE for fetching analytes as PEPTIDE.MODIFIED_SEQUENCE and PRECURSOR.CHARGE fr \item{runType}{(char) This must be one of the strings "DIA_proteomics", "DIA_Metabolomics".} -\item{dataPath}{(char) path to mzml and osw directory.} +\item{dataPath}{(char) path to xics and osw directory.} \item{filenames}{(data-frame) column "filename" contains RUN table from osw files. column "runs" contain respective mzML names without extension. To get filenames use \code{\link{getRunNames}} function.} diff --git a/man/getOswFiles.Rd b/man/getOswFiles.Rd index 5f5480cd..a73c3e21 100644 --- a/man/getOswFiles.Rd +++ b/man/getOswFiles.Rd @@ -31,7 +31,7 @@ FALSE for fetching analytes as PEPTIDE.MODIFIED_SEQUENCE and PRECURSOR.CHARGE fr \item{analyteInGroupLabel}{(logical) TRUE for getting analytes as PRECURSOR.GROUP_LABEL from osw file.} -\item{dataPath}{(char) path to mzml and osw directory.} +\item{dataPath}{(char) path to xics and osw directory.} \item{filenames}{(data-frame) column "filename" contains RUN table from osw files. column "runs" contain respective mzML names without extension. To get filenames use DIAlignR::getRunNames function.} @@ -51,8 +51,8 @@ To get filenames use DIAlignR::getRunNames function.} \item{transition_ids}{(integer) fragment-ion ID associated with transition_group_id. This is matched with chromatogram ID in mzML file.} } \description{ -This function reads all osw and mzml files in the directories at dataPath. It selects analytes which has associated features with m-score < maxFdrQuery. -For these analytes it fetches chromatogram indices by matching transition_id(osw) with chromatogramID(mzml). +This function reads all osw and xics files in the directories at dataPath. It selects analytes which has associated features with m-score < maxFdrQuery. +For these analytes it fetches chromatogram indices by matching transition_id(osw) with chromatogramID(xics). } \examples{ dataPath <- system.file("extdata", package = "DIAlignR") diff --git a/man/getRunNames.Rd b/man/getRunNames.Rd index 14b8ec20..14c5e500 100644 --- a/man/getRunNames.Rd +++ b/man/getRunNames.Rd @@ -7,7 +7,7 @@ getRunNames(dataPath, oswMerged = TRUE, params = paramsDIAlignR()) } \arguments{ -\item{dataPath}{(char) Path to mzml and osw directory.} +\item{dataPath}{(char) Path to xics and osw directory.} \item{oswMerged}{(logical) TRUE for experiment-wide FDR and FALSE for run-specific FDR by pyprophet.} diff --git a/man/getXICs.Rd b/man/getXICs.Rd index 8c4b89b2..f1cbc4a5 100644 --- a/man/getXICs.Rd +++ b/man/getXICs.Rd @@ -19,7 +19,7 @@ getXICs( \item{runs}{(vector of string) names of mzML files without extension.} -\item{dataPath}{(string) Path to mzml and osw directory.} +\item{dataPath}{(string) Path to xics and osw directory.} \item{maxFdrQuery}{(numeric) A numeric value between 0 and 1. It is used to filter features from osw file which have SCORE_MS2.QVALUE less than itself.} diff --git a/man/plotAnalyteXICs.Rd b/man/plotAnalyteXICs.Rd index 2a1c863e..55ab90a9 100644 --- a/man/plotAnalyteXICs.Rd +++ b/man/plotAnalyteXICs.Rd @@ -21,9 +21,9 @@ plotAnalyteXICs( \arguments{ \item{analyte}{(integer) an analyte is a PRECURSOR.ID from the osw file.} -\item{run}{(string) Name of a mzml file without extension.} +\item{run}{(string) Name of a xics file without extension.} -\item{dataPath}{(string) path to mzml and osw directory.} +\item{dataPath}{(string) path to xics and osw directory.} \item{maxFdrQuery}{(numeric) A numeric value between 0 and 1. It is used to filter features from osw file which have SCORE_MS2.QVALUE less than itself.} diff --git a/man/progAlignRuns.Rd b/man/progAlignRuns.Rd index d0a49360..ff644357 100644 --- a/man/progAlignRuns.Rd +++ b/man/progAlignRuns.Rd @@ -16,7 +16,7 @@ progAlignRuns( ) } \arguments{ -\item{dataPath}{(string) path to mzml and osw directory.} +\item{dataPath}{(string) path to xics and osw directory.} \item{params}{(list) parameters are entered as list. Output of the \code{\link{paramsDIAlignR}} function.} @@ -26,7 +26,7 @@ progAlignRuns( \item{oswMerged}{(logical) TRUE for experiment-wide FDR and FALSE for run-specific FDR by pyprophet.} -\item{runs}{(string) names of mzml file without extension.} +\item{runs}{(string) names of xics file without extension.} \item{newickTree}{(string) guidance tree in newick format. Look up \code{\link{getTree}}.} @@ -36,7 +36,7 @@ progAlignRuns( (None) } \description{ -This function expects osw and mzml directories at dataPath. It first reads osw files and fetches +This function expects osw and xics directories at dataPath. It first reads osw files and fetches chromatogram indices for each analyte. To perform alignment, first a crude guide-tree is built which can also be provided with newickTree parameter. As we traverse from the leaf-nodes to the root node, runs are aligned pairwise. The root node is named master1 that has average of all fragment ion chromatograms @@ -53,7 +53,7 @@ progAlignRuns(dataPath, params = params, outFile = "test3", ropenms = ropenms) # Removing aligned vectors file.remove(list.files(dataPath, pattern = "*_av.rds", full.names = TRUE)) # Removing temporarily created master chromatograms -file.remove(list.files(file.path(dataPath, "mzml"), pattern = "^master[0-9]+\\\\.chrom\\\\.mzML$", full.names = TRUE)) +file.remove(list.files(file.path(dataPath, "xics"), pattern = "^master[0-9]+\\\\.chrom\\\\.mzML$", full.names = TRUE)) file.remove(file.path(dataPath, "test3.temp.RData")) file.remove(file.path(dataPath, "master.merged.osw")) } diff --git a/man/progAlignRuns2.Rd b/man/progAlignRuns2.Rd index bfdda821..10d9fbd5 100644 --- a/man/progAlignRuns2.Rd +++ b/man/progAlignRuns2.Rd @@ -17,7 +17,7 @@ progAlignRuns2( ) } \arguments{ -\item{dataPath}{(string) path to mzml and osw directory.} +\item{dataPath}{(string) path to xics and osw directory.} \item{params}{(list) parameters are entered as list. Output of the \code{\link{paramsDIAlignR}} function.} @@ -27,7 +27,7 @@ progAlignRuns2( \item{oswMerged}{(logical) TRUE for experiment-wide FDR and FALSE for run-specific FDR by pyprophet.} -\item{runs}{(string) names of mzml file without extension.} +\item{runs}{(string) names of xics file without extension.} \item{newickTree}{(string) guidance tree in newick format. Look up \code{\link{getTree}}.} diff --git a/man/readMzMLHeader.Rd b/man/readMzMLHeader.Rd index 7be025b0..a88fe38a 100644 --- a/man/readMzMLHeader.Rd +++ b/man/readMzMLHeader.Rd @@ -7,7 +7,7 @@ readMzMLHeader(mzmlName) } \arguments{ -\item{mzmlName}{(char) path to mzml file.} +\item{mzmlName}{(char) path to xics file.} } \value{ (A data-frame) It has 10 columns. The two important columns are: @@ -19,7 +19,7 @@ Get a table of chromatogram indices and respective transition IDs. } \examples{ dataPath <- system.file("extdata", package = "DIAlignR") -mzmlName <-paste0(dataPath,"/mzml/hroest_K120809_Strep0\%PlasmaBiolRepl2_R04_SW_filt.chrom.mzML") +mzmlName <-paste0(dataPath,"/xics/hroest_K120809_Strep0\%PlasmaBiolRepl2_R04_SW_filt.chrom.mzML") \dontrun{ chromHead <- readChromatogramHeader(mzmlName = mzmlName) } diff --git a/man/readSqMassHeader.Rd b/man/readSqMassHeader.Rd index 461fbd4e..22f1f945 100644 --- a/man/readSqMassHeader.Rd +++ b/man/readSqMassHeader.Rd @@ -7,7 +7,7 @@ readSqMassHeader(con) } \arguments{ -\item{mzmlName}{(char) path to mzml file.} +\item{mzmlName}{(char) path to xics file.} } \value{ (A data-frame) It has 10 columns. The two important columns are: @@ -19,7 +19,7 @@ Get a table of chromatogram indices and respective transition IDs. } \examples{ dataPath <- system.file("extdata", package = "DIAlignR") -sqName <-paste0(dataPath,"/mzml/hroest_K120809_Strep0\%PlasmaBiolRepl2_R04_SW_filt.chrom.sqMass") +sqName <-paste0(dataPath,"/xics/hroest_K120809_Strep0\%PlasmaBiolRepl2_R04_SW_filt.chrom.sqMass") \dontrun{ chromHead <- readChromatogramHeader(sqName) } diff --git a/man/recalculateIntensity.Rd b/man/recalculateIntensity.Rd index 1dd64b67..4687acef 100644 --- a/man/recalculateIntensity.Rd +++ b/man/recalculateIntensity.Rd @@ -14,7 +14,7 @@ recalculateIntensity( \arguments{ \item{peakTable}{(data-frame) usually an output of alignTargetedRuns. Must have these columns: run, precursor, leftWidth, rightWidth.} -\item{dataPath}{(string) path to mzml and osw directory.} +\item{dataPath}{(string) path to xics and osw directory.} \item{oswMerged}{(logical) TRUE for experiment-wide FDR and FALSE for run-specific FDR by pyprophet.} diff --git a/man/traverseDown.Rd b/man/traverseDown.Rd index 518b8f89..bbd4e3ec 100644 --- a/man/traverseDown.Rd +++ b/man/traverseDown.Rd @@ -21,7 +21,7 @@ traverseDown( \arguments{ \item{tree}{(phylo) a phylogenetic tree.} -\item{dataPath}{(string) path to mzml and osw directory.} +\item{dataPath}{(string) path to xics and osw directory.} \item{fileInfo}{(data-frame) output of \code{\link{getRunNames}}.} @@ -84,7 +84,7 @@ multipeptide <- traverseDown(tree, dataPath, fileInfo, multipeptide, prec2chromI # Cleanup rm(mzPntrs) file.remove(list.files(dataPath, pattern = "*_av.rds", full.names = TRUE)) -file.remove(list.files(file.path(dataPath, "mzml"), pattern = "^master[0-9]+\\\\.chrom\\\\.mzML$", full.names = TRUE)) +file.remove(list.files(file.path(dataPath, "xics"), pattern = "^master[0-9]+\\\\.chrom\\\\.mzML$", full.names = TRUE)) } } \seealso{ diff --git a/man/traverseUp.Rd b/man/traverseUp.Rd index dd9ee25a..c6ffa1c0 100644 --- a/man/traverseUp.Rd +++ b/man/traverseUp.Rd @@ -24,7 +24,7 @@ traverseUp( \arguments{ \item{tree}{(phylo) a phylogenetic tree.} -\item{dataPath}{(string) path to mzml and osw directory.} +\item{dataPath}{(string) path to xics and osw directory.} \item{fileInfo}{(data-frame) output of \code{\link{getRunNames}}.} @@ -61,7 +61,7 @@ associated with analytes. This is an output of \code{\link{getMultipeptide}}.} { While traversing from leaf to root node, at each node a master run is created. Merged features and merged chromatograms from parent runs are estimated. Chromatograms are written on the disk -at dataPath/mzml. For each precursor aligned parent time-vectors and corresponding child time-vector +at dataPath/xics. For each precursor aligned parent time-vectors and corresponding child time-vector are also calculated and written as *_av.rds at dataPath. Accesors to the new files are added to fileInfo, mzPntrs and prec2chromIndex. Features, reference @@ -95,7 +95,7 @@ multipeptide <- traverseUp(tree, dataPath, fileInfo, features, mzPntrs, prec2chr rm(mzPntrs) # Cleanup file.remove(list.files(dataPath, pattern = "*_av.rds", full.names = TRUE)) -file.remove(list.files(file.path(dataPath, "mzml"), pattern = "^master[0-9]+\\\\.chrom\\\\.mzML$", full.names = TRUE)) +file.remove(list.files(file.path(dataPath, "xics"), pattern = "^master[0-9]+\\\\.chrom\\\\.mzML$", full.names = TRUE)) } } \seealso{ diff --git a/man/uncompressVec.Rd b/man/uncompressVec.Rd index 909d6f1e..ec2a8312 100644 --- a/man/uncompressVec.Rd +++ b/man/uncompressVec.Rd @@ -21,7 +21,7 @@ compression is one of 0 = no, 1 = zlib, 2 = np-linear, } \examples{ dataPath <- system.file("extdata", package = "DIAlignR") -sqName <- paste0(dataPath,"/mzml/hroest_K120809_Strep10\%PlasmaBiolRepl2_R04_SW_filt.chrom.sqMass") +sqName <- paste0(dataPath,"/xics/hroest_K120809_Strep10\%PlasmaBiolRepl2_R04_SW_filt.chrom.sqMass") con <- DBI::dbConnect(RSQLite::SQLite(), dbname = sqName) df1 <- DBI::dbGetQuery(con, "SELECT CHROMATOGRAM_ID, COMPRESSION, DATA_TYPE, DATA FROM DATA WHERE CHROMATOGRAM_ID = 36;") DBI::dbDisconnect(con) diff --git a/python/scripts/DIAlignR4win.py b/python/scripts/DIAlignR4win.py index c2b9f94c..e3e3f0ff 100644 --- a/python/scripts/DIAlignR4win.py +++ b/python/scripts/DIAlignR4win.py @@ -22,7 +22,7 @@ def getRunNames(dataPath, oswFiles, mzmlFiles): runs = [] oswdataPath = os.path.join(dataPath, 'osw') - mzmldataPath = os.path.join(dataPath, 'mzml') + mzmldataPath = os.path.join(dataPath, 'xics') for root, dirs, files in os.walk(oswdataPath): for file in files: if file.endswith(".osw"): @@ -108,7 +108,7 @@ def extractXIC_group(mz, chromIndices): def main(): parser = ArgumentParser(description='Align XICs of precursors across multiple Targeted-MS runs and outputs quantitative data matrix.', formatter_class=RawTextHelpFormatter) - parser.add_argument('-in1', '--in_dataPath', metavar = '', help="location of parent directory of osw and mzml files.\n", type = Path, default = None, required = True) + parser.add_argument('-in1', '--in_dataPath', metavar = '', help="location of parent directory of osw and xics files.\n", type = Path, default = None, required = True) parser.add_argument('-in2', '--alignType' , metavar = 'hybrid', type = str, nargs = 1, default = 'hybrid', required = False, choices=['hybrid', 'local', 'global'], help = 'Type of retention time alignment.\n') parser.add_argument('--maxFdrQuery' , metavar = '0.05', type = float, nargs = 1, default = 0.05, required = False, help = 'Type of retention time alignment.\n') parser.add_argument('--maxFdrLoess' , metavar = '0.01', type = float, nargs = 1, default = 0.01, required = False, help = 'Type of retention time alignment.\n') @@ -177,7 +177,7 @@ def main(): df = pd.DataFrame(rows, columns=['transition_group_id', 'filename', 'RT', 'delta_rt', 'assay_RT', 'Intensity', 'leftWidth', 'rightWidth', 'peak_group_rank', 'm_score', 'transition_id']) # Get ChromatogramID (native) and ChromatogramIndex - mzml_db = os.path.join(curPath, 'mzml', run + '.chrom.mzML') + mzml_db = os.path.join(curPath, 'xics', run + '.chrom.mzML') mz = OnDiscMSExperiment() mz.openFile(mzml_db) meta_data = mz.getMetaData() @@ -209,7 +209,7 @@ def main(): p.update({b'frame_length': args.SgolayFiltLen, b'polynomial_order': args.SgolayFiltOrd}) filter.setParameters(p) for run in mzPntrs.keys(): - mzml_db = os.path.join(curPath, 'mzml', run + '.chrom.mzML') + mzml_db = os.path.join(curPath, 'xics', run + '.chrom.mzML') mz = OnDiscMSExperiment() mz.openFile(mzml_db) #filter.filterExperiment(mz) diff --git a/vignettes/DIAlignR-vignette.Rmd b/vignettes/DIAlignR-vignette.Rmd index a9b1e391..9786915e 100644 --- a/vignettes/DIAlignR-vignette.Rmd +++ b/vignettes/DIAlignR-vignette.Rmd @@ -68,10 +68,10 @@ pyprophet score --in=merged.osw --classifier=XGBoost --level=ms2 --xeval_num_ite pyprophet peptide --in=merged.osw --context=experiment-wide ``` -| Congrats! Now we have raw chromatogram files and associated scored features in merged.osw files. Move all .chrom.mzML files in `mzml` directory and merged.osw file in `osw` directory. The parent folder is given as `dataPath` to DIAlignR functions. +| Congrats! Now we have raw chromatogram files and associated scored features in merged.osw files. Move all .chrom.mzML files in `xics` directory and merged.osw file in `osw` directory. The parent folder is given as `dataPath` to DIAlignR functions. ## Performing alignment on DIA runs -`alignTargetedRuns` function aligns Proteomics or Metabolomics DIA runs. It expects two directories "osw" and "mzml" at `dataPath`. It outputs an intensity table where rows specify each analyte and columns specify runs. Use parameter `saveFiles = TRUE` to have aligned retetion time and intensities saved in the current directory. +`alignTargetedRuns` function aligns Proteomics or Metabolomics DIA runs. It expects two directories "osw" and "xics" at `dataPath`. It outputs an intensity table where rows specify each analyte and columns specify runs. Use parameter `saveFiles = TRUE` to have aligned retetion time and intensities saved in the current directory. ```{r, results=FALSE, message=FALSE, warning=FALSE} runs <- c("hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt", @@ -86,7 +86,7 @@ alignTargetedRuns(dataPath = dataPath, outFile = "test.csv", runs = NULL, oswMer ## Investigating alignment of analytes -For getting alignment object which has aligned indices of XICs `getAlignObjs` function can be used. Like previous function, it expects two directories "osw" and "mzml" at `dataPath`. It performs alignment for exactly two runs. In case of `refRun` is not provided, m-score from osw files is used to select reference run. +For getting alignment object which has aligned indices of XICs `getAlignObjs` function can be used. Like previous function, it expects two directories "osw" and "xics" at `dataPath`. It performs alignment for exactly two runs. In case of `refRun` is not provided, m-score from osw files is used to select reference run. ```{r, message=FALSE} runs <- c("hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt", "hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt") diff --git a/vignettes/DIAlignR-vignette.html b/vignettes/DIAlignR-vignette.html index 2dba633d..14cd8fce 100644 --- a/vignettes/DIAlignR-vignette.html +++ b/vignettes/DIAlignR-vignette.html @@ -1569,18 +1569,18 @@ line-height: normal; } -code > span.kw { color: #E07020; } -code > span.dt { color: #404040; } -code > span.dv { color: #D02070; } -code > span.bn { color: #d14; } -code > span.fl { color: #D02070; } -code > span.ch { color: #40A040; } -code > span.st { color: #40A040; } -code > span.co { color: #808080; font-style: italic; } -code > span.ot { color: #2020F0; } -code > span.al { color: #ff0000; font-weight: bold; } -code > span.fu { color: #E07020; } -code > span.er { color: #FF0000; } +code > span.kw { color: #E07020; } +code > span.dt { color: #404040; } +code > span.dv { color: #D02070; } +code > span.bn { color: #d14; } +code > span.fl { color: #D02070; } +code > span.ch { color: #40A040; } +code > span.st { color: #40A040; } +code > span.co { color: #808080; font-style: italic; } +code > span.ot { color: #2020F0; } +code > span.al { color: #ff0000; font-weight: bold; } +code > span.fu { color: #E07020; } +code > span.er { color: #FF0000; } code > span.identifier { color: #404040; } code > span.number { color: #D02070; } code > span.string { color: #40A040; } @@ -1898,11 +1898,11 @@

0.2 Prepare input files for align pyprophet score --in=merged.osw --classifier=XGBoost --level=ms2 --xeval_num_iter=3 \ --ss_initial_fdr=0.05 --ss_iteration_fdr=0.01 pyprophet peptide --in=merged.osw --context=experiment-wide -
  Congrats! Now we have raw chromatogram files and associated scored features in merged.osw files. Move all .chrom.mzML files in mzml directory and merged.osw file in osw directory. The parent folder is given as dataPath to DIAlignR functions.
+
  Congrats! Now we have raw chromatogram files and associated scored features in merged.osw files. Move all .chrom.mzML files in xics directory and merged.osw file in osw directory. The parent folder is given as dataPath to DIAlignR functions.

0.3 Performing alignment on DIA runs

-

alignTargetedRuns function aligns Proteomics or Metabolomics DIA runs. It expects two directories “osw” and “mzml” at dataPath. It outputs an intensity table where rows specify each analyte and columns specify runs. Use parameter saveFiles = TRUE to have aligned retetion time and intensities saved in the current directory.

+

alignTargetedRuns function aligns Proteomics or Metabolomics DIA runs. It expects two directories “osw” and “xics” at dataPath. It outputs an intensity table where rows specify each analyte and columns specify runs. Use parameter saveFiles = TRUE to have aligned retetion time and intensities saved in the current directory.

runs <- c("hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt",
           "hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt")
 params <- paramsDIAlignR()
@@ -1914,11 +1914,11 @@ 

0.3 Performing alignment on DIA r

0.4 Investigating alignment of analytes

-

For getting alignment object which has aligned indices of XICs getAlignObjs function can be used. Like previous function, it expects two directories “osw” and “mzml” at dataPath. It performs alignment for exactly two runs. In case of refRun is not provided, m-score from osw files is used to select reference run.

+

For getting alignment object which has aligned indices of XICs getAlignObjs function can be used. Like previous function, it expects two directories “osw” and “xics” at dataPath. It performs alignment for exactly two runs. In case of refRun is not provided, m-score from osw files is used to select reference run.

runs <- c("hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt",
           "hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt")
 AlignObjLight <- getAlignObjs(analytes = 4618L, runs = runs, dataPath = dataPath, objType   = "light", params = params)
-#> [1] "hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt" 
+#> [1] "hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt"
 #> [2] "hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt"
 #> [1] "Finding reference run using SCORE_PEPTIDE table"
 # First element contains names of runs, spectra files, chromatogram files and feature files.
@@ -1935,7 +1935,7 @@ 

0.4 Investigating alignment of an names(as.list(obj)) #> [1] "indexA_aligned" "indexB_aligned" "score" AlignObjMedium <- getAlignObjs(analytes = 4618L, runs = runs, dataPath = dataPath, objType = "medium", params = params) -#> [1] "hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt" +#> [1] "hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt" #> [2] "hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt" #> [1] "Finding reference run using SCORE_PEPTIDE table" obj <- AlignObjMedium[[2]][["4618"]][[1]][["AlignObj"]] @@ -1955,7 +1955,7 @@

0.5 Visualizing the aligned chrom
runs <- c("hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt",
  "hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt")
 AlignObj <- getAlignObjs(analytes = 4618L, runs = runs, dataPath = dataPath, params = params)
-#> [1] "hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt" 
+#> [1] "hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt"
 #> [2] "hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt"
 #> [1] "Finding reference run using SCORE_PEPTIDE table"
 plotAlignedAnalytes(AlignObj, annotatePeak = TRUE)
@@ -1968,7 +1968,7 @@

0.6 Visualizing the alignment pat runs <- c("hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt", "hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt") AlignObjOutput <- getAlignObjs(analytes = 4618L, runs = runs, params = params, dataPath = dataPath, objType = "medium") -#> [1] "hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt" +#> [1] "hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt" #> [2] "hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt" #> [1] "Finding reference run using SCORE_PEPTIDE table" plotAlignmentPath(AlignObjOutput)

@@ -1984,56 +1984,56 @@

0.8 Session Info

#> R version 4.0.2 (2020-06-22) #> Platform: x86_64-pc-linux-gnu (64-bit) #> Running under: Ubuntu 16.04.6 LTS -#> +#> #> Matrix products: default #> BLAS: /usr/lib/libblas/libblas.so.3.6.0 #> LAPACK: /usr/lib/lapack/liblapack.so.3.6.0 -#> +#> #> locale: -#> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C -#> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=C -#> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 -#> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C -#> [9] LC_ADDRESS=C LC_TELEPHONE=C -#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C -#> +#> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C +#> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=C +#> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 +#> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C +#> [9] LC_ADDRESS=C LC_TELEPHONE=C +#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C +#> #> attached base packages: -#> [1] stats graphics grDevices utils datasets methods base -#> +#> [1] stats graphics grDevices utils datasets methods base +#> #> other attached packages: -#> [1] lattice_0.20-41 BiocStyle_2.16.0 DIAlignR_1.0.5 -#> +#> [1] lattice_0.20-41 BiocStyle_2.16.0 DIAlignR_1.0.5 +#> #> loaded via a namespace (and not attached): -#> [1] nlme_3.1-147 ProtGenerics_1.20.0 fs_1.4.2 -#> [4] usethis_1.6.1 devtools_2.3.0 bit64_0.9-7.1 -#> [7] RColorBrewer_1.1-2 rprojroot_1.3-2 tools_4.0.2 -#> [10] backports_1.1.8 R6_2.4.1 DBI_1.1.0 -#> [13] BiocGenerics_0.34.0 colorspace_1.4-1 withr_2.2.0 -#> [16] tidyselect_1.1.0 gridExtra_2.3 prettyunits_1.1.1 -#> [19] processx_3.4.3 phangorn_2.5.5 bit_1.1-15.2 -#> [22] compiler_4.0.2 cli_2.0.2 Biobase_2.48.0 -#> [25] xml2_1.3.2 desc_1.2.0 labeling_0.3 -#> [28] bookdown_0.20 scales_1.1.1 quadprog_1.5-8 -#> [31] callr_3.4.3 stringr_1.4.0 digest_0.6.25 -#> [34] rmarkdown_2.3 jpeg_0.1-8.1 pkgconfig_2.0.3 -#> [37] htmltools_0.5.0 sessioninfo_1.1.1 rlang_0.4.7 -#> [40] rstudioapi_0.11 RSQLite_2.2.0 generics_0.0.2 -#> [43] farver_2.0.3 zoo_1.8-8 jsonlite_1.7.0 -#> [46] dplyr_1.0.0 magrittr_1.5 Matrix_1.2-18 -#> [49] Rcpp_1.0.5 munsell_0.5.0 fansi_0.4.1 -#> [52] ape_5.4 reticulate_1.16 lifecycle_0.2.0 -#> [55] stringi_1.4.6 yaml_2.2.1 MASS_7.3-51.6 -#> [58] pkgbuild_1.1.0 grid_4.0.2 blob_1.2.1 -#> [61] parallel_4.0.2 crayon_1.3.4 mzR_2.22.0 -#> [64] knitr_1.29 ps_1.3.3 pillar_1.4.6 -#> [67] igraph_1.2.5 codetools_0.2-16 pkgload_1.1.0 -#> [70] fastmatch_1.1-0 glue_1.4.1 evaluate_0.14 +#> [1] nlme_3.1-147 ProtGenerics_1.20.0 fs_1.4.2 +#> [4] usethis_1.6.1 devtools_2.3.0 bit64_0.9-7.1 +#> [7] RColorBrewer_1.1-2 rprojroot_1.3-2 tools_4.0.2 +#> [10] backports_1.1.8 R6_2.4.1 DBI_1.1.0 +#> [13] BiocGenerics_0.34.0 colorspace_1.4-1 withr_2.2.0 +#> [16] tidyselect_1.1.0 gridExtra_2.3 prettyunits_1.1.1 +#> [19] processx_3.4.3 phangorn_2.5.5 bit_1.1-15.2 +#> [22] compiler_4.0.2 cli_2.0.2 Biobase_2.48.0 +#> [25] xml2_1.3.2 desc_1.2.0 labeling_0.3 +#> [28] bookdown_0.20 scales_1.1.1 quadprog_1.5-8 +#> [31] callr_3.4.3 stringr_1.4.0 digest_0.6.25 +#> [34] rmarkdown_2.3 jpeg_0.1-8.1 pkgconfig_2.0.3 +#> [37] htmltools_0.5.0 sessioninfo_1.1.1 rlang_0.4.7 +#> [40] rstudioapi_0.11 RSQLite_2.2.0 generics_0.0.2 +#> [43] farver_2.0.3 zoo_1.8-8 jsonlite_1.7.0 +#> [46] dplyr_1.0.0 magrittr_1.5 Matrix_1.2-18 +#> [49] Rcpp_1.0.5 munsell_0.5.0 fansi_0.4.1 +#> [52] ape_5.4 reticulate_1.16 lifecycle_0.2.0 +#> [55] stringi_1.4.6 yaml_2.2.1 MASS_7.3-51.6 +#> [58] pkgbuild_1.1.0 grid_4.0.2 blob_1.2.1 +#> [61] parallel_4.0.2 crayon_1.3.4 mzR_2.22.0 +#> [64] knitr_1.29 ps_1.3.3 pillar_1.4.6 +#> [67] igraph_1.2.5 codetools_0.2-16 pkgload_1.1.0 +#> [70] fastmatch_1.1-0 glue_1.4.1 evaluate_0.14 #> [73] latticeExtra_0.6-29 remotes_2.1.1 BiocManager_1.30.10 -#> [76] png_0.1-7 vctrs_0.3.2 testthat_2.3.2 -#> [79] gtable_0.3.0 purrr_0.3.4 tidyr_1.1.0 -#> [82] assertthat_0.2.1 ggplot2_3.3.2 xfun_0.15 -#> [85] pracma_2.2.9 roxygen2_7.1.1 ncdf4_1.17 -#> [88] signal_0.7-6 tibble_3.0.3 memoise_1.1.0 +#> [76] png_0.1-7 vctrs_0.3.2 testthat_2.3.2 +#> [79] gtable_0.3.0 purrr_0.3.4 tidyr_1.1.0 +#> [82] assertthat_0.2.1 ggplot2_3.3.2 xfun_0.15 +#> [85] pracma_2.2.9 roxygen2_7.1.1 ncdf4_1.17 +#> [88] signal_0.7-6 tibble_3.0.3 memoise_1.1.0 #> [91] ellipsis_0.3.1