-
Notifications
You must be signed in to change notification settings - Fork 1
/
TandemSearch.R
25 lines (22 loc) · 1.22 KB
/
TandemSearch.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
TandemSearch <- function(taxon = 'yeast', format = 'peptide',
FastaPath = system.file("extdata/fasta/scd.fasta.pro", package="rTANDEM"),
MGFPath = system.file("extdata/200217-2-9-.mgf", package="rTANDEM"),
InputPara = system.file("extdata/default_input.xml", package="rTANDEM"),
Output_Path = paste(getwd(), "output.xml", sep="/"))
{
taxonomy <- rTTaxo(taxon = taxon, format = format, URL = FastaPath)
param <- rTParam()
param <- setParamValue(param, 'protein', 'taxon', value="yeast")
param <- setParamValue(param, 'list path', 'taxonomy information', taxonomy)
param <- setParamValue(param, 'list path', 'default parameters',
value=InputPara)
param <- setParamValue(param, 'spectrum', 'path',
value=MGFPath)
param <- setParamValue(param, 'output', 'xsl path',
value=system.file("extdata/tandem-input-style.xsl", package="rTANDEM"))
param <- setParamValue(param, 'output', 'path',
value=Output_Path)
result.path <- tandem(param)
result.R <- GetResultsFromXML(result.path)
return(result.R)
}