/
PackageDIAlignRSeptember262021TypePackageTitleDynamicProgrammingBasedA PackageDIAlignRSeptember262021TypePackageTitleDynamicProgrammingBasedA

PackageDIAlignRSeptember262021TypePackageTitleDynamicProgrammingBasedA - PDF document

reagan
reagan . @reagan
Follow
342 views
Uploaded On 2021-09-30

PackageDIAlignRSeptember262021TypePackageTitleDynamicProgrammingBasedA - PPT Presentation

2Rtopicsdocumentedgitlastcommitf8b6c4fgitlastcommitdate20210716DatePublication20210926AuthorShubhamGuptaautcrehttpsorcidorg0000000335008152x0000HannesRostauthttpsorcidorg0000000309907 ID: 891013

dialignr numeric string author numeric dialignr author string true xics datapath 2019 0000 orcid 0003 shubhamgupta xshub 3500 xpta

Share:

Link:

Embed:

Download Presentation from below link

Download Pdf The PPT/PDF document "PackageDIAlignRSeptember262021TypePackag..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

1 Package`DIAlignR'September26,2021TypePac
Package`DIAlignR'September26,2021TypePackageTitleDynamicProgrammingBasedAlignmentofMS2ChromatogramsVersion2.1.0DescriptionToobtainunbiasedproteomecoveragefromabiologicalsample,mass-spectrometerisoperatedinDataIndependentAcquisition(DIA)mode.AlignmentoftheseDIArunsestablishesconsistencyandlessmissingvaluesincompletedata-matrix.Thispackageimplementsdynamicprogrammingwithafnegappenaltybasedapproachforpair-wisealignmentofanalytes.Ahybridapproachofglobalalignment(throughMS2features)andlocalalignment(withMS2chromatograms)isimple-mentedinthistool.LicenseGPL-3EncodingUTF-8LazyDatafalseRoxygenNote7.1.1biocViewsMassSpectrometry,Metabolomics,Proteomics,Alignment,SoftwareDependsmethods,stats,R�(=4.0)Importszoo�(=1.8-3),data.table,magrittr,dplyr,tidyr,rlang,mzR�(=2.18),signal,bit64,reticulate,ggplot2,RSQLite,DBI,ape,phangorn,pracma,RMSNumpress,RcppSuggestsknitr,akima,lattice,scales,gridExtra,latticeExtra,rmarkdown,BiocStyle,BiocParallel,testthat�(=2.1.0)VignetteBuilderknitrBugReportshttps://github.com/shubham1637/DIAlignR/issuesLinkingToRcpp,RcppEigenSystemRequirementsC++14git_urlhttps://git.bioconductor.org/packages/DIAlignRgit_branchmaster1 2Rtopicsdocumented:git_last_commitf8b6c

2 4fgit_last_commit_date2021-07-16Date/Pub
4fgit_last_commit_date2021-07-16Date/Publication2021-09-26AuthorShubhamGupta[aut,cre](https://orcid.org/0000-0003-3500-8152�),HannesRost[aut](https://orcid.org/0000-0003-0990-7488�),JustinSing[aut]MaintainerShubhamGupta&#xshub;&#xham.;ᘷ&#x@gma;&#xil.c;&#xom00;Rtopicsdocumented:AfneAlignObj-class....................................3AfneAlignObjLight-class.................................4AfneAlignObjMedium-class...............................5alignChromatogramsCpp..................................5AlignObj-class.......................................7alignObj_DIAlignR.....................................8alignTargetedRuns.....................................9areaIntegrator........................................10as.list,AfneAlignObj-method...............................12as.list,AfneAlignObjLight-method............................12as.list,AfneAlignObjMedium-method...........................13as.list,AlignObj-method...................................14childXICs..........................................14constrainSimCpp......................................16createMZML........................................17createSqMass........................................1

3 8DIAlignR...............................
8DIAlignR..........................................19doAfneAlignmentCpp...................................19doAlignmentCpp......................................20getAlignedTimes......................................21getAlignedTimesCpp....................................23getAlignedTimesFast....................................25getAlignObj.........................................26getAlignObjs........................................29getBaseGapPenaltyCpp...................................30getChildXICpp.......................................31getChildXICs........................................33getChromatogramIndices..................................35getChromSimMatCpp....................................36getFeatures.........................................38getGlobalAlignMaskCpp..................................39getGlobalAlignment....................................40getMultipeptide.......................................41getMZMLpointers......................................42getPeptideScores......................................43getPrecursorByID......................................44 AfneAlignObj-class3getPrecursors........................................46getRefRun.....................

4 .....................47getRTdf..........
.....................47getRTdf...........................................48getRunNames........................................49getSeqSimMatCpp.....................................50getTransitions........................................51getXICs...........................................52getXICs4AlignObj.....................................53get_ropenms.........................................54imputeChromatogram....................................55mapIdxToTime.......................................56masterXICs_DIAlignR...................................57mstAlignRuns........................................58multipeptide_DIAlignR...................................59oswFiles_DIAlignR.....................................60otherChildXICpp......................................60paramsDIAlignR......................................62plotAlignedAnalytes....................................64plotAlignmentPath.....................................65plotAnalyteXICs......................................66plotXICgroup........................................67progAlignRuns.......................................68progComb3.........................................70progSplit2........................................

5 ..71progSplit4..........................
..71progSplit4..........................................72progTree1..........................................73recalculateIntensity.....................................74script1............................................75script2............................................76sgolayCpp..........................................77smoothSingleXIC......................................78smoothXICs.........................................79splineFillCpp........................................80trimXICs..........................................81updateFileInfo........................................82XIC_QFNNTDIVLLEDFQK_3_DIAlignR........................83Index84 AffineAlignObj-classAnS4objectforclassAfneAlignObj 4AfneAlignObjLight-classDescriptionsisapoint-wisesimilaritymatrixbetweensignalAandsignalB.IntermediatematricesM,A,Barecalculatedfromsforafne-alignment.EachcelloftheTracebackmatrixhascoordinateofitsparentcell.pathmatrixisabinarymatrixwithonesindicatingpathofmaximumcumulativescore.GapOpenandGapExtenaregap-openingandgap-extensionpenaltiesusedbyafnealignmentalgorithm.indexA_alignedandindexB_alignedarealignedindicesofsignalAandSignalB.Thecumulativealignmentscoreisinscorevector.Author(s)Sh

6 ubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xma
ubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2019-12-14SeeAlsodoAffineAlignmentCpp AffineAlignObjLight-classAnS4objectforclassAfneAlignObjLightItonlycontainsalignedindices. DescriptionindexA_alignedandindexB_alignedarealignedindicesofsignalAandSignalB.Thecumulativealignmentscoreisinscorevector.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2019-12-14SeeAlsodoAffineAlignmentCpp AfneAlignObjMedium-class5 AffineAlignObjMedium-classAnS4objectforclassAfneAlignObjMedium.Itonlycontainssimi-laritymatrixandalignedindices. Descriptionsisapoint-wisesimilaritymatrixbetweensignalAandsignalB.pathmatrixisabinarymatrixwithonesindicatingpathofmaximumcumulativescore.GapOpenandGapExtenaregap-openingandgap-extensionpenaltiesusedbyafnealignmentalgorithm.indexA_alignedandindexB_alignedarealignedindicesofsignalAandSignalB.Thecumulativealignmentscoreisinscorevector.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2019-12-14SeeAlsodoAffineAlignmentCpp ali

7 gnChromatogramsCppAlignsMS2extracted-ion
gnChromatogramsCppAlignsMS2extracted-ionchromatograms(XICs)pair. DescriptionAlignsMS2extracted-ionchromatograms(XICs)pair.UsagealignChromatogramsCpp(l1,l2,alignType,tA,tB,normalization,simType,B1p=0,B2p=0,noBeef=0L,goFactor=0.125,geFactor=40,cosAngleThresh=0.3, 6alignChromatogramsCppOverlapAlignment=TRUE,dotProdThresh=0.96,gapQuantile=0.5,kerLen=9L,hardConstrain=FALSE,samples4gradient=100,objType="heavy")Argumentsl1(list)Alistofnumericvectors.l1andl2shouldhavesamelength.l2(list)Alistofnumericvectors.l1andl2shouldhavesamelength.alignType(char)Acharacterstring.Availablealignmentmethodsare"global","local"and"hybrid".tA(numeric)Anumericvector.ThisvectorhasequallyspacedtimepointsofXICA.tB(numeric)Anumericvector.ThisvectorhasequallyspacedtimepointsofXICB.normalization(char)Acharacterstring.Normalizationmustbeselectedfrom(L2,meanornone).simType(char)Acharacterstring.Similaritytypemustbeselectedfrom(dotProduct-Masked,dotProduct,cosineAngle,cosine2Angle,euclideanDist,covariance,cor-relation,crossCorrelation).Mask=s�quantile(s,dotProdThresh)AllowDotProd=[Mask×cosine2Angle+(1-Mask)]�cosAngleThreshs_new=s×AllowDotProdB1p(numeric)TimepointmappedbyglobaltfortA[1].B2p(numeric)Timepointmappedbygl

8 obaltfortA[length(tA)].noBeef(intege
obaltfortA[length(tA)].noBeef(integer)Itdenesthedistancefromtheglobalt,uptowhichnopenalizationisperformed.Thewindowlength=2*noBeef.goFactor(numeric)Penaltyforintroducingrstgapinalignment.Thisvalueismultipliedbybasegap-penalty.geFactor(numeric)Penaltyforintroducingsubsequentgapsinalignment.Thisvalueismultipliedbybasegap-penalty.cosAngleThresh(numeric)InsimType=dotProductMaskedmode,angularsimilarityshouldbehigherthancosAngleThreshotherwisesimilarityisforcedtozero.OverlapAlignment(logical)Aninputforalignmentwithfreeend-gaps.False:Globalalignment,True:overlapalignment.dotProdThresh(numeric)InsimType=dotProductMaskedmode,valuesinsimilaritymatrixhigherthandotProdThreshquantilearecheckedforangularsimilarity.gapQuantile(numeric)Mustbebetween0and1.Thisisusedtocalculatebasegap-penaltyfromsimilaritydistribution. AlignObj-class7kerLen(integer)InsimType=crossCorrelation,lengthofthekernelusedtosumsimi-larityscore.Mustbeanoddnumber.hardConstrain(logical)iffalse;indicesfartherfromnoBeefdistancearelledwithdistancefromlineartline.samples4gradient(numeric)Thisparametermodulatespenalizationofmaskedindices.objType(char)Acharacterstring.Mustbeeitherlight,mediumorheavy.ValueafneAlignObj(S4class)

9 AS4classobjectfromC++AfneAlignObjstr
AS4classobjectfromC++AfneAlignObjstruct.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+MITDate:2019-03-08Examplesdata(XIC_QFNNTDIVLLEDFQK_3_DIAlignR,package="DIAlignR")XICsXIC_QFNNTDIVLLEDFQK_3_DIAlignRdata(oswFiles_DIAlignR,package="DIAlignR")oswFilesoswFiles_DIAlignRXICs.refXICs[["hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt"]][["4618"]]XICs.eXpXICs[["hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt"]][["4618"]]tVec.refXICs.ref[[1]][["time"]]#ExtractingtimecomponenttVec.eXpXICs.eXp[[1]][["time"]]#ExtractingtimecomponentB1p4964.752B2p5565.462noBeef77.82315/3.414l1lapply(XICs.ref,`[[`,2)l2lapply(XICs.eXp,`[[`,2)AlignObjalignChromatogramsCpp(l1,l2,alignType="hybrid",tA=tVec.ref,tB=tVec.eXp,normalization="mean",simType="dotProductMasked",B1p=B1p,B2p=B2p,noBeef=noBeef,goFactor=0.125,geFactor=40,cosAngleThresh=0.3,OverlapAlignment=TRUE,dotProdThresh=0.96,gapQuantile=0.5,hardConstrain=FALSE,samples4gradient=100,objType="light") AlignObj-classAnS4objectforclassAlignObj Descriptionsisapoint-wisesimilaritymatrixbetweensignalAandsignalB.IntermediatematricesMiscalcu-latedfromsforalignment.EachcelloftheTracebackmatrixhasc

10 oordinateofitsparentcell.pathmatrixisabi
oordinateofitsparentcell.pathmatrixisabinarymatrixwithonesindicatingpathofmaximumcumulativescore.GapOpenandGapExtenaregap-openingandgap-extensionpenaltiesusedbyalignmentalgorithm.Theymustbethesame.indexA_alignedandindexB_alignedarealignedindicesofsignalAandSignalB.Thecumulativealignmentscoreisinscorevector. 8alignObj_DIAlignRAuthor(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2019-12-14SeeAlsodoAlignmentCpp alignObj_DIAlignRAlignmentobjectofapeptide. DescriptionAlignedXICsofpeptide(ID=4618)14299_QFNNTDIVLLEDFQK/3acrosstwoSWATHruns:run1:hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_lt.chrom.mzMLrun2:hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_lt.chrom.mzMLUsagealignObj_DIAlignRFormatAS4objectof16slots:ssimilarityscorematrix.MMatchorMismatchmatrix,residuesofAandBarealignedwithoutagap.M(i,j)=Bestscoreupto(i,j)givenAiisalignedtoBj.AInsertinsequenceA,residueinAisalignedtogapinB.A(i,j)isthebestscoregiventhatAiisalignedtoagapinB.BInsertinsequenceB,residueinBisalignedtogapinA.B(i,j)isthebestscoregiventhatBjisalignedtoagapinA.TracebackTracebackmatricesstoresourcematrixnameanddirectionasmatricesarelledwithdynamicp

11 rogramming.pathPathmatrixwouldrepresenta
rogramming.pathPathmatrixwouldrepresentalignmentpaththroughsimilaritymatrixasbinary-hotencoding.signalA_lenNumberofdata-pointsinsignalA.signalB_lenNumberofdata-pointsinsignalB.GapOpenPenaltyforGapopening.Fornconsecutivegaps:Penalty=GapOpen+(n-1)*GapExten.GapExtenPenaltyforGapextension.Fornconsecutivegaps:Penalty=GapOpen+(n-1)*GapExten.FreeEndGapsTrueforOverlapalignment.indexA_alignedAlignedsignalAindicesafterafnealignment. alignTargetedRuns9indexB_alignedAlignedsignalBindicesafterafnealignment.scoreCumulativescorealongthealignedpath.simScore_forwNotneeded,willberemoved.nGapsTotalnumberofgapsinthealignmentpath.SourceC++codeisexaplainedatDIAlignnamespace.Filetest_GenerateData.Rhassourcecodetogener-atetheexampledata. alignTargetedRunsOutputsintensitiesforeachanalytefromalignedTargeted-MSruns DescriptionThisfunctionexpectsoswandxicsdirectoriesatdataPath.Itrstreadsoswlesandfetcheschromatogramindicesforeachanalyte.ItthenalignXICsofitsreferenceXICs.Bestpeak,whichhaslowestm-score,aboutthealignedretentiontimeispickedforquantication.UsagealignTargetedRuns(dataPath,outFile="DIAlignR",params=paramsDIAlignR(),oswMerged=TRUE,runs=NULL,peps=NULL,refRun=NULL,applyFun=lapply)ArgumentsdataPath(stri

12 ng)pathtoxicsandoswdirectory.outFile(str
ng)pathtoxicsandoswdirectory.outFile(string)nameoftheoutputle.params(list)parametersareenteredaslist.OutputoftheparamsDIAlignRfunction.oswMerged(logical)TRUEforexperiment-wideFDRandFALSEforrun-specicFDRbypyprophet.runs(string)namesofxicslewithoutextension.peps(integer)idsofpeptidestobealigned.IfNULL,alignallpeptides.refRun(string)referenceforalignment.Ifnorunisprovided,m-scoreisusedtoselectreferencerun.applyFun(function)valuemustbeeitherlapplyorBiocParallel::bplapply. 10areaIntegratorValueAnoutputtablewithfollowingcolumns:precursor,run,intensity,RT,leftWidth,rightWidth,peak_group_rank,m_score,alignment_rank,peptide_id,sequence,charge,group_label.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2019-12-14ReferencesGuptaS,AhadiS,ZhouW,RöstH."DIAlignRProvidesPreciseRetentionTimeAlignmentAcrossDistantRunsinDIAandTargetedProteomics."MolCellProteomics.2019Apr;18(4):806-817.doi:https://doi.org/10.1074/mcp.TIR118.001132Epub2019Jan31.SeeAlsogetRunNames,getFeatures,setAlignmentRank,getMultipeptideExamplesparamsparamsDIAlignR()params[["context"]]"experiment-wide"dataPathsystem.file("extdata",package="DIAlignR")B

13 iocParallel::register(BiocParallel::Mult
iocParallel::register(BiocParallel::MulticoreParam(workers=4,progressbar=TRUE))alignTargetedRuns(dataPath,outFile="testDIAlignR",params=params,applyFun=BiocParallel::bplapply) areaIntegratorCalculatesareabetweensignal-boundaries. DescriptionThisfunctionsumsalltheintensitiesbetweenleft-indexandright-index.UsageareaIntegrator(l1,l2,left,right,integrationType,baselineType,fitEMG,baseSubtraction,kernelLen=0L,polyOrd=3L) areaIntegrator11Argumentsl1(list)Alistoftimevectors.l2(list)Alistofintensityvectors.left(numeric)leftboundaryofthepeak.right(numeric)rightboundaryofthepeak.integrationType(string)methodtoomputetheareaofapeakcontainedinXICs.Mustbefrom"intensity_sum","trapezoid","simpson".baselineType(string)methodtoestimatethebackgroundofapeakcontainedinXICs.Mustbefrom"base_to_base","vertical_division_min","vertical_division_max".fitEMG(logical)enable/disableexponentiallymodiedgaussianpeakmodeltting.baseSubtraction(logical)TRUE:removebackgroundfrompeaksignalusingestimatednoiselevels.kernelLen(integer)lengthoflter.Mustbeanoddnumber.polyOrd(integer)TRUE:removebackgroundfrompeaksignalusingestimatednoiselevels.Valuearea(numeric).Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;

14 &#xo.ca;ORCID:0000-0003-3500-8152License
&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+MITDate:2019-03-08Examplesdata("XIC_QFNNTDIVLLEDFQK_3_DIAlignR",package="DIAlignR")XICsXIC_QFNNTDIVLLEDFQK_3_DIAlignR[["hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt"]][["4618"]]l1lapply(XICs,`[[`,1)#timel2lapply(XICs,`[[`,2)#intensityareaIntegrator(l1,l2,left=5203.7,right=5268.5,"intensity_sum","base_to_base",FALSE,TRUE)#66.1048169.3999646.5309516.3426613.1356413.42331areaIntegrator(l1,l2,left=5203.7,right=5268.5,kernelLen=9L,"intensity_sum","base_to_base",FALSE,TRUE)#65.0144971.7443252.7351823.8442017.6186916.48190 12as.list,AfneAlignObjLight-method as.list,AffineAlignObj-methodConvertsinstancesofclassAfneAlignObjintolist DescriptionConvertsinstancesofclassAfneAlignObjintolistUsage##S4methodforsignature'AffineAlignObj'as.list(x)ArgumentsxAnobjectofclassAfneAlignObj.ValuelistAuthor(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2020-03-31 as.list,AffineAlignObjLight-methodConvertsinstancesofclassAfneAlignObjLightintolist DescriptionConvertsinstancesofclassAfneAlignObjLightintolistUsage##S4methodforsignature'AffineAlignObjLight'as.list

15 (x)ArgumentsxAnobjectofclassAfneAlig
(x)ArgumentsxAnobjectofclassAfneAlignObjLight as.list,AfneAlignObjMedium-method13ValuelistAuthor(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2020-03-31 as.list,AffineAlignObjMedium-methodConvertsinstancesofclassAfneAlignObjMediumintolist DescriptionConvertsinstancesofclassAfneAlignObjMediumintolistUsage##S4methodforsignature'AffineAlignObjMedium'as.list(x)ArgumentsxAnobjectofclassAfneAlignObjMediumValuelistAuthor(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2020-03-31 14childXICs as.list,AlignObj-methodConvertsinstancesofclassAlignObjintolist DescriptionConvertsinstancesofclassAlignObjintolistUsage##S4methodforsignature'AlignObj'as.list(x)ArgumentsxAnobjectofclassAlignObjValuelistAuthor(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2020-03-31 childXICsGetchildchromatogramsfromparents DescriptionGetchildchromatogramsfromparentsUsagechildXICs(XICs.ref,XICs.eXp,alignedIndices,method="spline",polyOrd=4,kernelLen=9,splineMethod="fmm",w

16 Ref=0.5, childXICs15mergeStrategy="avg",
Ref=0.5, childXICs15mergeStrategy="avg",keepFlanks=TRUE)ArgumentsXICs.ref(listofdata-frames)extractedionchromatogramsfromreferencerun.XICs.eXp(listofdata-frames)extractedionchromatogramsfromexperimentrun.alignedIndices(data-frame)musthavetwocolumns"indexAligned.ref"and"indexAligned.eXp".method(string)mustbeeither"spline","sgolay"or"linear".polyOrd(integer)mustbelessthankernelLen.kernelLen(integer)mustbeanoddinteger.splineMethod(string)mustbeeither"fmm"or"natural".wRef(numeric)WeightofthereferenceXIC.Mustbebetween0and1.mergeStrategy(string)mustbeeitherref,avg,refStartorrefEnd.keepFlanks(logical)TRUE:Flankingchromatogramisnotremoved.Value(list)therstelementisalistofchromatograms.Thesecondelementisalignedparenttime-vectors.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2020)+GPL-3Date:2020-05-23SeeAlsochildXIC,mergeXICExamplesdata(XIC_QFNNTDIVLLEDFQK_3_DIAlignR,package="DIAlignR")data(alignObj_DIAlignR,package="DIAlignR")XICs.refXIC_QFNNTDIVLLEDFQK_3_DIAlignR[["hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt"]][["4618"]]XICs.eXpXIC_QFNNTDIVLLEDFQK_3_DIAlignR[["hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt"]][["4618"]]al

17 ignedIndicescbind(alignObj_DIAlignR@inde
ignedIndicescbind(alignObj_DIAlignR@indexA_aligned,alignObj_DIAlignR@indexB_aligned)colnames(alignedIndices)c("indexAligned.ref","indexAligned.eXp")alignedIndices[,1:2][alignedIndices[,1:2]==0]NA_integer_newXICschildXICs(XICs.ref,XICs.eXp,alignedIndices)[[1]]plotXICgroup(XICs.ref)plotXICgroup(newXICs) 16constrainSimCpp constrainSimCppConstrainsimilaritymatrixwithamask DescriptionConstrainsimilaritymatrixwithamaskUsageconstrainSimCpp(sim,MASK,samples4gradient=100)Argumentssim(matrix)Anumericmatrix.Inputsimilaritymatrix.MASK(matrix)Anumericmatrix.Maskedindiceshavenon-zerovalues.samples4gradient(numeric)Thispaarametermodulatespenalizationofmaskedindices.Values_new(matrix)Aconstrainedsimilaritymatrix.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+MITDate:2019-03-08Examplessimmatrix(c(-2,10,-2,-2,-2,-2,10,-2,10,-2,-2,-2,-2,-2,-2,10,10,-2,-2,-2),4,5,byrow=FALSE)MASKmatrix(c(0.000,0.000,0.707,1.414,0.000,0.000,0.000,0.707,0.707,0.000,0.000,0.000,1.414,0.707,0,0,2.121,1.414,0,0),4,5,byrow=FALSE)constrainSimCpp(sim,MASK,10)matrix(c(-2,10,-3.414,-4.828,-2,-2,10,-3.414,8.586,-2,-2,-2,-4.828,-3.414,-2,10,5.758,-4.828,-2,-2),4,5,byrow

18 =FALSE) createMZML17 createMZMLCreateanm
=FALSE) createMZML17 createMZMLCreateanmzMLle DescriptionWritesanmzMLlehavingchromatogramsandtheirnativeIDs.UsagecreateMZML(ropenms,filename,XICs,transitionIDs)Argumentsropenms(pyopenmsmodule)getthispythonmodulethroughget_ropenms().filename(string)nameofthemzMLletobewritten.Extensionshouldbe.chrom.mzML.XICs(listoflistofdata-frames)listofextractedionchromatogramsofallprecursors.transitionIDs(listofinteger)lengthmustbethesameasofXICs.Value(None)Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2020)+GPL-3Date:2020-06-06SeeAlsoget_ropenms,addXICExamplesdataPathsystem.file("extdata",package="DIAlignR")filenamepaste0(dataPath,"/xics/hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt.chrom.mzML")data(XIC_QFNNTDIVLLEDFQK_3_DIAlignR)XICsXIC_QFNNTDIVLLEDFQK_3_DIAlignR[["hroest_K120808_Strep10%PlasmaBiolRepl1_R03_SW_filt"]]nativeIdslist(27706:27711)##Notrun:ropenmsget_ropenms(condaEnv="envName")createMZML(ropenms,"testfile.chrom.mzML",XICs,nativeIds)mzR::chromatogramHeader(mzR::openMSfile("testfile.chrom.mzML",backend="pwiz"))file.remove("testfile.chrom.mzML")##End(Notrun) 18createSqMass createSqMassCreateansqMassle Descript

19 ionWritesasqMasslehavingchromatogram
ionWritesasqMasslehavingchromatogramsandtheirnativeIDs.UsagecreateSqMass(filename,XICs,transitionIDs,lossy)Argumentsfilename(string)nameofthemzMLletobewritten.Extensionshouldbe.chrom.sqMass.XICs(listoflistofdata-frames)listofextractedionchromatogramsofallprecursors.transitionIDs(listofinteger)lengthmustbethesameasofXICs.lossy(logical)ifTRUE,timeandintensityarelossy-compressed.Details-compressionisoneof0=no,1=zlib,2=np-linear,3=np-slof,4=np-pic,5=np-linear+zlib,6=np-slof+zlib,7=np-pic+zlib-data_typeisoneof0=mz,1=int,2=rt-datacontainstheraw(blob)dataforasingledataarrayValue(None)Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2021)+GPL-3Date:2021-01-16SeeAlsocreateMZML,blobXICsExamplesdata(XIC_QFNNTDIVLLEDFQK_3_DIAlignR)XICsXIC_QFNNTDIVLLEDFQK_3_DIAlignR[["hroest_K120808_Strep10%PlasmaBiolRepl1_R03_SW_filt"]]XICslist(XICs[[1]],XICs[[1]])nativeIdslist(27706:27711,1:6)sqName"testfile.chrom.sqMass"##Notrun: DIAlignR19createSqMass(sqName,XICs,nativeIds,TRUE)conDBI::dbConnect(RSQLite::SQLite(),dbname=sqName)XIC_groupextractXIC_group2(con,0:5)DBI::dbDisconnect(con)file.remove(sqName)##End(Notrun) DIAlignRDIAlignR DescriptionThis

20 packageimplementsdynamicprogrammingwitha
packageimplementsdynamicprogrammingwithafnegappenaltytondahighest-scoringscoringpath.AhybridapproachofglobalalignmentthroughMS2featuresandlocalalignmentwithMS2chromatogramsisimplementedinthistool.Author(s)ShubhamGupta,HannesRost doAffineAlignmentCppPerformafneglobalandoverlapalignmentonasimilaritymatrix DescriptionPerformafneglobalandoverlapalignmentonasimilaritymatrixUsagedoAffineAlignmentCpp(sim,go,ge,OverlapAlignment)Argumentssim(NumericMatrix)Anumericmatrixwithsimilarityvaluesoftwosequencesorsignals.go(numeric)Penaltyforintroducingrstgapinalignment.ge(numeric)Penaltyforintroducingsubsequentgapsinalignment.OverlapAlignment(logical)Aninputforalignmentwithfreeend-gaps.False:Globalalignment,True:overlapalignment.ValueafneAlignObj(S4class)AnobjectfromC++classofAfneAlignObj. 20doAlignmentCppAuthor(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+MITDate:2019-03-08Examples#GetsequencesimilarityoftwoDNAstringsMatch=10;MisMatch=-2seq1="GCAT";seq2="CAGTG"sgetSeqSimMatCpp(seq1,seq2,Match,MisMatch)objAffine_GlobaldoAffineAlignmentCpp(s,22,7,FALSE)slot(objAffine_Global,"score")#-2-4-64-18objAffine_OlapdoAffineAl

21 ignmentCpp(s,22,7,TRUE)slot(objAffine_Ol
ignmentCpp(s,22,7,TRUE)slot(objAffine_Olap,"score")#01020181818Match=10;MisMatch=-2seq1="CAT";seq2="CAGTG"sgetSeqSimMatCpp(seq1,seq2,Match,MisMatch)objAffine_GlobaldoAffineAlignmentCpp(s,22,7,FALSE)slot(objAffine_Global,"score")#1020-2-9-11objAffine_OlapdoAffineAlignmentCpp(s,22,7,TRUE)slot(objAffine_Olap,"score")#1020181818Match=10;MisMatch=-2seq1="CA";seq2="AG"sgetSeqSimMatCpp(seq1,seq2,Match,MisMatch)objAffine_GlobaldoAffineAlignmentCpp(s,22,7,FALSE)slot(objAffine_Global,"simScore_forw")#-4 doAlignmentCppPerformnon-afneglobalandoverlapalignmentonasimilarityma-trix DescriptionPerformnon-afneglobalandoverlapalignmentonasimilaritymatrixUsagedoAlignmentCpp(sim,gap,OverlapAlignment)Argumentssim(NumericMatrix)Anumericmatrixwithsimilarityvaluesoftwosequencesorsignals.gap(double)Penaltyforintroducinggapsinalignment.OverlapAlignment(logical)Aninputforalignmentwithfreeend-gaps.False:Globalalignment,True:overlapalignment. getAlignedTimes21ValueAlignObj(S4class)AnobjectfromC++classofAlignObj.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+MITDate:2019-03-08Examples#GetsequencesimilarityoftwoDNAstringsMatch=10;MisMatch=-2seq

22 1="GCAT";seq2="CAGTG"sgetSeqSimMatCpp(se
1="GCAT";seq2="CAGTG"sgetSeqSimMatCpp(seq1,seq2,Match,MisMatch)obj_GlobaldoAlignmentCpp(s,22,FALSE)slot(obj_Global,"score")#-2-4-64-18obj_OlapdoAlignmentCpp(s,22,TRUE)slot(obj_Olap,"score")#01020181818Match=1;MisMatch=-1seq1="TTTC";seq2="TGC"sgetSeqSimMatCpp(seq1,seq2,Match,MisMatch)obj_GlobaldoAlignmentCpp(s,2,FALSE)slot(obj_Global,"optionalPaths")matrix(data=c(1,1,1,1,1,1,1,1,1,2,1,2,1,3,3,1,1,3,6,3),nrow=5,ncol=4,byrow=TRUE)slot(obj_Global,"M_forw")matrix(data=c(0,-2,-4,-6,-2,-7,-22,-45,-4,-20,-72,-184,-6,-41,-178,-547,-8,-72,-366,-1274),nrow=5,ncol=4,byrow=TRUE) getAlignedTimesGetalignedRetentiontimes. DescriptionThisfunctionalignsXICsofreferenceandexperimentruns.Itproducesalignedretentiontimesbetweenreferncerunandexperimentrun.UsagegetAlignedTimes(XICs.ref,XICs.eXp,globalFit,alignType,adaptiveRT,normalization,simMeasure,goFactor, 22getAlignedTimesgeFactor,cosAngleThresh,OverlapAlignment,dotProdThresh,gapQuantile,kerLen,hardConstrain,samples4gradient,objType="light")ArgumentsXICs.refListofextractedionchromatogramsfromreferencerun.XICs.eXpListofextractedionchromatogramsfromexperimentrun.globalFitLinearorloesstobjectbetweenreferenceandexperimentrun.alignTypeAvailablealignmentmethodsare"global",

23 "local"and"hybrid".adaptiveRT(numeric)Si
"local"and"hybrid".adaptiveRT(numeric)SimilaritymatrixisnotpenalizedwithinadaptiveRT.normalization(character)Mustbeselectedfrom"mean","l2".simMeasure(string)MustbeselectedfromdotProduct,cosineAngle,crossCorrelation,co-sine2Angle,dotProductMasked,euclideanDist,covarianceandcorrelation.goFactor(numeric)Penaltyforintroducingrstgapinalignment.Thisvalueismultipliedbybasegap-penalty.geFactor(numeric)Penaltyforintroducingsubsequentgapsinalignment.Thisvalueismultipliedbybasegap-penalty.cosAngleThresh(numeric)InsimType=dotProductMaskedmode,angularsimilarityshouldbehigherthancosAngleThreshotherwisesimilarityisforcedtozero.OverlapAlignment(logical)Aninputforalignmentwithfreeend-gaps.False:Globalalignment,True:overlapalignment.dotProdThresh(numeric)InsimType=dotProductMaskedmode,valuesinsimilaritymatrixhigherthandotProdThreshquantilearecheckedforangularsimilarity.gapQuantile(numeric)Mustbebetween0and1.Thisisusedtocalculatebasegap-penaltyfromsimilaritydistribution.kerLen(integer)InsimType=crossCorrelation,lengthofthekernelusedtosumsimi-larityscore.Mustbeanoddnumber.hardConstrain(logical)IfFALSE;indicesfartherfromnoBeefdistancearelledwithdistancefromlineartline.samples4gradient(numeric)Thisparametermod

24 ulatespenalizationofmaskedindices.objTyp
ulatespenalizationofmaskedindices.objType(char)Mustbeselectedfromlight,mediumandheavy.Value(list)therstelementcorrespondstothealignedreferencetime,thesecondelementisthealignedexperimenttime. getAlignedTimesCpp23Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2019-12-13SeeAlsoalignChromatogramsCpp,getAlignObjExamplesdata(XIC_QFNNTDIVLLEDFQK_3_DIAlignR,package="DIAlignR")data(oswFiles_DIAlignR,package="DIAlignR")run1"hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt"run2"hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt"XICs.refXIC_QFNNTDIVLLEDFQK_3_DIAlignR[[run1]][["4618"]]XICs.eXpXIC_QFNNTDIVLLEDFQK_3_DIAlignR[[run2]][["4618"]]RUNS_RTgetRTdf(oswFiles_DIAlignR,ref="run1",eXp="run2",maxFdrGlobal=0.05)globalFitloess(RT.eXp~RT.ref,data=RUNS_RT,span=0.1,control=loess.control(surface="direct"))adaptiveRT77.82315#3.5*globalFit$sgetAlignedTimes(XICs.ref,XICs.eXp,globalFit,alignType="hybrid",adaptiveRT=adaptiveRT,normalization="mean",simMeasure="dotProductMasked",goFactor=0.125,geFactor=40,cosAngleThresh=0.3,OverlapAlignment=TRUE,dotProdThresh=0.96,gapQuantile=0.5,kerLen=9L,hardConstrain=FALSE,samples4gradient=100)

25 getAlignedTimesCppGetalignedindicesfromM
getAlignedTimesCppGetalignedindicesfromMS2extracted-ionchromatograms(XICs)pair. DescriptionGetalignedindicesfromMS2extracted-ionchromatograms(XICs)pair.UsagegetAlignedTimesCpp(l1,l2,kernelLen,polyOrd,alignType,adaptiveRT,normalization,simType,B1p=0,B2p=0, 24getAlignedTimesCppgoFactor=0.125,geFactor=40,cosAngleThresh=0.3,OverlapAlignment=TRUE,dotProdThresh=0.96,gapQuantile=0.5,kerLen=9L,hardConstrain=FALSE,samples4gradient=100)Argumentsl1(list)Alistofnumericmatrixoftwocolumns.l1andl2shouldhavesamelength.l2(list)Alistofnumericmatrixoftwocolumns.l1andl2shouldhavesamelength.kernelLen(integer)lengthoflter.Mustbeanoddnumber.polyOrd(integer)TRUE:removebackgroundfrompeaksignalusingestimatednoiselevels.alignType(char)Acharacterstring.Availablealignmentmethodsare"global","local"and"hybrid".adaptiveRT(numeric)SimilaritymatrixisnotpenalizedwithinadaptiveRT.normalization(char)Acharacterstring.Normalizationmustbeselectedfrom(L2,meanornone).simType(char)Acharacterstring.Similaritytypemustbeselectedfrom(dotProduct-Masked,dotProduct,cosineAngle,cosine2Angle,euclideanDist,covariance,cor-relation,crossCorrelation).Mask=s�quantile(s,dotProdThresh)AllowDotProd=[Mask×cosine2Angle+(1-Mask)]�cosAngleThres

26 hs_new=s×AllowDotProdB1p(numeric)Timepo
hs_new=s×AllowDotProdB1p(numeric)TimepointmappedbyglobaltfortA[1].B2p(numeric)TimepointmappedbyglobaltfortA[length(tA)].goFactor(numeric)Penaltyforintroducingrstgapinalignment.Thisvalueismultipliedbybasegap-penalty.geFactor(numeric)Penaltyforintroducingsubsequentgapsinalignment.Thisvalueismultipliedbybasegap-penalty.cosAngleThresh(numeric)InsimType=dotProductMaskedmode,angularsimilarityshouldbehigherthancosAngleThreshotherwisesimilarityisforcedtozero.OverlapAlignment(logical)Aninputforalignmentwithfreeend-gaps.False:Globalalignment,True:overlapalignment.dotProdThresh(numeric)InsimType=dotProductMaskedmode,valuesinsimilaritymatrixhigherthandotProdThreshquantilearecheckedforangularsimilarity. getAlignedTimesFast25gapQuantile(numeric)Mustbebetween0and1.Thisisusedtocalculatebasegap-penaltyfromsimilaritydistribution.kerLen(integer)InsimType=crossCorrelation,lengthofthekernelusedtosumsimi-larityscore.Mustbeanoddnumber.hardConstrain(logical)iffalse;indicesfartherfromnoBeefdistancearelledwithdistancefromlineartline.samples4gradient(numeric)Thisparametermodulatespenalizationofmaskedindices.ValueNumericMatrixAlignedindicesofl1andl2.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.

27 uto;&#xront;&#xo.ca;ORCID:0000-0003-3500
uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+MITDate:2019-03-08Examplesdata(XIC_QFNNTDIVLLEDFQK_3_DIAlignR,package="DIAlignR")XICsXIC_QFNNTDIVLLEDFQK_3_DIAlignRXICs.reflapply(XICs[["hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt"]][["4618"]],as.matrix)XICs.eXplapply(XICs[["hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt"]][["4618"]],as.matrix)B1p4964.752B2p5565.462timegetAlignedTimesCpp(XICs.ref,XICs.eXp,11,4,alignType="hybrid",adaptiveRT=77.82315,normalization="mean",simType="dotProductMasked",B1p=B1p,B2p=B2p,goFactor=0.125,geFactor=40,cosAngleThresh=0.3,OverlapAlignment=TRUE,dotProdThresh=0.96,gapQuantile=0.5,hardConstrain=FALSE,samples4gradient=100) getAlignedTimesFastGetalignedRetentiontimes. DescriptionThisfunctionalignsXICsofreferenceandexperimentruns.Itproducesalignedretentiontimesbetweenreferncerunandexperimentrun.UsagegetAlignedTimesFast(XICs.ref,XICs.eXp,globalFit,adaptiveRT,params) 26getAlignObjArgumentsXICs.refListofextractedionchromatogramsfromreferencerun.XICs.eXpListofextractedionchromatogramsfromexperimentrun.globalFitLinearorloesstobjectbetweenreferenceandexperimentrun.adaptiveRT(numeric)SimilaritymatrixisnotpenalizedwithinadaptiveRT.params(list)para

28 metersareenteredaslist.Outputoftheparams
metersareenteredaslist.OutputoftheparamsDIAlignRfunction.Value(matrix)therstcolumncorrespondstothealignedreferencetime,thesecondcolumnisthealignedexperimenttime.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2021)+GPL-3Date:2021-01-02SeeAlsoalignChromatogramsCpp,getAlignObjExamplesdata(XIC_QFNNTDIVLLEDFQK_3_DIAlignR,package="DIAlignR")data(oswFiles_DIAlignR,package="DIAlignR")run1"hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt"run2"hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt"XICs.reflapply(XIC_QFNNTDIVLLEDFQK_3_DIAlignR[[run1]][["4618"]],as.matrix)XICs.eXplapply(XIC_QFNNTDIVLLEDFQK_3_DIAlignR[[run2]][["4618"]],as.matrix)paramsparamsDIAlignR()params[["globalAlignment"]]"linear"globalFitgetGlobalAlignment(oswFiles_DIAlignR,ref="run2",eXp="run0",fitType=params[["globalAlignment"]],maxFdrGlobal=0.05,spanvalue=0.1)adaptiveRT77.82315#3.5*getRSE(globalFit,params[["globalAlignment"]])globalFitcoef(globalFit)getAlignedTimesFast(XICs.ref,XICs.eXp,globalFit,adaptiveRT,params) getAlignObjOutputsAlignObjfromanalignmentoftwoXIC-groups DescriptionOutputsAlignObjfromanalignmentoftwoXIC-groups getAlignObj27UsagegetAlignObj(XICs.re

29 f,XICs.eXp,globalFit,alignType,adaptiveR
f,XICs.eXp,globalFit,alignType,adaptiveRT,normalization,simType,goFactor,geFactor,cosAngleThresh,OverlapAlignment,dotProdThresh,gapQuantile,kerLen,hardConstrain,samples4gradient,objType="light")ArgumentsXICs.refListofextractedionchromatogramsfromreferencerun.XICs.eXpListofextractedionchromatogramsfromexperimentrun.globalFitLinearorloesstobjectbetweenreferenceandexperimentrun.alignTypeAvailablealignmentmethodsare"global","local"and"hybrid".adaptiveRT(numeric)SimilaritymatrixisnotpenalizedwithinadaptiveRT.normalization(character)Mustbeselectedfrom"mean","l2".simType(string)MustbeselectedfromdotProduct,cosineAngle,crossCorrelation,co-sine2Angle,dotProductMasked,euclideanDist,covarianceandcorrelation.goFactor(numeric)Penaltyforintroducingrstgapinalignment.Thisvalueismultipliedbybasegap-penalty.geFactor(numeric)Penaltyforintroducingsubsequentgapsinalignment.Thisvalueismultipliedbybasegap-penalty.cosAngleThresh(numeric)InsimType=dotProductMaskedmode,angularsimilarityshouldbehigherthancosAngleThreshotherwisesimilarityisforcedtozero.OverlapAlignment(logical)Aninputforalignmentwithfreeend-gaps.False:Globalalignment,True:overlapalignment.dotProdThresh(numeric)InsimType=dotProductMaskedmode,valuesinsimi

30 laritymatrixhigherthandotProdThreshquant
laritymatrixhigherthandotProdThreshquantilearecheckedforangularsimilarity.gapQuantile(numeric)Mustbebetween0and1.Thisisusedtocalculatebasegap-penaltyfromsimilaritydistribution. 28getAlignObjkerLen(integer)InsimType=crossCorrelation,lengthofthekernelusedtosumsimi-larityscore.Mustbeanoddnumber.hardConstrain(logical)IfFALSE;indicesfartherfromnoBeefdistancearelledwithdistancefromlineartline.samples4gradient(numeric)Thisparametermodulatespenalizationofmaskedindices.objType(char)Mustbeselectedfromlight,mediumandheavy.ValueAS4object.Threemost-importantslotsare:indexA_aligned(integer)alignedindicesofreferencerun.indexB_aligned(integer)alignedindicesofexperimentrun.score(numeric)cumulativescoreofalignment.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2019-12-13SeeAlsoalignChromatogramsCppExamplesdata(XIC_QFNNTDIVLLEDFQK_3_DIAlignR,package="DIAlignR")data(oswFiles_DIAlignR,package="DIAlignR")run1"hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt"run2"hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt"XICs.refXIC_QFNNTDIVLLEDFQK_3_DIAlignR[[run1]][["4618"]]XICs.eXpXIC_QFNNTDIVLLEDFQK_3_DIAlignR[[run2]][["4618"]]RU

31 NS_RTgetRTdf(oswFiles_DIAlignR,ref="run1
NS_RTgetRTdf(oswFiles_DIAlignR,ref="run1",eXp="run2",maxFdrGlobal=0.05)globalFitloess(RT.eXp~RT.ref,data=RUNS_RT,span=0.1,control=loess.control(surface="direct"))AlignObjgetAlignObj(XICs.ref,XICs.eXp,globalFit,alignType="hybrid",adaptiveRT=77.82315,normalization="mean",simType="dotProductMasked",goFactor=0.125,geFactor=40,cosAngleThresh=0.3,OverlapAlignment=TRUE,dotProdThresh=0.96,gapQuantile=0.5,kerLen=9L,hardConstrain=FALSE,samples4gradient=100,objType="light") getAlignObjs29 getAlignObjsAlignObjforanalytesbetweenapairofruns DescriptionThisfunctionexpectsoswandxicsdirectoriesatdataPath.Itrstreadsoswlesandfetcheschro-matogramindicesforeachrequestedanalyte.ItthenalignXICsofeachanalytetoitsreferenceXICs.AlignObjisreturnedwhichcontainsalignedindicesandcumulativescorealongthealign-mentpath.UsagegetAlignObjs(analytes,runs,dataPath=".",refRun=NULL,oswMerged=TRUE,params=paramsDIAlignR(),objType="light")Argumentsanalytes(vectorofintegers)transition_group_idsforwhichfeaturesaretobeextracted.runs(string)namesofxicslewithoutextension.dataPath(string)pathtoxicsandoswdirectory.refRun(string)referenceforalignment.Ifnorunisprovided,m-scoreisusedtoselectreferencerun.oswMerged(logical)TRUEforexperiment-w

32 ideFDRandFALSEforrun-specicFDRbypypr
ideFDRandFALSEforrun-specicFDRbypyprophet.params(list)parametersareenteredaslist.OutputoftheparamsDIAlignRfunction.objType(char)Mustbeselectedfromlight,mediumandheavy.ValueAlistofleInfoandAlignObjs.EachAlignObjisanS4object.Threemost-importantslotsare:indexA_aligned(integer)alignedindicesofreferencerun.indexB_aligned(integer)alignedindicesofexperimentrun.score(numeric)cumulativescoreofalignment. 30getBaseGapPenaltyCppAuthor(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2019-12-14ReferencesGuptaS,AhadiS,ZhouW,RöstH."DIAlignRProvidesPreciseRetentionTimeAlignmentAcrossDistantRunsinDIAandTargetedProteomics."MolCellProteomics.2019Apr;18(4):806-817.doi:https://doi.org/10.1074/mcp.TIR118.001132Epub2019Jan31.SeeAlsoplotAlignedAnalytes,getRunNames,getFeatures,getXICs4AlignObj,getAlignObjExamplesdataPathsystem.file("extdata",package="DIAlignR")paramsparamsDIAlignR()params[["context"]]"experiment-wide"runsc("hroest_K120808_Strep10%PlasmaBiolRepl1_R03_SW_filt","hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt","hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt")analytesc(32L,898L,2474L)AlignObjOutputgetAlignObjs(analyte

33 s,runs,dataPath=dataPath)plotAlignedAnal
s,runs,dataPath=dataPath)plotAlignedAnalytes(AlignObjOutput) getBaseGapPenaltyCppCalculatesgappenaltyfordynamicprogrammingbasedalignment. DescriptionThisfunctionoutputsbasegap-penaltydependingonSimTypeused.Incaseofgettingbasegap-penaltyfromsimilaritymatrixdistribution,gapQuantilewillbeusedtopickthevalue.UsagegetBaseGapPenaltyCpp(sim,SimType,gapQuantile=0.5)Argumentssim(matrix)Anumericmatrix.Inputsimilaritymatrix.SimType(char)Acharacterstring.Similaritytypemustbeselectedfrom(dotProduct-Masked,dotProduct,cosineAngle,cosine2Angle,euclideanDist,covariance,cor-relation,crossCorrelation).gapQuantile(numeric)Mustbebetween0and1. getChildXICpp31ValuebaseGapPenalty(numeric).Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+MITDate:2019-03-08Examplessimmatrix(c(-12,1.0,12,-2.3,-2,-2,1.07,-2,1.80,2,22,42,-2,-1.5,-2,10),4,4,byrow=FALSE)getBaseGapPenaltyCpp(sim,"dotProductMasked",0.5)#-0.25 getChildXICppGetchildchromatogramfromtwoparentchromatogram DescriptionGetchildchromatogramfromtwoparentchromatogramUsagegetChildXICpp(l1,l2,kernelLen,polyOrd,alignType,adaptiveRT,normalization,simType,B1p=0,B2p=0,goFactor=0.125,geFactor=40,cosAngleThre

34 sh=0.3,OverlapAlignment=TRUE,dotProdThre
sh=0.3,OverlapAlignment=TRUE,dotProdThresh=0.96,gapQuantile=0.5,kerLen=9L,hardConstrain=FALSE,samples4gradient=100,wRef=0.5,splineMethod="natural",mergeStrategy="avg",keepFlanks=TRUE) 32getChildXICppArgumentsl1(list)Alistofnumericmatrixoftwocolumns.l1andl2shouldhavesamelength.l2(list)Alistofnumericmatrixoftwocolumns.l1andl2shouldhavesamelength.kernelLen(integer)lengthoflter.Mustbeanoddnumber.polyOrd(integer)TRUE:removebackgroundfrompeaksignalusingestimatednoiselevels.alignType(char)Acharacterstring.Availablealignmentmethodsare"global","local"and"hybrid".adaptiveRT(numeric)SimilaritymatrixisnotpenalizedwithinadaptiveRT.normalization(char)Acharacterstring.Normalizationmustbeselectedfrom(L2,meanornone).simType(char)Acharacterstring.Similaritytypemustbeselectedfrom(dotProduct-Masked,dotProduct,cosineAngle,cosine2Angle,euclideanDist,covariance,cor-relation,crossCorrelation).Mask=s�quantile(s,dotProdThresh)AllowDotProd=[Mask×cosine2Angle+(1-Mask)]�cosAngleThreshs_new=s×AllowDotProdB1p(numeric)TimepointmappedbyglobaltfortA[1].B2p(numeric)TimepointmappedbyglobaltfortA[length(tA)].goFactor(numeric)Penaltyforintroducingrstgapinalignment.Thisvalueismultipliedbybasegap-penalty.geF

35 actor(numeric)Penaltyforintroducingsubse
actor(numeric)Penaltyforintroducingsubsequentgapsinalignment.Thisvalueismultipliedbybasegap-penalty.cosAngleThresh(numeric)InsimType=dotProductMaskedmode,angularsimilarityshouldbehigherthancosAngleThreshotherwisesimilarityisforcedtozero.OverlapAlignment(logical)Aninputforalignmentwithfreeend-gaps.False:Globalalignment,True:overlapalignment.dotProdThresh(numeric)InsimType=dotProductMaskedmode,valuesinsimilaritymatrixhigherthandotProdThreshquantilearecheckedforangularsimilarity.gapQuantile(numeric)Mustbebetween0and1.Thisisusedtocalculatebasegap-penaltyfromsimilaritydistribution.kerLen(integer)InsimType=crossCorrelation,lengthofthekernelusedtosumsimi-larityscore.Mustbeanoddnumber.hardConstrain(logical)iffalse;indicesfartherfromnoBeefdistancearelledwithdistancefromlineartline.samples4gradient(numeric)Thisparametermodulatespenalizationofmaskedindices.wRef(numeric)WeightofthereferenceXIC.Mustbebetween0and1.splineMethod(string)mustbeeither"fmm"or"natural".mergeStrategy(string)mustbeeitherref,avg,refStartorrefEnd.keepFlanks(logical)TRUE:Flankingchromatogramisnotremoved. getChildXICs33Value(List)ofchromatogramsandtheiralignedtimevectors.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#x

36 ront;&#xo.ca;ORCID:0000-0003-3500-8152Li
ront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2021)+MITDate:2021-01-08Examplesdata(XIC_QFNNTDIVLLEDFQK_3_DIAlignR,package="DIAlignR")XICsXIC_QFNNTDIVLLEDFQK_3_DIAlignRXICs.reflapply(XICs[["hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt"]][["4618"]],as.matrix)XICs.eXplapply(XICs[["hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt"]][["4618"]],as.matrix)B1p4964.752B2p5565.462chromgetChildXICpp(XICs.ref,XICs.eXp,11L,4L,alignType="hybrid",adaptiveRT=77.82315,normalization="mean",simType="dotProductMasked",B1p=B1p,B2p=B2p,goFactor=0.125,geFactor=40,cosAngleThresh=0.3,OverlapAlignment=TRUE,dotProdThresh=0.96,gapQuantile=0.5,hardConstrain=FALSE,samples4gradient=100,wRef=0.5,keepFlanks=TRUE) getChildXICsDevelopchildXICsforprecursors DescriptionThisfunctionperformsthechromatogramalignmentofallprecursorsacrossrunAandrunB.Alignedchromatogramsaremergedintoachildchromatogram.Alignedtimevectorandresultingchildtimevectorforeachprecursorisalsoreturned.UsagegetChildXICs(runA,runB,fileInfo,features,mzPntrs,precursors,prec2chromIndex,refRun,peptideScores,params,applyFun=lapply) 34getChildXICsArgumentsrunA(string)nameofaruntobemergedwithrunB.MustbeintherownamesofleInfo.runB(string)nameofaruntobemergedw

37 ithrunA.MustbeintherownamesofleInfo.
ithrunA.MustbeintherownamesofleInfo.fileInfo(data-frame)outputofgetRunNames.features(listofdata-frames)containsfeaturesandtheirpropertiesidentiedineachrun.mzPntrs(list)alistofmzRpwiz.precursors(data-frame)atleasttwocolumnstransition_group_idandtransition_idsarere-quired.prec2chromIndex(list)alistofdataframeshavingfollowingcolumns:transition_group_id:itisPRECURSOR.IDfromoswle.chromatogramIndex:indexofchromatograminmzMLle.refRun(integer)mustbeofthesamelengthasofprecursors.1:referenceisrunA,2:referenceisrunB.peptideScores(listofdata-frames)eachdataframehasscoresofapeptideacrossallruns.params(list)parametersareenteredaslist.OutputoftheparamsDIAlignRfunction.applyFun(function)valuemustbeeitherlapplyorBiocParallel::bplapply.Value(list)hasthreeelements.TherstelementhaschildXICsforalltheprecursors.Thesecondelementhascorrespondingalignedtimevectors.ThirdelementcontainsResidualStandardErrors(RSE)ofglobaltsamongstrunAandrunB.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2020)+GPL-3Date:2020-06-06SeeAlsochildXICs,getNodeRunExamplesdataPathsystem.file("extdata",package="DIAlignR")paramsparamsDIAlignR()fileInfoDIAlig

38 nR::getRunNames(dataPath=dataPath)mzPntr
nR::getRunNames(dataPath=dataPath)mzPntrsgetMZMLpointers(fileInfo)featuresgetFeatures(fileInfo,maxFdrQuery=1.00,runType="DIA_Proteomics")precursorsgetPrecursors(fileInfo,oswMerged=TRUE,runType="DIA_Proteomics",context="experiment-wide",maxPeptideFdr=0.05)precursorsdplyr::arrange(precursors,.data$peptide_id,.data$transition_group_id) getChromatogramIndices35peptideIDsunique(precursors$peptide_id)peptideScoresgetPeptideScores(fileInfo,peptideIDs,oswMerged=TRUE,params[["runType"]],params[["context"]])peptideScoreslapply(peptideIDs,function(pep)dplyr::filter(peptideScores,.data$peptide_id==pep))names(peptideScores)as.character(peptideIDs)prec2chromIndexgetChromatogramIndices(fileInfo,precursors,mzPntrs)var2as.character(sapply(peptideIDs,function(p)precursors$transition_group_id[which(precursors$peptide_id==p)[1]]))refRundata.frame(rep(1L,length(peptideIDs)),var2)mergedXICsgetChildXICs(runA="run1",runB="run2",fileInfo,features,mzPntrs,precursors,prec2chromIndex,refRun,peptideScores,params)for(coninmzPntrs)DBI::dbDisconnect(con) getChromatogramIndicesGetchromatogramindicesofprecursors. DescriptionThisfunctionreadstheheaderofchromatogramles.Itthenfetcheschromatogramindicesbymatchingtransition_id(osw)wit

39 hchromatogramID(xics).UsagegetChromatogr
hchromatogramID(xics).UsagegetChromatogramIndices(fileInfo,precursors,mzPntrs,applyFun=lapply)ArgumentsfileInfo(data-frame)OutputofgetRunNamesfunction.precursors(data-frame)Atleasttwocolumnstransition_group_idandtransition_idsarere-quired.mzPntrsAlistofmzRpwiz.applyFun(function)valuemustbeeitherlapplyorBiocParallel::bplapply.Value(list)Alistofdataframeshavingfollowingcolumns:transition_group_id(string)itisPRECURSOR.IDfromoswle.chromatogramIndex(integer)indexofchromatograminmzMLle.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2019-04-07 36getChromSimMatCppSeeAlsochromatogramIdAsInteger,mapPrecursorToChromIndicesExamplesdataPathsystem.file("extdata",package="DIAlignR")fileInfogetRunNames(dataPath=dataPath)precursorsgetPrecursors(fileInfo,oswMerged=TRUE,context="experiment-wide")mzPntrsgetMZMLpointers(fileInfo)prec2chromIndexgetChromatogramIndices(fileInfo,precursors,mzPntrs)for(mzinmzPntrs)DBI::dbDisconnect(mz) getChromSimMatCppCalculatessimilaritymatrixoftwofragment-ionchromatogramgroupsorextracted-ionchromatograms(XICs) DescriptionCalculatessimilaritymatrixoftwofragment-ionchromatogramgroupsorextracted-

40 ionchromatograms(XICs)UsagegetChromSimMa
ionchromatograms(XICs)UsagegetChromSimMatCpp(l1,l2,normalization,simType,cosAngleThresh=0.3,dotProdThresh=0.96,kerLen=9L)Argumentsl1(list)Alistofvectors.Lengthshouldbesameasofl2.l2(list)Alistofvectors.Lengthshouldbesameasofl1.normalization(char)Acharacterstring.Normalizationmustbeselectedfrom(L2,meanornone).simType(char)Acharacterstring.Similaritytypemustbeselectedfrom(dotProduct-Masked,dotProduct,cosineAngle,cosine2Angle,euclideanDist,covariance,cor-relation,crossCorrelation).Mask=s�quantile(s,dotProdThresh)AllowDotProd=[Mask×cosine2Angle+(1-Mask)]�cosAngleThreshs_new=s×AllowDotProdcosAngleThresh(numeric)InsimType=dotProductMaskedmode,angularsimilarityshouldbehigherthancosAngleThreshotherwisesimilarityisforcedtozero. getChromSimMatCpp37dotProdThresh(numeric)InsimType=dotProductMaskedmode,valuesinsimilaritymatrixhigherthandotProdThreshquantilearecheckedforangularsimilarity.kerLen(integer)InsimType=crossCorrelation,lengthofthekernelusedtosumsimi-larityscore.Mustbeanoddnumber.Values(matrix)Numericsimilaritymatrix.Rowsandcolumnsexpressesseq1andseq2,respectively.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+M

41 ITDate:2019-03-05Examples#Getsimilaritym
ITDate:2019-03-05Examples#Getsimilaritymatrixofdummychromatogramsr1list(c(1.0,3.0,2.0,4.0),c(0.0,0.0,0.0,1.0),c(4.0,4.0,4.0,5.0))r2list(c(1.4,2.0,1.5,4.0),c(0.0,0.5,0.0,0.0),c(2.0,3.0,4.0,0.9))round(getChromSimMatCpp(r1,r2,"L2","dotProductMasked"),3)matrix(c(0.125,0.162,0.144,0.208,0.186,0.240,0.213,0.313,0.233,0.273,0.253,0.346,0.101,0.208,0.154,0.273),4,4,byrow=FALSE)round(getChromSimMatCpp(r1,r2,"L2","dotProduct"),3)matrix(c(0.125,0.162,0.144,0.208,0.186,0.240,0.213,0.313,0.233,0.273,0.253,0.346,0.101,0.208,0.154,0.273),4,4,byrow=FALSE)round(getChromSimMatCpp(r1,r2,"L2","cosineAngle"),3)matrix(c(0.934,0.999,0.989,0.986,0.933,0.989,0.983,0.996,0.994,0.960,0.995,0.939,0.450,0.761,0.633,0.772),4,4,byrow=FALSE)round(getChromSimMatCpp(r1,r2,"L2","cosine2Angle"),3)matrix(c(0.744,0.998,0.957,0.944,0.740,0.956,0.932,0.985,0.974,0.842,0.978,0.764,-0.596,0.158,-0.200,0.190),4,4,byrow=FALSE)round(getChromSimMatCpp(r1,r2,"mean","euclideanDist"),3)matrix(c(0.608,0.614,0.680,0.434,0.530,0.742,0.659,0.641,0.520,0.541,0.563,0.511,0.298,0.375,0.334,0.355),4,4,byrow=FALSE)round(getChromSimMatCpp(r1,r2,"L2","covariance"),3)matrix(c(0.025,0.028,0.027,0.028,0.032,0.034,0.033,0.034,0.055,0.051,0.053,0.051,-0.004,0.028,

42 0.012,0.028),4,4,byrow=FALSE)round(getCh
0.012,0.028),4,4,byrow=FALSE)round(getChromSimMatCpp(r1,r2,"L2","correlation"),3)matrix(c(0.874,0.999,0.974,0.999,0.923,0.986,0.993,0.986,0.991,0.911,0.990,0.911,-0.065,0.477,0.214,0.477),4,4,byrow=FALSE) 38getFeatures getFeaturesGetfeaturesfromallfeatureles DescriptionGetalistofdata-frameofOpenSwathfeaturesthatcontainsretentiontime,intensities,boundariesetc.UsagegetFeatures(fileInfo,maxFdrQuery=0.05,maxIPFFdrQuery=0.05,runType="DIA_Proteomics",applyFun=lapply)ArgumentsfileInfo(data-frame)outputofgetRunNamesfunction.maxFdrQuery(numeric)anumericvaluebetween0and1.ItisusedtolterfeaturesfromoswlewhichhaveSCORE_MS2.QVALUElessthanitself.maxIPFFdrQuery(numeric)Anumericvaluebetween0and1.ItisusedtolterfeaturesfromoswlewhichhaveSCORE_IPF.QVALUElessthanitself.(ForPTMIPFuse)runType(char)Thismustbeoneofthestrings"DIA_Proteomics","DIA_IPF","DIA_Metabolomics".applyFun(function)valuemustbeeitherlapplyorBiocParallel::bplapply.Value(listofdataframes)eachdataframehasfollowingcolumns:transition_group_id(integer)auniqueidforeachprecursor.RT(numeric)retentiontimeasinFEATURE.EXP_RTofoswles.Intensity(numeric)peakintensityasinFEATURE_MS2.AREA_INTENSITYofoswles.leftWidth(numeric)asinFEATURE.LEFT_WI

43 DTHofoswles.rightWidth(numeric)asinF
DTHofoswles.rightWidth(numeric)asinFEATURE.RIGHT_WIDTHofoswles.peak_group_rank(integer)rankofeachfeatureassociatedwithtransition_group_id.m_score(numeric)q-valueofeachfeatureassociatedwithtransition_group_id.(Ifusing'DIA_IPF'runType,thiswillrepresentIPF'sQVALUE)ms2_m_score(numeric)MS2q-valueofeachfeatureassociatedwithtransition_group_id.(Willonlybepresentifusing'DIA_IPF'runType) getGlobalAlignMaskCpp39Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2019-04-06SeeAlsogetRunNames,fetchPrecursorsInfoExamplesdataPathsystem.file("extdata",package="DIAlignR")fileInfogetRunNames(dataPath=dataPath)featuresgetFeatures(fileInfo,maxFdrQuery=1.00,runType="DIA_Proteomics")dim(features[[2]])#9388 getGlobalAlignMaskCppOutputsamaskforconstrainingsimilaritymatrix DescriptionThisfunctiontakesintimeVectorsfrombothruns,global-tmappedvaluesofend-pointsofrsttimevectorandsample-lengthofwindowofnoconstraining.Outsideofwindow,allelementsofmatrixareeitherequallyweightedorweightedproportionaltodistancefromwindow-boundry.UsagegetGlobalAlignMaskCpp(tA,tB,B1p,B2p,noBeef=50L,hardConstrain=FALSE)ArgumentstA(numeric)Anumericvector

44 .ThisvectorhasequallyspacedtimepointsofX
.ThisvectorhasequallyspacedtimepointsofXICA.tB(numeric)Anumericvector.ThisvectorhasequallyspacedtimepointsofXICB.B1p(numeric)TimepointmappedbyglobaltfortA[1].B2p(numeric)TimepointmappedbyglobaltfortA[length(tA)].noBeef(integer)Itdenesthedistancefromtheglobalt,uptowhichnopenalizationisperformed.Thewindowlength=2*noBeef.hardConstrain(logical)iffalse;indicesfartherfromnoBeefdistancearelledwithdistancefromlineartline.Valuemask(matrix)Anumericmatrix. 40getGlobalAlignmentAuthor(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+MITDate:2019-03-08ExamplestAc(3353.2,3356.6,3360.0,3363.5)tBc(3325.9,3329.3,3332.7,3336.1)B1p3325.751;B2p3336.119noBeef1maskgetGlobalAlignMaskCpp(tA,tB,B1p,B2p,noBeef,FALSE)round(mask,3)matrix(c(0.000,0.000,0.707,1.414,0.000,0.000,0.000,0.707,0.707,0.000,0.000,0.000,1.414,0.707,0.000,0.000),4,4,byrow=FALSE) getGlobalAlignmentCalculatesglobalalignmentbetweenRToftworuns DescriptionThisfunctionselectsfeaturesfromoswFileswhichhasm-scoremaxFdrLoess.Ittslinear/loessregressiononthesefeature.Retention-timemappingisestablishedfromreferencetoexperimentrun.UsagegetGlobalAlignment(oswFiles,ref,eXp,f

45 itType="linear",maxFdrGlobal=0.01,spanva
itType="linear",maxFdrGlobal=0.01,spanvalue=0.1)ArgumentsoswFiles(listofdata-frames)itisoutputfromgetFeaturesfunction.ref(string)Mustbeacombinationof"run"andanitegere.g."run2".eXp(string)Mustbeacombinationof"run"andanitegere.g."run2".fitType(string)Mustbefrom"loess"or"linear".maxFdrGlobal(numeric)Anumericvaluebetween0and1.Featuresshouldhavem-scorelowerthanthisvalueforparticipationinglobalt.spanvalue(numeric)SpanvalueforLOESSt.Fortargetedproteomics0.1couldbeused. getMultipeptide41ValueAnobjectofclass"loess".Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2019-12-14SeeAlsogetFeaturesExamplesdata(oswFiles_DIAlignR,package="DIAlignR")fitgetGlobalAlignment(oswFiles=oswFiles_DIAlignR,ref="run1",eXp="run2",fitType="linear",maxFdrGlobal=0.05,spanvalue=0.1) getMultipeptideGetmultipeptides DescriptionEachelementofthemultipeptideisacollectionoffeaturesassociatedwithapeptide.UsagegetMultipeptide(precursors,features,runType="DIA_Proteomics",applyFun=lapply,masters=NULL)Argumentsprecursors(data-frames)ContainsprecursorsandassociatedtransitionIDs.features(listofdata-frames)Containsfeaturesandtheirpropertiesidentiedi

46 neachrun.runType(char)Thismustbeoneofthe
neachrun.runType(char)Thismustbeoneofthestrings"DIA_Proteomics","DIA_IPF","DIA_Metabolomics".applyFun(function)valuemustbeeitherlapplyorBiocParallel::bplapply.masters(characters)namesofextraruns. 42getMZMLpointersValue(list)ofdataframeshavingfollowingcolumns:transition_group_id(integer)auniqueidforeachprecursor.run(string)runidentier.RT(numeric)retentiontimeasinFEATURE.EXP_RTofoswles.Intensity(numeric)peakintensityasinFEATURE_MS2.AREA_INTENSITYofoswles.leftWidth(numeric)asinFEATURE.LEFT_WIDTHofoswles.rightWidth(numeric)asinFEATURE.RIGHT_WIDTHofoswles.peak_group_rank(integer)rankofeachfeatureassociatedwithtransition_group_id.m_score(numeric)q-valueofeachfeatureassociatedwithtransition_group_id.alignment_rank(integer)rankofeachfeaturepost-alignment.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2020)+GPL-3Date:2020-04-08SeeAlsogetPrecursors,getFeaturesExamplesdataPathsystem.file("extdata",package="DIAlignR")fileInfogetRunNames(dataPath,oswMerged=TRUE)precursorsgetPrecursors(fileInfo,oswMerged=TRUE,context="experiment-wide")featuresgetFeatures(fileInfo,maxFdrQuery=0.05)multipeptidegetMultipeptide(precursors,fea

47 tures)multipeptide[["9861"]] getMZMLpoin
tures)multipeptide[["9861"]] getMZMLpointersGetpointerstoeachmzMLle. DescriptionReturnsinstantiatedmzRpwizobjectassociatedtomzMLle.UsagegetMZMLpointers(fileInfo) getPeptideScores43ArgumentsfileInfo(data-frame)OutputofDIAlignR::getRunNamesfunctionValue(AlistofmzRpwiz)Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2019-12-13ExamplesdataPathsystem.file("extdata",package="DIAlignR")fileInfogetRunNames(dataPath=dataPath)mzPntrsgetMZMLpointers(fileInfo) getPeptideScoresGetscoresofpeptide DescriptionGetalistofdataframesthatcontainspeptidescores,pvalues,andqvaluesacrossallruns.UsagegetPeptideScores(fileInfo,peptides,oswMerged=TRUE,runType="DIA_Proteomics",context="global")ArgumentsfileInfo(data-frame)OutputofgetRunNamesfunction.peptides(integer)Idsofpeptidesforwhichscoresarerequired.oswMerged(logical)TRUEforexperiment-wideFDRandFALSEforrun-specicFDRbypyprophet.runType(char)Thismustbeoneofthestrings"DIA_Proteomics","DIA_IPF","DIA_Metabolomics".context(string)Contextusedinpyprophetpeptide.Mustbeeither"run-specic","experiment-wide",or"global". 44getPrecursorByIDValue(listofdataframes)dataframehasfollowingco

48 lumns:peptide_id(integer)auniqueidforeac
lumns:peptide_id(integer)auniqueidforeachprecursor.run(character)asinSCORE_PEPTIDE.RUN_IDofoswles.score(numeric)asinSCORE_PEPTIDE.SCOREofoswles.pvalue(numeric)asinSCORE_PEPTIDE.PVALUEofoswles.qvalue(numeric)asinSCORE_PEPTIDE.QVALUEofoswles.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2020)+GPL-3Date:2020-07-01SeeAlsogetRunNames,fetchPeptidesInfoExamplesdataPathsystem.file("extdata",package="DIAlignR")fileInfogetRunNames(dataPath=dataPath)precursorsInfogetPrecursors(fileInfo,oswMerged=TRUE,runType="DIA_Proteomics",context="experiment-wide",maxPeptideFdr=0.05)peptidesInfogetPeptideScores(fileInfo,unique(precursorsInfo$peptide_id))dim(peptidesInfo)#6845 getPrecursorByIDFindprecursorsgiventheirIDs DescriptionGetadata-frameofanalytes'transition_group_id,transition_ids,peptide_idandamino-acidse-quences.UsagegetPrecursorByID(analytes,fileInfo,oswMerged=TRUE,runType="DIA_Proteomics") getPrecursorByID45Argumentsanalytes(integer)avectorofintegers.fileInfo(data-frame)OutputofgetRunNamesfunction.oswMerged(logical)TRUEforexperiment-wideFDRandFALSEforrun-specicFDRbypyprophet.runType(char)Thismustbeoneofthestrings"DIA_Pr

49 oteomics","DIA_IPF","DIA_Metabolomics".V
oteomics","DIA_IPF","DIA_Metabolomics".Value(data-frames)Adata-framehavingfollowingcolumns:transition_group_id(integer)auniqueidforeachprecursor.transition_id(list)fragment-ionIDassociatedwithtransition_group_id.ThisismatchedwithchromatogramIDinmzMLle.peptide_id(integer)auniqueidforeachpeptide.Apeptidecanhavemultipleprecursors.sequence(string)amino-acidsequenceoftheprecursorwithpossiblemodications.charge(integer)chargeontheprecursor.group_label(string)TODOFigureitout.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2020)+GPL-3Date:2019-04-06SeeAlsogetRunNames,fetchPrecursorsInfoExamplesdataPathsystem.file("extdata",package="DIAlignR")fileInfogetRunNames(dataPath=dataPath,oswMerged=TRUE)precursorsgetPrecursorByID(c(32L,2474L),fileInfo,oswMerged=TRUE) 46getPrecursors getPrecursorsGetprecursorsfromallfeatureles DescriptionGetadata-frameofanalytes'transition_group_id,transition_ids,peptide_idandamino-acidse-quences.UsagegetPrecursors(fileInfo,oswMerged=TRUE,runType="DIA_Proteomics",context="global",maxPeptideFdr=0.05,level="Peptide",useIdentifying=FALSE)ArgumentsfileInfo(data-frame)OutputofgetRunNamesfunction.oswMerged(lo

50 gical)TRUEforexperiment-wideFDRandFALSEf
gical)TRUEforexperiment-wideFDRandFALSEforrun-specicFDRbypyprophet.runType(char)Thismustbeoneofthestrings"DIA_Proteomics","DIA_IPF","DIA_Metabolomics".context(string)Contextusedinpyprophetpeptide.Mustbeeither"run-specic","experiment-wide",or"global".maxPeptideFdr(numeric)Anumericvaluebetween0and1.ItisusedtolterpeptidesfromoswlewhichhaveSCORE_PEPTIDE.QVALUElessthanitself.level(string)ApplymaxPeptideFDRonProteinaswellifspeciedas"Protein".De-fault:"Peptide".useIdentifying(logical)SetTRUEtouseidentifyingtransitionsinalignment.(DEFAULT:FALSE)Value(data-frames)Adata-framehavingfollowingcolumns:transition_group_id(integer)auniqueidforeachprecursor.peptide_id(integer)auniqueidforeachpeptide.Apeptidecanhavemultipleprecursors.sequence(string)amino-acidsequenceoftheprecursorwithpossiblemodications.charge(integer)chargeontheprecursor.group_label(string)TODOFigureitout.transition_ids(list)fragment-ionIDassociatedwithtransition_group_id.ThisismatchedwithchromatogramIDinmzMLle. getRefRun47Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2019-04-06SeeAlsogetRunNames,fetchPrecursorsInfoExamplesdataPaths

51 ystem.file("extdata",package="DIAlignR")
ystem.file("extdata",package="DIAlignR")fileInfogetRunNames(dataPath=dataPath)precursorsInfogetPrecursors(fileInfo,oswMerged=TRUE,runType="DIA_Proteomics",context="experiment-wide",maxPeptideFdr=0.05)dim(precursorsInfo)#2346 getRefRunFetchthereferencerunforeachpeptide DescriptionProvidesthereferencerunbasedonlowestp-value.UsagegetRefRun(peptideScores,applyFun=lapply)ArgumentspeptideScores(listofdata-frames)eachdataframehasscoresofapeptideacrossallruns.applyFun(function)valuemustbeeitherlapplyorBiocParallel::bplapply.Value(dataframe)hastwocolumns:peptide_id(integer)auniqueidforeachpeptide.run(string)runidentier.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2020)+GPL-3Date:2020-04-08 48getRTdfSeeAlsogetPeptideScoresExamplesdataPathsystem.file("extdata",package="DIAlignR")fileInfogetRunNames(dataPath=dataPath)precursorsInfogetPrecursors(fileInfo,oswMerged=TRUE,runType="DIA_Proteomics",context="experiment-wide",maxPeptideFdr=0.05)peptideIDsunique(precursorsInfo$peptide_id)peptidesInfogetPeptideScores(fileInfo,peptideIDs)peptidesInfolapply(peptideIDs,function(pep)peptidesInfo[.(pep),])names(peptidesInfo)as.character(peptideIDs)

52 getRefRun(peptidesInfo) getRTdfCalculate
getRefRun(peptidesInfo) getRTdfCalculatesglobalalignmentbetweenRToftworuns DescriptionThisfunctionselectsfeaturesfromoswFileswhichhasm-scoremaxFdrLoess.Ittslinear/loessregressiononthesefeature.Retention-timemappingisestablishedfromreferencetoexperimentrun.UsagegetRTdf(features,ref,eXp,maxFdrGlobal)Argumentsfeatures(listofdata-frames)itisoutputfromgetFeaturesfunction.ref(string)Mustbeacombinationof"run"andanitegere.g."run2".eXp(string)Mustbeacombinationof"run"andanitegere.g."run2".maxFdrGlobal(numeric)Anumericvaluebetween0and1.Featuresshouldhavem-scorelowerthanthisvalueforparticipationinglobalt.ValueAdata-frameAuthor(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2021)+GPL-3Date:2019-03-01 getRunNames49SeeAlsogetGlobalAlignmentExamplesdata(oswFiles_DIAlignR,package="DIAlignR")dfgetRTdf(features=oswFiles_DIAlignR,ref="run1",eXp="run2",maxFdrGlobal=0.05) getRunNamesGetnamesofallruns DescriptionFetchesalloswles,then,keepsonlythoserunswhichhascorrespondingmzMLles.mzMLlenamesmustmatchwithRUN.FILENAMEcolumnsofoswles.UsagegetRunNames(dataPath,oswMerged=TRUE,params=paramsDIAlignR())ArgumentsdataPath(char)Pathtoxicsandos

53 wdirectory.oswMerged(logical)TRUEforexpe
wdirectory.oswMerged(logical)TRUEforexperiment-wideFDRandFALSEforrun-specicFDRbypyprophet.params(list)parametersareenteredaslist.OutputoftheparamsDIAlignRfunction.Value(dataframe)ithasvecolumns:spectraFile(string)asmentionedinRUNtableofoswles.runName(string)containrespectivemzMLnameswithoutextension.spectraFileID(string)IDinRUNtableofoswles.featureFile(string)Pathtothefeaturele.chromatogramFile(string)Pathtothechromatogramle.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2019-12-14ExamplesdataPathsystem.file("extdata",package="DIAlignR")getRunNames(dataPath=dataPath,oswMerged=TRUE) 50getSeqSimMatCpp getSeqSimMatCppCalculatessimilaritymatrixfortwosequences DescriptionCalculatessimilaritymatrixfortwosequencesUsagegetSeqSimMatCpp(seq1,seq2,match,misMatch)Argumentsseq1(char)Asinglestring.seq2(char)Asinglestring.match(double)Scoreforcharactermatch.misMatch(double)scoreforcharactermismatch.Values(matrix)Numericsimilaritymatrix.Rowsandcolumnsexpressesseq1andseq2,respectively.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2

54 019)+MITDate:2019-03-05Examples#Getseque
019)+MITDate:2019-03-05Examples#GetsequencesimilarityoftwoDNAstringsMatch=10;MisMatch=-2seq1="GCAT";seq2="CAGTG"getSeqSimMatCpp(seq1,seq2,Match,MisMatch)matrix(c(-2,10,-2,-2,-2,-2,10,-2,10,-2,-2,-2,-2,-2,-2,10,10,-2,-2,-2),4,5,byrow=FALSE) getTransitions51 getTransitionsGettransitionsfromallfeatureles DescriptionGetalistofdata-frameofOpenSwathfeaturesthatcontainsretentiontime,intensities,boundariesetc.UsagegetTransitions(fileInfo,maxFdrQuery=0.05,runType="DIA_Proteomics",applyFun=lapply)ArgumentsfileInfo(data-frame)outputofgetRunNamesfunction.maxFdrQuery(numeric)anumericvaluebetween0and1.ItisusedtolterfeaturesfromoswlewhichhaveSCORE_MS2.QVALUElessthanitself.runType(char)yhismustbeoneofthestrings"DIA_Proteomics","DIA_Metabolomics".applyFun(function)valuemustbeeitherlapplyorBiocParallel::bplapply.Value(listofdataframes)eachdataframehasfollowingcolumns:transition_group_id(integer)auniqueidforeachprecursor.RT(numeric)retentiontimeasinFEATURE.EXP_RTofoswles.intensity(list)ofpeakintensitiesasinFEATURE_TRANSITION.AREA_INTENSITYofoswles.leftWidth(numeric)asinFEATURE.LEFT_WIDTHofoswles.rightWidth(numeric)asinFEATURE.RIGHT_WIDTHofoswles.peak_group_rank(integer)rankofeachfeatureassoc

55 iatedwithtransition_group_id.m_score(num
iatedwithtransition_group_id.m_score(numeric)q-valueofeachfeatureassociatedwithtransition_group_id.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2020)+GPL-3Date:2020-11-15 52getXICsSeeAlsogetRunNames,fetchTransitionsFromRunExamplesdataPathsystem.file("extdata",package="DIAlignR")fileInfogetRunNames(dataPath=dataPath)transitionsgetTransitions(fileInfo,maxFdrQuery=1.00,runType="DIA_Proteomics")dim(transitions[[2]])#9388 getXICsGetXICsofallanalytes DescriptionForalltheanalytesrequestedinruns,itrstcreatesoswFiles,then,fetcheschromatogramindicesfromoswFilesandextractchromatogramsfrommzMLles.UsagegetXICs(analytes,runs,dataPath=".",maxFdrQuery=1,runType="DIA_Proteomics",oswMerged=TRUE,params=paramsDIAlignR())Argumentsanalytes(integer)avectorofprecursorIDs.runs(vectorofstring)namesofmzMLleswithoutextension.dataPath(string)Pathtoxicsandoswdirectory.maxFdrQuery(numeric)Anumericvaluebetween0and1.ItisusedtolterfeaturesfromoswlewhichhaveSCORE_MS2.QVALUElessthanitself.runType(char)Thismustbeoneofthestrings"DIA_Proteomics","DIA_Metabolomics".oswMerged(logical)TRUEforexperiment-wideFDRandFALSEforrun-specicFDRbypyprophe

56 t.params(list)parametersareenteredaslist
t.params(list)parametersareenteredaslist.OutputoftheparamsDIAlignRfunction.ValueAlistoflist.EachlistcontainsXIC-groupforthatrun.XIC-groupisalistofdataframethathaselutiontimeandintensityoffragment-ionXIC. getXICs4AlignObj53Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2019-12-13SeeAlsogetXICs4AlignObj,getRunNames,analytesFromFeaturesExamplesdataPathsystem.file("extdata",package="DIAlignR")runsc("hroest_K120808_Strep10%PlasmaBiolRepl1_R03_SW_filt","hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt")analytesc(32L,898L,2474L)XICsgetXICs(analytes,runs=runs,dataPath=dataPath) getXICs4AlignObjExtractXICsofanalytes DescriptionForalltheanalytesrequested,itfetcheschromatogramindicesfromprec2chromIndexandextractschromatogramsusingmzPntrs.UsagegetXICs4AlignObj(mzPntrs,fileInfo,runs,prec2chromIndex,analytes)ArgumentsmzPntrsalistofmzRpwiz.fileInfo(data-frame)outputofgetRunNames().runs(vectorofstring)namesofmzMLleswithoutextension.prec2chromIndex(listofdata-frames)outputofgetChromatogramIndices().Eachdataframehastwocolumns:transition_group_idandchromatogramIndex.analytes(integer)avectorofprecursorIDs.ValueAlistoflistofda

57 ta-frames.Eachdataframehaselutiontimeand
ta-frames.Eachdataframehaselutiontimeandintensityoffragment-ionXIC. 54get_ropenmsAuthor(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2019-12-13SeeAlsogetChromatogramIndices,getRunNamesExamplesdataPathsystem.file("extdata",package="DIAlignR")runsc("hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt","hroest_K120808_Strep10%PlasmaBiolRepl1_R03_SW_filt")analytesc(32L,898L,2474L)paramsparamsDIAlignR()params[["chromFile"]]"mzML"fileInfogetRunNames(dataPath=dataPath)fileInfoupdateFileInfo(fileInfo,runs)precursorsgetPrecursorByID(analytes,fileInfo)mzPntrsgetMZMLpointers(fileInfo)prec2chromIndexgetChromatogramIndices(fileInfo,precursors,mzPntrs)XICsgetXICs4AlignObj(mzPntrs,fileInfo,runs,prec2chromIndex,analytes)rm(mzPntrs) get_ropenmsGetropenmshandle DescriptionPythonpathcanalsobesetusingSys.setenv(RETICULATE_PYTHON=pythonPath).Also,re-move.Rhistoryletoavoidconictwithpreviouslyusedpythonversion.Usageget_ropenms(pythonPath=NULL,condaEnv=NULL,useConda=TRUE)ArgumentspythonPath(string)pathofthepythonprogramthathaspyopenmsmodule.condaEnv(string)nameofthecondaenvironmentthathaspyopenmsmodule.useConda(logical)TRUE:Usecondaen

58 vironment.FALSE:Usepythonthroughpython-P
vironment.FALSE:Usepythonthroughpython-Path.Value(pyopenmsmodule) imputeChromatogram55Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2020)+GPL-3Date:2020-06-06Examples##Notrun:ropenmsget_ropenms(condaEnv="envName",useConda=TRUE)##End(Notrun) imputeChromatogramFillmissingintensitiesinachromatogram DescriptionFillmissingintensitiesinachromatogramUsageimputeChromatogram(chromatogram,method="spline",polyOrd=4,kernelLen=9,splineMethod="fmm")Argumentschromatogram(data-frames)rstcolumnistime,secondcolumnisintensity.method(string)mustbeeither"spline","sgolay"or"linear".polyOrd(integer)mustbelessthankernelLen.kernelLen(integer)mustbeanoddinteger.splineMethod(string)mustbeeither"fmm"or"natural".Value(dataframe)hastwocolumns:time(numeric)intensity(numeric) 56mapIdxToTimeAuthor(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2020)+GPL-3Date:2020-05-21SeeAlsona.approx,na.splineExamplestimeseq(from=3003.4,to=3048,by=3.4)yc(0.2050595,0.8850070,2.2068768,3.7212677,5.1652605,5.8288915,5.5446804,4.5671360,3.3213154,1.9485889,0.9520709,0.3294218,0.2009581,0.1420923)chromdata.fr

59 ame(time,y)chrom$y[c(1,8,14)]NAimputeChr
ame(time,y)chrom$y[c(1,8,14)]NAimputeChromatogram(chrom,"sgolay")imputeChromatogram(chrom,"spline")imputeChromatogram(chrom,"linear") mapIdxToTimeEstablishesmappingfromindextotime DescriptionTakesatimevectorandindexvectorofsamelength.Thisfunctioncreateanewtimevectorgivenindicesspeciedinidx.UsagemapIdxToTime(timeVec,idx)ArgumentstimeVecAnumericvectoridxAnintegervectorValueAmutatedtimevectorAuthor(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2019-12-13 masterXICs_DIAlignR57ExamplestimeVecc(1.3,5.6,7.8)idxc(NA,NA,1L,2L,NA,NA,3L,NA)mapIdxToTime(timeVec,idx)#c(NA,NA,1.3,5.6,6.333,7.067,7.8,NA) masterXICs_DIAlignRMasterfragment-ionchromatogramsfromtwoparents DescriptionCreatedmergedXICsofpeptide(ID=4618)14299_QFNNTDIVLLEDFQK/3fromtwoSWATHruns:run1:hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_lt.chrom.mzMLrun2:hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_lt.chrom.mzMLUsagemasterXICs_DIAlignRFormatTheformatissimilartotheoutputofchildXICs.Alistoftwoelements:Firstelementcontainssixfragmentationchromatograms.Thesecondelementhasalignedparenttime-vectorsandcorre-spondingchildtime-vector.Ithasvecolumns:indexAligne

60 d.ref(integer)alignedindicesofreferencer
d.ref(integer)alignedindicesofreferencerun.indexAligned.eXp(integer)alignedindicesofexperimentrun.tAligned.ref(numeric)alignedtime-vectorofreferencerun.tAligned.eXp(numeric)alignedtime-vectorofexperimentrun.alignedChildTime(numeric)alignedtime-vectorofmasterrun.SourceFiletest_GenerateData.Rhassourcecodetogeneratetheexampledata. 58mstAlignRuns mstAlignRunsPeptidequanticationthroughMSTalignment DescriptionThisfunctionexpectsoswandxicsdirectoriesatdataPath.Itrstreadsoswlesandfetcheschromatogramindicesforeachanalyte.Toperformalignment,rstaguide-treeisbuiltusingmstwhichcanalsobeprovidedwithmstNetparameter.Aswetraversefromthestartnodetotheothernodes,runsarealignedpairwise.UsagemstAlignRuns(dataPath,params,outFile="DIAlignR",oswMerged=TRUE,runs=NULL,peps=NULL,mstNet=NULL,applyFun=lapply)ArgumentsdataPath(string)pathtoxicsandoswdirectory.params(list)parametersareenteredaslist.OutputoftheparamsDIAlignRfunction.outFile(string)nameoftheoutputle.oswMerged(logical)TRUEforexperiment-wideFDRandFALSEforrun-specicFDRbypyprophet.runs(string)namesofxicslewithoutextension.peps(integer)idsofpeptidestobealigned.IfNULL,alignallpeptides.mstNet(matrix)arrayoftree-edges.LookupgetMST.applyFun(functi

61 on)valuemustbeeitherlapplyorBiocParallel
on)valuemustbeeitherlapplyorBiocParallel::bplapply.Value(None)Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2021)+GPL-3Date:2021-05-15 multipeptide_DIAlignR59SeeAlsoalignTargetedRuns,progAlignRuns,getMSTExamplesdataPathsystem.file("extdata",package="DIAlignR")paramsparamsDIAlignR()params[["context"]]"experiment-wide"mstAlignRuns(dataPath,params=params,outFile="DIAlignR")##Notrun:ystrsplit("run0run1\nrun2run2",split='\n')[[1]]ycbind(A=strsplit(y[1],"")[[1]],B=strsplit(y[2],"")[[1]])plot(igraph::graph_from_edgelist(y,directed=FALSE))##End(Notrun) multipeptide_DIAlignRAnalytesinformationfrommultipeptide. DescriptionanalytesinfofromthreeSWATHruns:run0:hroest_K120808_Strep10%PlasmaBiolRepl1_R03_SW_lt.chrom.mzMLrun1:hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_lt.chrom.mzMLrun2:hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_lt.chrom.mzMLUsagemultipeptide_DIAlignRFormatAlistof199elementswhereeachelementrepresentsaprecursorandconsistsofadataframe:transition_group_idIDofeachprecursor.SameasthenameofthelistRTRetentiontime,insecintensityInensityofassociatedfeatureleftWidthLeftwidthofthepeak,insecrightWidthRightwidthofthepeak,i

62 nsecpeak_group_rankRankingofassociatedfe
nsecpeak_group_rankRankingofassociatedfeaturem_scoreqvalueofassociatedfeaturerunNameoftherun,featureisfromalignment_rankRankofthefeatureafteralignmentSourceRawlesaredownloadedfromPeptideAtlas.Filetest_GenerateData.Rhassourcecodetogeneratetheexampledata. 60otherChildXICpp oswFiles_DIAlignRAnalytesinformationfromoswles DescriptionanalytesinfofromthreeSWATHruns:run0:hroest_K120808_Strep10%PlasmaBiolRepl1_R03_SW_lt.chrom.mzMLrun1:hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_lt.chrom.mzMLrun2:hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_lt.chrom.mzMLUsageoswFiles_DIAlignRFormatAlistofthreeelementswhereeachelementconsistsofadataframe:transition_group_idIDofeachpeptideRTRetentiontime,insecintensityInensityofassociatedfeatureleftWidthLeftwidthofthepeak,insecrightWidthRightwidthofthepeak,insecpeak_group_rankRankingofassociatedfeaturem_scoreqvalueofassociatedfeatureSourceRawlesaredownloadedfromPeptideAtlas.Filetest_GenerateData.Rhassourcecodetogeneratetheexampledata. otherChildXICppGetchildchromatogramforotherprecursorsusingmainprecursoralignment DescriptionGetchildchromatogramforotherprecursorsusingmainprecursoralignment otherChildXICpp61UsageotherChildXICpp(l1,l2,kernelLen,polyOrd,ma

63 t,childTime,wRef=0.5,splineMethod="natur
t,childTime,wRef=0.5,splineMethod="natural")Argumentsl1(list)Alistofnumericmatrixoftwocolumns.l1andl2shouldhavesamelength.l2(list)Alistofnumericmatrixoftwocolumns.l1andl2shouldhavesamelength.kernelLen(integer)lengthoflter.Mustbeanoddnumber.polyOrd(integer)TRUE:removebackgroundfrompeaksignalusingestimatednoiselevels.mat(matrix)alignedtimeandchildtimefromthemainprecursor.childTime(numeric)iimevectorfromthechildchromatogram.wRef(numeric)WeightofthereferenceXIC.Mustbebetween0and1.splineMethod(string)mustbeeither"fmm"or"natural".Value(List)ofchromatograms.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2021)+MITDate:2021-01-08Examplesdata(XIC_QFNNTDIVLLEDFQK_3_DIAlignR,package="DIAlignR")XICsXIC_QFNNTDIVLLEDFQK_3_DIAlignRXICs.reflapply(XICs[["hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt"]][["4618"]],as.matrix)XICs.eXplapply(XICs[["hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt"]][["4618"]],as.matrix)B1p4964.752B2p5565.462chromgetChildXICpp(XICs.ref,XICs.eXp,11L,4L,alignType="hybrid",adaptiveRT=77.82315,normalization="mean",simType="dotProductMasked",B1p=B1p,B2p=B2p,goFactor=0.125,geFactor=40,cosAngleThresh=0.3,OverlapAli

64 gnment=TRUE,dotProdThresh=0.96,gapQuanti
gnment=TRUE,dotProdThresh=0.96,gapQuantile=0.5,hardConstrain=FALSE,samples4gradient=100,wRef=0.5,keepFlanks=TRUE) 62paramsDIAlignRchrom2otherChildXICpp(XICs.ref,XICs.eXp,11L,4L,chrom[[2]],chrom[[1]][[1]][,1],0.5,"natural") paramsDIAlignRParametersforthealignmentfunctions DescriptionRetentionalignmentrequiresOpenSWATH/pyProphetextractedfeaturesandchromatograms.Thisfunctionprovidesasuiteofparametersusedforselectingfeaturesandmanipulatingchromatograms.Chromatogramalignmentcanbeperformedviareferencebasedorprogressivelyviarootedorun-rootedtree.Thisfunctionprovidessensibleparametersforthesetasks.UsageparamsDIAlignR()ValueAlistofparameters:runType(string)mustbeoneofthestrings"DIA_Proteomics","DIA_IPF","DIA_Metabolomics".chromFile(string)musteitherbe"mzML"or"sqMass".maxFdrQuery(numeric)anumericvaluebetween0and1.ItisusedtolterpeptidesfromoswlewhichhaveSCORE_MS2.QVALUElessthanitself.maxIPFFdrQuery(numeric)Anumericvaluebetween0and1.ItisusedtolterfeaturesfromoswlewhichhaveSCORE_IPF.QVALUElessthanitself.(ForPTMIPFuse)maxPeptideFdr(numeric)anumericvaluebetween0and1.ItisusedtolterpeptidesfromoswlewhichhaveSCORE_PEPTIDE.QVALUElessthanitself.analyteFDR(numeric)theupperlimitoffeatureFDRtobeitco

65 nsideredforbuildingtree.treeDist(string)
nsideredforbuildingtree.treeDist(string)themethodusedtobuilddistancematrix.Mustbeeither"rsquared"or"count.context(string)usedinpyprophetpeptide.Mustbeeither"run-specic","experiment-wide",or"global".unalignedFDR(numeric)mustbebetween0andmaxFdrQuery.FeaturesbelowunalignedFDRareconsideredforquanticationevenwithouttheRTalignment.alignedFDR1(numeric)mustbebetweenunalignedFDRandalignedFDR2.FeaturesbelowalignedFDR1andalignedtothereferenceareconsideredforquantication.alignedFDR2(numeric)mustbebetweenalignedFDR1andmaxFdrQuery.FeaturesbelowalignedFDR2andwithincertaindistancefromthealignedtimeareconsideredforquanticationafterthealignment.level(string)applymaxPeptideFDRonProteinaswellifspeciedas"Protein".De-fault:"Peptide". paramsDIAlignR63integrationType(string)methodtoomputetheareaofapeakcontainedinXICs.Mustbefrom"intensity_sum","trapezoid","simpson".baseSubtractionlogicalTRUE:removebackgroundfrompeaksignalusingestimatednoiselev-els.baselineType(string)methodtoestimatethebackgroundofapeakcontainedinXICs.Mustbefrom"none","base_to_base","vertical_division_min","vertical_division_max".fitEMG(logical)enable/disableexponentiallymodiedgaussianpeakmodeltting.recalIntensity(logical)recalcul

66 ateintensityforallanalytes.fillMissing(l
ateintensityforallanalytes.fillMissing(logical)calculateintensityforananlytesforwhichfeaturesarenotfound.XICfilter(string)mustbeeithersgolay,boxcar,gaussian,loessornone.polyOrd(integer)orderofthepolynomialtobetinthekernel.kernelLen(integer)numberofdata-pointstoconsiderinthekernel.globalAlignment(string)mustbeeither"loess"or"linear".globalAlignmentFdr(numeric)anumericvaluebetween0and1.Featuresshouldhavem-scorelowerthanthisvalueforparticipationinLOESSt.globalAlignmentSpan(numeric)spanvalueforLOESSt.Fortargetedproteomics0.1couldbeused.RSEdistFactor(numeric)deneshowmuchdistanceintheunitofrseremainsanoBeefzone.normalization(string)mustbeselectedfrom"mean","l2".simMeasure(string)mustbeselectedfromdotProduct,cosineAngle,crossCorrelation,co-sine2Angle,dotProductMasked,euclideanDist,covarianceandcorrelation.alignType(numeric)availablealignmentmethodsare"global","local"and"hybrid".goFactor(numeric)penaltyforintroducingrstgapinalignment.Thisvalueismultipliedbybasegap-penalty.geFactor(numeric)penaltyforintroducingsubsequentgapsinalignment.Thisvalueismultipliedbybasegap-penalty.cosAngleThresh(numeric)insimType=dotProductMaskedmode,angularsimilarityshouldbehigherthancosAngleThreshotherwisesimil

67 arityisforcedtozero.OverlapAlignment(log
arityisforcedtozero.OverlapAlignment(logical)aninputforalignmentwithfreeend-gaps.False:Globalalignment,True:overlapalignment.dotProdThresh(numeric)insimType=dotProductMaskedmode,valuesinsimilaritymatrixhigherthandotProdThreshquantilearecheckedforangularsimilarity.gapQuantile(numeric)mustbebetween0and1.Thisisusedtocalculatebasegap-penaltyfromsimilaritydistribution.kerLen(integer)InsimType=crossCorrelation,lengthofthekernelusedtosumsimi-larityscore.Mustbeanoddnumber.hardConstrain(logical)ifFALSE;indicesfartherfromnoBeefdistancearelledwithdistancefromlineartline. 64plotAlignedAnalytessamples4gradient(numeric)modulatespenalizationofmaskedindices.fillMethod(string)mustbeeither"spline","sgolay"or"linear".splineMethod(string)mustbeeither"fmm"or"natural".mergeTime(string)mustbeeither"ref","avg","refStart"or"refEnd".keepFlanks(logical)TRUE:Flankingchromatogramisnotremoved.fraction(integer)indicateswhichfractiontoalign.fractionNum(integer)Numberoffractionstodividethealignment.lossy(logical)ifTRUE,timeandintensityarelossy-compressedingeneratedsqMassle.useIdentifying(logical)SetTRUEtouseidentifyingtransitionsinalignment.(DEFAULT:FALSE)Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xr

68 ont;&#xo.ca;ORCID:0000-0003-3500-8152Lic
ont;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2020)+GPL-3Date:2020-07-11SeeAlsocheckParams,alignTargetedRunsExamplesparamsparamsDIAlignR() plotAlignedAnalytesPlotalignedXICsgroupforaspecicpeptide.AlignObjOutputistheoutputfromgetAlignObjsfucntion. DescriptionPlotalignedXICsgroupforaspecicpeptide.AlignObjOutputistheoutputfromgetAlignObjsfucntion.UsageplotAlignedAnalytes(AlignObjOutput,plotType="All",outFile="AlignedAnalytes.pdf",annotatePeak=FALSE,saveFigs=FALSE) plotAlignmentPath65ArgumentsAlignObjOutput(list)listcontainsleInfo,AlignObj,rawXICsforreferenceandexperiment,andreference-peaklabel.plotType(string)mustbeoneofthestrings"All","onlyUnaligned"and"onlyAligned".outFile(string)nameoftheoutputpdfle.annotatePeak(logical)TRUE:Peakboundariesandapexwillbehighlighted.saveFigs(logical)TRUE:FigureswillbesavedinAlignedAnalytes.pdf.ValueAplottothecurrentdevice.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2019-12-13ExamplesdataPathsystem.file("extdata",package="DIAlignR")runsc("hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt","hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt")AlignObjOutput

69 getAlignObjs(analytes=4618L,runs,dataPat
getAlignObjs(analytes=4618L,runs,dataPath=dataPath)plotAlignedAnalytes(AlignObjOutput) plotAlignmentPathVisualizealignmentpaththroughsimilaritymatrix DescriptionPlotalignedpaththroughthesimilaritymatrix.ReferencerunhasindicesonX-axis,eXprunhasthemonY-axis.IngetAlignObjsfunction,objTypemustbesettomedium.UsageplotAlignmentPath(AlignObjOutput)ArgumentsAlignObjOutput(list)ThelistcontainsAlignObj,rawXICsforreferenceandexperiment,andreference-peaklabel.ValueAplottothecurrentdevice. 66plotAnalyteXICsAuthor(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2019-12-13Exampleslibrary(lattice)dataPathsystem.file("extdata",package="DIAlignR")runsc("hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt","hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt")AlignObjOutputgetAlignObjs(analytes=4618L,runs,dataPath=dataPath,objType="medium")plotAlignmentPath(AlignObjOutput) plotAnalyteXICsPlotextracted-ionchromatogram. DescriptionPlotextracted-ionchromatogram.UsageplotAnalyteXICs(analyte,run,dataPath=".",maxFdrQuery=1,XICfilter="sgolay",polyOrd=4,kernelLen=9,runType="DIA_Proteomics",oswMerged=TRUE,peakAnnot=NULL,Title=NULL)Argumentsanalyte(int

70 eger)ananalyteisaPRECURSOR.IDfromtheosw&
eger)ananalyteisaPRECURSOR.IDfromtheoswle.run(string)Nameofaxicslewithoutextension.dataPath(string)pathtoxicsandoswdirectory.maxFdrQuery(numeric)Anumericvaluebetween0and1.ItisusedtolterfeaturesfromoswlewhichhaveSCORE_MS2.QVALUElessthanitself.XICfilter(string)mustbeeithersgolay,boxcar,gaussian,loessornone. plotXICgroup67polyOrd(integer)orderofthepolynomialtobetinthekernel.kernelLen(integer)numberofdata-pointstoconsiderinthekernel.runType(char)Thismustbeoneofthestrings"DIA_Proteomics","DIA_Metabolomics".oswMerged(logical)TRUEforexperiment-wideFDRandFALSEforrun-specicFDRbypyprophet.peakAnnot(numeric)Peak-apextime.Title(logical)TRUE:nameofthelistwillbedisplayedastitle.ValueAplottothecurrentdevice.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2019-12-13SeeAlsoplotXICgroupExamplesdataPathsystem.file("extdata",package="DIAlignR")run"hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt"plotAnalyteXICs(analyte=2474L,run,dataPath=dataPath,oswMerged=TRUE,XICfilter="none")plotAnalyteXICs(analyte=2474L,run,dataPath=dataPath,oswMerged=TRUE,XICfilter="sgolay") plotXICgroupPlotExtracted-ionchromatogramgro

71 up. DescriptionPlotExtracted-ionchromato
up. DescriptionPlotExtracted-ionchromatogramgroup.UsageplotXICgroup(XIC_group,peakAnnot=NULL,Title=NULL)ArgumentsXIC_group(list)Itisalistofdataframewhichhastwocolumns.Firstcolumnisfortimeandsecondcolumnindicatesintensity.peakAnnot(numeric)Peak-apextime.Title(logical)TRUE:nameofthelistwillbedisplayedastitle. 68progAlignRunsValueAplottothecurrentdevice.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2019)+GPL-3Date:2019-12-13SeeAlsoplotAnalyteXICsExamplesdataPathsystem.file("extdata",package="DIAlignR")runsc("hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt","hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt")XICsgetXICs(analytes=4618L,runs=runs,dataPath=dataPath,oswMerged=TRUE)plotXICgroup(XICs[["hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt"]][["4618"]])XICssmoothXICs(XICs[["hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt"]][["4618"]],type="sgolay",kernelLen=13,polyOrd=4)plotXICgroup(XICs,Title="Precursor4618\nrunhroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt") progAlignRunsPeptidequanticationthroughprogressivealignment DescriptionThisfunctionexpectsoswandxicsdirectoriesatdataPath.Itrstreadsoswlesandfetche

72 schromatogramindicesforeachanalyte.Toper
schromatogramindicesforeachanalyte.Toperformalignment,rstacrudeguide-treeisbuiltwhichcanalsobeprovidedwithnewickTreeparameter.Aswetraversefromtheleaf-nodestotherootnode,runsarealignedpairwise.Therootnodeisnamedmaster1thathasaverageofallfragmentionchromatogramsandidentiedpeak-groups.Thesefeaturesarepropagatedbacktoleafnodesandnallyalignedfeaturesarewrittenintheoutputle.UsageprogAlignRuns(dataPath,params,outFile="DIAlignR",ropenms=NULL,oswMerged=TRUE,runs=NULL,peps=NULL, progAlignRuns69newickTree=NULL,applyFun=lapply)ArgumentsdataPath(string)pathtoxicsandoswdirectory.params(list)parametersareenteredaslist.OutputoftheparamsDIAlignRfunction.outFile(string)nameoftheoutputle.ropenms(pyopenmsmodule)getthispythonmodulethroughget_ropenms.Requiredonlyforchrom.mzMLles.oswMerged(logical)TRUEforexperiment-wideFDRandFALSEforrun-specicFDRbypyprophet.runs(string)namesofxicslewithoutextension.peps(integer)idsofpeptidestobealigned.IfNULL,alignallpeptides.newickTree(string)guidancetreeinnewickformat.LookupgetTree.applyFun(function)valuemustbeeitherlapplyorBiocParallel::bplapply.Value(None)Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8

73 152License:(c)Author(2020)+GPL-3Date:202
152License:(c)Author(2020)+GPL-3Date:2020-07-10SeeAlsoalignTargetedRunsExamplesdataPathsystem.file("extdata",package="DIAlignR")paramsparamsDIAlignR()params[["context"]]"experiment-wide"##Notrun:ropenmsget_ropenms(condaEnv="envName")progAlignRuns(dataPath,params=params,outFile="test3",ropenms=ropenms)#Removingalignedvectorsfile.remove(list.files(dataPath,pattern="*_av.rds",full.names=TRUE))#Removingtemporarilycreatedmasterchromatogramsfile.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"))##End(Notrun) 70progComb3 progComb3Step3forprogressivealignment DescriptionStep3forprogressivealignmentUsageprogComb3(dataPath,params,outFile="DIAlignR",oswMerged=TRUE,applyFun=lapply)ArgumentsdataPath(string)pathtoxicsandoswdirectory.params(list)parametersareenteredaslist.OutputoftheparamsDIAlignRfunction.outFile(string)nameoftheoutputle.oswMerged(logical)TRUEforexperiment-wideFDRandFALSEforrun-specicFDRbypyprophet.applyFun(function)valuemustbeeitherlapplyorBiocParallel::bplapply.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.c

74 a;ORCID:0000-0003-3500-8152License:(c)Au
a;ORCID:0000-0003-3500-8152License:(c)Author(2021)+GPL-3Date:2021-03-03SeeAlsoprogAlignRuns progSplit271 progSplit2Step2forprogressivealignment DescriptionStep2forprogressivealignmentUsageprogSplit2(dataPath,params,outFile="DIAlignR",oswMerged=TRUE,applyFun=lapply)ArgumentsdataPath(string)pathtoxicsandoswdirectory.params(list)parametersareenteredaslist.OutputoftheparamsDIAlignRfunction.outFile(string)nameoftheoutputle.oswMerged(logical)TRUEforexperiment-wideFDRandFALSEforrun-specicFDRbypyprophet.applyFun(function)valuemustbeeitherlapplyorBiocParallel::bplapply.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2021)+GPL-3Date:2021-03-03SeeAlsoprogAlignRuns 72progSplit4 progSplit4Step4forprogressivealignment DescriptionStep4forprogressivealignmentUsageprogSplit4(dataPath,params,outFile="DIAlignR",oswMerged=TRUE,applyFun=lapply)ArgumentsdataPath(string)pathtoxicsandoswdirectory.params(list)parametersareenteredaslist.OutputoftheparamsDIAlignRfunction.outFile(string)nameoftheoutputle.oswMerged(logical)TRUEforexperiment-wideFDRandFALSEforrun-specicFDRbypyprophet.applyFun(function)valuemustbeeitherlapplyorBiocParallel::bp

75 lapply.Author(s)ShubhamGupta,&#xshub;&#x
lapply.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2021)+GPL-3Date:2021-03-03SeeAlsoprogAlignRuns progTree173 progTree1Step1forprogressivealignment DescriptionStep1forprogressivealignmentUsageprogTree1(dataPath,params,outFile="DIAlignR",oswMerged=TRUE,runs=NULL,newickTree=NULL,applyFun=lapply)ArgumentsdataPath(string)pathtoxicsandoswdirectory.params(list)parametersareenteredaslist.OutputoftheparamsDIAlignRfunction.outFile(string)nameoftheoutputle.oswMerged(logical)TRUEforexperiment-wideFDRandFALSEforrun-specicFDRbypyprophet.runs(string)namesofxicslewithoutextension.newickTree(string)guidancetreeinnewickformat.LookupgetTree.applyFun(function)valuemustbeeitherlapplyorBiocParallel::bplapply.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2021)+GPL-3Date:2021-03-03SeeAlsoprogAlignRuns 74recalculateIntensity recalculateIntensityCalculatesareaofpeaksinpeakTable DescriptionForthegivepeakboundaryinpeakTable,thefunctionextractsrawchromatogramsandrecalculateintensities.UsagerecalculateIntensity(peakTable,dataPath=".",oswMerged=TRUE,params=paramsDIAlig

76 nR())ArgumentspeakTable(data-frame)usual
nR())ArgumentspeakTable(data-frame)usuallyanoutputofalignTargetedRuns.Musthavethesecolumns:run,precursor,leftWidth,rightWidth.dataPath(string)pathtoxicsandoswdirectory.oswMerged(logical)TRUEforexperiment-wideFDRandFALSEforrun-specicFDRbypyprophet.params(list)parametersareenteredaslist.OutputoftheparamsDIAlignRfunction.Value(data-frame)Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2020)+GPL-3Date:2020-05-28SeeAlsoalignTargetedRuns,calculateIntensity script175ExamplespeakTabledata.frame(precursor=c(1967L,1967L,2474L,2474L),run=rep(c("hroest_K120808_Strep10%PlasmaBiolRepl1_R03_SW_filt","hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt"),2),intensity=c(186.166,579.832,47.9525,3.7413),leftWidth=c(5001.76,5025.66,6441.51,6516.6),rightWidth=c(5076.86,5121.25,6475.65,6554.2),stringsAsFactors=FALSE)dataPathsystem.file("extdata",package="DIAlignR")newTablerecalculateIntensity(peakTable,dataPath) script1Extractfeaturesandgeneratepairwisealignments. DescriptionExtractfeaturesandgeneratepairwisealignments.Usagescript1(dataPath,outFile="DIAlignR",params=paramsDIAlignR(),oswMerged=TRUE,runs=NULL,applyFun=lapply)ArgumentsdataPath(string)

77 pathtoxicsandoswdirectory.outFile(string
pathtoxicsandoswdirectory.outFile(string)nameoftheoutputle.params(list)parametersareenteredaslist.OutputoftheparamsDIAlignRfunction.oswMerged(logical)TRUEforexperiment-wideFDRandFALSEforrun-specicFDRbypyprophet.runs(string)namesofxicslewithoutextension.applyFun(function)valuemustbeeitherlapplyorBiocParallel::bplapply.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2021)+GPL-3Date:2021-02-20 76script2SeeAlsoalignTargetedRunsExamplesparamsparamsDIAlignR()params[["context"]]"experiment-wide"dataPathsystem.file("extdata",package="DIAlignR")BiocParallel::register(BiocParallel::MulticoreParam(workers=4,progressbar=TRUE))script1(dataPath,outFile="testDIAlignR",params=params,applyFun=BiocParallel::bplapply)file.remove(file.path(dataPath,"testDIAlignR_script1.RData")) script2Performsalignmentusingscript1output DescriptionPerformsalignmentusingscript1outputUsagescript2(dataPath,outFile="DIAlignR",params=paramsDIAlignR(),oswMerged=TRUE,runs=NULL,refRun=NULL,applyFun=lapply)ArgumentsdataPath(string)pathtoxicsandoswdirectory.outFile(string)nameoftheoutputle.params(list)parametersareenteredaslist.OutputoftheparamsDIAlignRfunct

78 ion.oswMerged(logical)TRUEforexperiment-
ion.oswMerged(logical)TRUEforexperiment-wideFDRandFALSEforrun-specicFDRbypyprophet.runs(string)namesofxicslewithoutextension.refRun(string)referenceforalignment.Ifnorunisprovided,m-scoreisusedtoselectreferencerun.applyFun(function)valuemustbeeitherlapplyorBiocParallel::bplapply. sgolayCpp77Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2021)+GPL-3Date:2021-02-20SeeAlsoalignTargetedRunsExamplesparamsparamsDIAlignR()params[["context"]]"experiment-wide"dataPathsystem.file("extdata",package="DIAlignR")BiocParallel::register(BiocParallel::MulticoreParam(workers=4,progressbar=TRUE))script1(dataPath,outFile="testDIAlignR",params=params,applyFun=BiocParallel::bplapply)script2(dataPath,outFile="testDIAlignR",params=params,applyFun=lapply)file.remove(file.path(dataPath,"testDIAlignR_script1.RData")) sgolayCppSmoothchromatogramwithsavitzky-golaylter. DescriptionSmoothchromatogramwithsavitzky-golaylter.UsagesgolayCpp(chrom,kernelLen,polyOrd)Argumentschrom(matrix)chromatogramcontainingtimeandintensityvectors.kernelLen(integer)lengthoflter.Mustbeanoddnumber.polyOrd(integer)TRUE:removebackgroundfrompeaksignalusingestimated

79 noiselevels.Value(matrix).Author(s)Shubh
noiselevels.Value(matrix).Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2020)+MITDate:2019-12-31 78smoothSingleXICExamplesdata("XIC_QFNNTDIVLLEDFQK_3_DIAlignR",package="DIAlignR")XICsXIC_QFNNTDIVLLEDFQK_3_DIAlignR[["hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt"]][["4618"]]xicsgolayCpp(as.matrix(XICs[[1]]),kernelLen=11L,polyOrd=4L) smoothSingleXICSmoothchromatogramsignal DescriptionSmoothingmethodsareSavitzky-Golay,Boxcar,GaussiankernelandLOESS.Savitzky-Golaysmoothingisgoodatpreservingpeak-shapecomparedtogaussianandboxcarsmoothing.How-ever,itassumesequidistantpointsthatfortunatelyisthecaseforDIAdata.Thisrequiresaquadraticmemorytostorethetandslowerthanothersmoothingmethods.UsagesmoothSingleXIC(chromatogram,type,samplingTime=NULL,kernelLen=NULL,polyOrd=NULL)Argumentschromatogram(dataframe)Adataframeoftwocolumns.Firstcolumnmustalwaysbemono-tonicallyincreasing.type(char)mustbeeithersgolay,boxcar,gaussian,loessornone.samplingTime(numeric)Timedifferencebetweenneighboringpoints.kernelLen(integer)Numberofdata-pointstoconsiderinthekernel.polyOrd(integer)Orderofthepolynomialtobetinthekernel.DetailsGaussiansmoothingusesagauss

80 ianfunctionwhosebandwidthisscaledby0.370
ianfunctionwhosebandwidthisscaledby0.3706505tohavequartilesat+/-0.25*bandwidth.Thepointselectioncut-offisalsohardat0.3706505*4*bandwidth.qnorm(0.75,sd=0.3706505)ThedenitionofC_ksmoothcanbefoundusinggetAnywhere('C_ksmooth')stats:::C_ksmoothValueAdataframewithtwocolumns. smoothXICs79Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2020)+GPL3Date:2020-02-21SeeAlsohttps://terpconnect.umd.edu/~toh/spectrum/Smoothing.html,https://rafalab.github.io/dsbook/smoothing.html,https://github.com/SurajGupta/r-source/blob/master/src/library/stats/src/ksmooth.cExamplesdata("XIC_QFNNTDIVLLEDFQK_3_DIAlignR")chromXIC_QFNNTDIVLLEDFQK_3_DIAlignR[["hroest_K120808_Strep10%PlasmaBiolRepl1_R03_SW_filt"]][["4618"]][[1]]##Notrun:newChromsmoothSingleXIC(chrom,type="sgolay",samplingTime=3.42,kernelLen=9,polyOrd=3)##End(Notrun) smoothXICsSmoothchromatogramsignalsfromalist DescriptionSmoothingmethodsareSavitzky-Golay,Boxcar,GaussiankernelandLOESS.Savitzky-Golaysmoothingisgoodatpreservingpeak-shapecomparedtogaussianandboxcarsmoothing.How-ever,itassumesequidistantpointsthatfortunatelyisthecaseforDIAdata.Thisrequiresaquadraticmemorytostorethetandslowerthan

81 othersmoothingmethods.UsagesmoothXICs(XI
othersmoothingmethods.UsagesmoothXICs(XICs,type="none",samplingTime=NULL,kernelLen=9L,polyOrd=NULL)ArgumentsXICs(Alist)Alistofdataframethatconsistsoftwocolumns.Firstcolumnmustbemonotonicallyincreasing.type(char)mustbeeithersgolay,boxcar,gaussian,loessornone. 80splineFillCppsamplingTime(numeric)Timedifferencebetweenneighboringpoints.kernelLen(integer)Numberofdata-pointstoconsiderinthekernel.polyOrd(integer)Orderofthepolynomialtobetinthekernel.ValueAlist.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2020)+GPL3Date:2020-02-21SeeAlsohttps://terpconnect.umd.edu/~toh/spectrum/Smoothing.html,https://rafalab.github.io/dsbook/smoothing.htmlExamplesdata("XIC_QFNNTDIVLLEDFQK_3_DIAlignR")XICsXIC_QFNNTDIVLLEDFQK_3_DIAlignR[["hroest_K120808_Strep10%PlasmaBiolRepl1_R03_SW_filt"]][["4618"]]newXICssmoothXICs(XICs,type="sgolay",samplingTime=3.42,kernelLen=9,polyOrd=3) splineFillCppInterpolateusingspline DescriptionInterpolateusingsplineUsagesplineFillCpp(x,y,xout)Argumentsx(numeric)Anumericmatrixwithsimilarityvaluesoftwosequencesorsignals.y(numeric)Penaltyforintroducingrstgapinalignment.xout(numeric)Penaltyforintroducingsubsequentgapsin

82 alignment.Value(numeric) trimXICs81Autho
alignment.Value(numeric) trimXICs81Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2021)+MITDate:2021-01-06Examplestimeseq(from=3003.4,to=3048,by=3.4)yc(0.2050595,0.8850070,2.2068768,3.7212677,5.1652605,5.8288915,5.5446804,4.5671360,3.3213154,1.9485889,0.9520709,0.3294218,0.2009581,0.1420923)y[c(1,6)]NA_real_idx!is.na(y)splineFillCpp(time[idx],y[idx],time[!idx])zoo::na.spline(zoo::zoo(y[idx],time[idx]),xout=time[!idx],method="natural") trimXICsSelectsapartofchromatograms DescriptionThisfunctiontrimschromatogramsfromtheend-points.UsagetrimXICs(XICs,len=1)ArgumentsXICs(Alist)Alistofdataframethatconsistsoftwocolumns.Firstcolumnmustbemonotonicallyincreasing.len(numeric)mustbebetween0.1and1.ValueAlist.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2020)+GPL3Date:2020-04-01Examplesdata("XIC_QFNNTDIVLLEDFQK_3_DIAlignR")XICsXIC_QFNNTDIVLLEDFQK_3_DIAlignR[["hroest_K120808_Strep10%PlasmaBiolRepl1_R03_SW_filt"]][["4618"]]##Notrun:newXICssmoothXICs(XICs,len=0.5)##End(Notrun) 82updateFileInfo updateFileInfoGetintersectionofrunsandleInfo DescriptionGetintersectionof

83 runsandleInfoUsageupdateFileInfo(fil
runsandleInfoUsageupdateFileInfo(fileInfo,runs=NULL)ArgumentsfileInfo(data-frame)outputofgetRunNamesfunction.runs(vectorofstring)namesofmzMLleswithoutextension.Value(dataframe)ithasvecolumns:spectraFile(string)asmentionedinRUNtableofoswles.runName(string)containrespectivemzMLnameswithoutextension.spectraFileID(string)IDinRUNtableofoswles.featureFile(string)pathtothefeaturele.chromatogramFile(string)pathtothechromatogramle.Author(s)ShubhamGupta,&#xshub;&#xh.gu;&#xpta@;&#xmail;&#x.uto;&#xront;&#xo.ca;ORCID:0000-0003-3500-8152License:(c)Author(2020)+GPL-3Date:2020-04-15ExamplesdataPathsystem.file("extdata",package="DIAlignR")fileInfogetRunNames(dataPath=dataPath,oswMerged=TRUE)runsc("hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt","hroest_K120808_Strep10%PlasmaBiolRepl1_R03_SW_filt")updateFileInfo(fileInfo,runs) XIC_QFNNTDIVLLEDFQK_3_DIAlignR83 XIC_QFNNTDIVLLEDFQK_3_DIAlignRExtracted-ionchromatograms(XICs)ofapeptide DescriptionXICsofpeptideQFNNTDIVLLEDFQK/3(precursorID:4618)fromthreeSWATHruns:run0:hroest_K120808_Strep10%PlasmaBiolRepl1_R03_SW_lt.chrom.mzMLrun1:hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_lt.chrom.mzMLrun2:hroest_K120809_Strep10%PlasmaBiolRepl2_R04_

84 SW_lt.chrom.mzMLUsageXIC_QFNNTDIVLLE
SW_lt.chrom.mzMLUsageXIC_QFNNTDIVLLEDFQK_3_DIAlignRFormatAlistofthreeelementswhereeachelementconsistsofalistofsixdataframes.Eachdataframehastwocolumns:timeRetentiontimeofananlyteintherun,insecintensityIntensityofsignalforthetransitionSourceRawlesaredownloadedfromPeptideAtlas.Filetest_GenerateData.Rhassourcecodetogeneratetheexampledata. IndexdatasetsalignObj_DIAlignR,8masterXICs_DIAlignR,57multipeptide_DIAlignR,59oswFiles_DIAlignR,60XIC_QFNNTDIVLLEDFQK_3_DIAlignR,83addXIC,17AffineAlignObj(AffineAlignObj-class),3AffineAlignObj-class,3AffineAlignObjLight(AffineAlignObjLight-class),4AffineAlignObjLight-class,4AffineAlignObjMedium(AffineAlignObjMedium-class),5AffineAlignObjMedium-class,5alignChromatogramsCpp,5,23,26,28AlignObj(AlignObj-class),7AlignObj-class,7alignObj_DIAlignR,8alignTargetedRuns,9,59,64,69,74,76,77analytesFromFeatures,53areaIntegrator,10as.list,AffineAlignObj-method,12as.list,AffineAlignObjLight-method,12as.list,AffineAlignObjMedium-method,13as.list,AlignObj-method,14blobXICs,18calculateIntensity,74checkParams,64childXIC,15childXICs,14,34chromatogramIdAsInteger,36constrainSimCpp,16createMZML,17,18createSqMass,18DIAlignR,19doAffineAlignmentCpp,4,5,19doAlignmentCpp,8,20fetchPept

85 idesInfo,44fetchPrecursorsInfo,39,45,47f
idesInfo,44fetchPrecursorsInfo,39,45,47fetchTransitionsFromRun,52get_ropenms,17,54,69getAlignedTimes,21getAlignedTimesCpp,23getAlignedTimesFast,25getAlignObj,23,26,26,30getAlignObjs,29getBaseGapPenaltyCpp,30getChildXICpp,31getChildXICs,33getChromatogramIndices,35,54getChromSimMatCpp,36getFeatures,10,30,38,41,42getGlobalAlignMaskCpp,39getGlobalAlignment,40,49getMST,58,59getMultipeptide,10,41getMZMLpointers,42getNodeRun,34getPeptideScores,43,48getPrecursorByID,44getPrecursors,42,46getRefRun,47getRTdf,48getRunNames,10,30,34,38,39,43–47,49,51–54getSeqSimMatCpp,50getTransitions,51getTree,69,73getXICs,52getXICs4AlignObj,30,53,53imputeChromatogram,55mapIdxToTime,5684 INDEX85mapPrecursorToChromIndices,36masterXICs_DIAlignR,57mergeXIC,15mst,58mstAlignRuns,58multipeptide_DIAlignR,59na.approx,56na.spline,56oswFiles_DIAlignR,60otherChildXICpp,60paramsDIAlignR,9,26,29,34,49,52,58,62,69–76plotAlignedAnalytes,30,64plotAlignmentPath,65plotAnalyteXICs,66,68plotXICgroup,67,67progAlignRuns,59,68,70–73progComb3,70progSplit2,71progSplit4,72progTree1,73recalculateIntensity,74script1,75script2,76setAlignmentRank,10sgolayCpp,77smoothSingleXIC,78smoothXICs,79splineFillCpp,80trimXICs,81updateFileInfo,82XIC

Related Contents


Next Show more