-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from singjc/master
[MINOR] Changed assumed chromatogram folder from mzml to xics
- Loading branch information
Showing
54 changed files
with
191 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#' Outputs intensities for each analyte from aligned Targeted-MS runs | ||
#' | ||
#' 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. | ||
#' @author Shubham Gupta, \email{[email protected]} | ||
#' | ||
|
@@ -10,10 +10,10 @@ | |
#' Date: 2019-12-14 | ||
#' @importFrom dplyr %>% | ||
#' @inheritParams checkParams | ||
#' @param dataPath (string) path to mzml and osw directory. | ||
#' @param dataPath (string) path to xics and osw directory. | ||
#' @param outFile (string) name of the output file. | ||
#' @param oswMerged (logical) TRUE for experiment-wide FDR and FALSE for run-specific FDR by pyprophet. | ||
#' @param runs (a vector of string) names of mzml file without extension. | ||
#' @param runs (a vector of string) names of xics file without extension. | ||
#' @param refRun (string) reference for alignment. If no run is provided, m-score is used to select reference run. | ||
#' @param applyFun (function) value must be either lapply or BiocParallel::bplapply. | ||
#' @return An output table with following columns: precursor, run, intensity, RT, leftWidth, rightWidth, | ||
|
@@ -173,7 +173,7 @@ alignTargetedRuns <- function(dataPath, outFile = "DIAlignR", params = paramsDIA | |
|
||
#' AlignObj for analytes between a pair of runs | ||
#' | ||
#' 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. | ||
#' @author Shubham Gupta, \email{[email protected]} | ||
#' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,16 +30,16 @@ mergeOswAnalytes_ChromHeader <- function(oswAnalytes, chromHead, analyteFDR = 1 | |
|
||
#' Get list of peptides and their chromatogram indices. | ||
#' | ||
#' 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). | ||
#' @author Shubham Gupta, \email{[email protected]} | ||
#' | ||
#' ORCID: 0000-0003-3500-8152 | ||
#' | ||
#' License: (c) Author (2019) + GPL-3 | ||
#' Date: 2019-12-13 | ||
#' @importFrom rlang .data | ||
#' @param dataPath (char) path to mzml and osw directory. | ||
#' @param dataPath (char) path to xics and osw directory. | ||
#' @param 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. | ||
#' @param 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. | ||
|
@@ -155,7 +155,7 @@ mapPrecursorToChromIndices <- function(prec2transition, chromHead){ | |
|
||
#' Get chromatogram indices of precursors. | ||
#' | ||
#' 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). | ||
#' @author Shubham Gupta, \email{[email protected]} | ||
#' | ||
#' ORCID: 0000-0003-3500-8152 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#' Create a child run from two parent runs | ||
#' | ||
#' 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. | ||
#' | ||
#' @author Shubham Gupta, \email{[email protected]} | ||
|
@@ -42,7 +42,7 @@ | |
#' 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)) | ||
#' } | ||
getNodeRun <- function(runA, runB, mergeName, dataPath, fileInfo, features, mzPntrs, prec2chromIndex, | ||
|
@@ -134,10 +134,10 @@ getNodeRun <- function(runA, runB, mergeName, dataPath, fileInfo, features, mzPn | |
##### Write node mzML file ##### | ||
mergedXICs <- unlist(mergedXICs, recursive = FALSE, use.names = FALSE) | ||
if(params[["chromFile"]] =="mzML"){ | ||
fileName <- file.path(dataPath, "mzml", paste0(mergeName, ".chrom.mzML")) | ||
fileName <- file.path(dataPath, "xics", paste0(mergeName, ".chrom.mzML")) | ||
createMZML(ropenms, fileName, mergedXICs, precursors$transition_ids) | ||
} else if(params[["chromFile"]] =="sqMass"){ | ||
fileName <- file.path(dataPath, "mzml", paste0(mergeName, ".chrom.sqMass")) | ||
fileName <- file.path(dataPath, "xics", paste0(mergeName, ".chrom.sqMass")) | ||
createSqMass(fileName, mergedXICs, precursors$transition_ids, params[["lossy"]]) | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.