ProteoWizard
Main Page
Namespaces
Classes
Files
File List
File Members
pwiz
data
identdata
ExtendedReadTest.cpp
Go to the documentation of this file.
1
//
2
// $Id: ExtendedReadTest.cpp 4129 2012-11-20 00:05:37Z chambm $
3
//
4
//
5
// Original author: Robert Burke <robert.burke@proteowizard.org>
6
//
7
// Copyright 2009 Spielberg Family Center for Applied Proteomics
8
// University of Southern California, Los Angeles, California 90033
9
//
10
// Licensed under the Apache License, Version 2.0 (the "License");
11
// you may not use this file except in compliance with the License.
12
// You may obtain a copy of the License at
13
//
14
// http://www.apache.org/licenses/LICENSE-2.0
15
//
16
// Unless required by applicable law or agreed to in writing, software
17
// distributed under the License is distributed on an "AS IS" BASIS,
18
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
// See the License for the specific language governing permissions and
20
// limitations under the License.
21
//
22
23
#include "
IdentDataFile.hpp
"
24
#include "
DefaultReaderList.hpp
"
25
#include "
IO.hpp
"
26
#include "
pwiz/utility/misc/Std.hpp
"
27
28
using namespace
pwiz::identdata;
29
30
const
char
*
filenames
[] =
31
{
32
"Mascot_MSMS_example.mzid"
,
33
"omssa_example_full.mzid"
,
34
"Mascot_mzml_example.mzid"
,
35
"PMF_example.mzid"
,
36
"Mascot_N15_example.mzid"
,
37
"Sequest_example.mzid"
,
38
"Mascot_NA_example.mzid"
,
39
"spectraST.mzid"
,
40
"Mascot_top_down_example.mzid"
,
41
"xtandem_example_full.mzid"
,
42
"MPC_example.mzid"
43
};
44
45
void
testFile
(
const
string
& inFilepath,
const
string
& outFilepath)
46
{
47
cout <<
"reading file in from "
<< inFilepath << endl;
48
IdentDataFile
mzid(inFilepath);
49
50
cout <<
"writing file out to "
<< outFilepath << endl;
51
mzid.
write
(outFilepath);
52
cout <<
"done.\n"
;
53
}
54
55
56
int
main
(
int
argc,
char
* argv[])
57
{
58
TEST_PROLOG
(argc, argv)
59
60
try
61
{
62
if
(argc == 3)
63
testFile
(argv[1], argv[2]);
64
else
65
{
66
cout <<
"only have "
<< argc <<
" arguments:\n"
;
67
for
(
int
i=0; i<argc; i++)
68
cout << argv[i] << endl;
69
}
70
71
cout <<
"\nhttp://proteowizard.sourceforge.net\n"
72
<<
"support@proteowizard.org\n"
;
73
74
}
75
catch
(exception& e)
76
{
77
TEST_FAILED
(e.what())
78
}
79
catch
(...)
80
{
81
TEST_FAILED
(
"Caught unknown exception."
)
82
}
83
84
TEST_EPILOG
85
}
filenames
const char * filenames[]
Definition:
ExtendedReadTest.cpp:30
TEST_EPILOG
#define TEST_EPILOG
Definition:
unit.hpp:166
Std.hpp
pwiz::identdata::IdentDataFile
IdentData object plus file I/O.
Definition:
IdentDataFile.hpp:39
main
int main(int argc, char *argv[])
Definition:
ExtraZeroSamplesFilterTest.cpp:133
pwiz::identdata::IdentDataFile::write
static void write(const IdentData &mzid, const std::string &filename, const WriteConfig &config=WriteConfig(), const pwiz::util::IterationListenerRegistry *iterationListenerRegistry=0)
static write function for any IdentData object;
IO.hpp
IdentDataFile.hpp
TEST_FAILED
#define TEST_FAILED(x)
Definition:
unit.hpp:160
TEST_PROLOG
#define TEST_PROLOG(argc, argv)
Definition:
unit.hpp:158
testFile
void testFile(const string &inFilepath, const string &outFilepath)
Definition:
ExtendedReadTest.cpp:45
DefaultReaderList.hpp
Generated on Fri Nov 15 2013 10:34:07 for ProteoWizard by
1.8.5