# X!Tandem call style: we call tandem(input) on a single
# rTParam object.
# We create rTParam from an X!Tandem xml file
# located in the installation folder:
param <- GetParamFromXML(system.file("extdata/input.xml", package="rTANDEM"))
# We create a rTTaxo object and identify a database for yeast
taxonomy <- rTTaxo(
taxon="yeast",
format="peptide",
URL= system.file("extdata/fasta/scd.fasta.pro", package="rTANDEM")
)
# We will adjust those two objects to use one another and to use
# the path of some data and configuration files located
# in the installation folder:
param <- setParamValue(param, 'list path', 'taxonomy information', taxonomy)
param <- setParamValue(param, 'list path', 'default parameters',
value=system.file("extdata/default_input.xml", package="rTANDEM"))
param <- setParamValue(param, 'spectrum', 'path',
value=system.file("extdata/test_spectra.mgf", package="rTANDEM"))
param <- setParamValue(param, 'output', 'xsl path',
value=system.file("extdata/tandem-input-style.xsl", package="rTANDEM"))
param <- setParamValue(param, 'output', 'path',
value=paste(getwd(), "output.xml", sep="/"))
# This is the main command to run rTANDEM. The output will be
# written to a file in the working directory and the function
# returns the path to this file.
output.file <- tandem(param)
output.file
Run the code above in your browser using DataLab