{"action":"created","comment":{"url":"https://api.github.com/repos/OpenMS/OpenMS/pulls/comments/30788962","id":30788962,"diff_hunk":"@@ -0,0 +1,113 @@\n+// --------------------------------------------------------------------------\n+//                   OpenMS -- Open-Source Mass Spectrometry\n+// --------------------------------------------------------------------------\n+// Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,\n+// ETH Zurich, and Freie Universitaet Berlin 2002-2015.\n+//\n+// This software is released under a three-clause BSD license:\n+//  * Redistributions of source code must retain the above copyright\n+//    notice, this list of conditions and the following disclaimer.\n+//  * Redistributions in binary form must reproduce the above copyright\n+//    notice, this list of conditions and the following disclaimer in the\n+//    documentation and/or other materials provided with the distribution.\n+//  * Neither the name of any author or any participating institution\n+//    may be used to endorse or promote products derived from this software\n+//    without specific prior written permission.\n+// For a full list of authors, refer to the file AUTHORS.\n+// --------------------------------------------------------------------------\n+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n+// ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING\n+// INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;\n+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR\n+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+//\n+// --------------------------------------------------------------------------\n+// $Maintainer: Hendrik Weisser $\n+// $Authors: Hendrik Weisser $\n+// --------------------------------------------------------------------------\n+\n+#ifndef OPENMS_FORMAT_PERCOLATOROUTFILE_H\n+#define OPENMS_FORMAT_PERCOLATOROUTFILE_H\n+\n+#include <OpenMS/KERNEL/MSExperiment.h>\n+#include <OpenMS/METADATA/PeptideIdentification.h>\n+#include <OpenMS/METADATA/ProteinIdentification.h>\n+\n+#include <boost/regex.hpp>\n+\n+#include <map>\n+#include <vector>\n+\n+namespace OpenMS\n+{\n+  /**\n+     @brief Class for reading Percolator tab-delimited output files.\n+\n+     For PSM-level output, the file extension should be \".psms\".\n+  */\n+  class OPENMS_DLLAPI PercolatorOutfile\n+  {\n+\n+  public:\n+    \n+    /// Types of Percolator scores\n+    enum ScoreType { SCORE, QVALUE, POSTERRPROB };\n+\n+    /// Constructor\n+    PercolatorOutfile();\n+\n+    /// Loads a Percolator output file\n+    void load(const String& filename, ProteinIdentification& proteins, \n+              std::vector<PeptideIdentification>& peptides, \n+              enum ScoreType output_score = QVALUE, \n+              const String& psm_regex = \"\", bool count_from_zero = false,\n+              const MSExperiment<>* experiment = 0);\n+\n+  private:\n+\n+    /// Information about a single fragment spectrum\n+    struct ScanInfo\n+    {\n+      Int charge;\n+      double rt, mz;\n+    };\n+\n+    /// Mapping: spectrum index -> fragment spectrum details\n+    typedef std::map<Size, struct ScanInfo> ScanInfoMap;\n+\n+    /// Description of how to extract information from PSM IDs\n+    struct PSMInfoExtractor\n+    {\n+      boost::regex re; // regular expression for meta data extraction","path":"src/openms/include/OpenMS/FORMAT/PercolatorOutfile.h","position":87,"original_position":87,"commit_id":"7576b8016789200ee0b9ebc804cebd34b7fdec14","original_commit_id":"7576b8016789200ee0b9ebc804cebd34b7fdec14","user":{"login":"hendrikweisser","id":2251068,"avatar_url":"https://avatars.githubusercontent.com/u/2251068?v=3","gravatar_id":"","url":"https://api.github.com/users/hendrikweisser","html_url":"https://github.com/hendrikweisser","followers_url":"https://api.github.com/users/hendrikweisser/followers","following_url":"https://api.github.com/users/hendrikweisser/following{/other_user}","gists_url":"https://api.github.com/users/hendrikweisser/gists{/gist_id}","starred_url":"https://api.github.com/users/hendrikweisser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hendrikweisser/subscriptions","organizations_url":"https://api.github.com/users/hendrikweisser/orgs","repos_url":"https://api.github.com/users/hendrikweisser/repos","events_url":"https://api.github.com/users/hendrikweisser/events{/privacy}","received_events_url":"https://api.github.com/users/hendrikweisser/received_events","type":"User","site_admin":false},"body":"> Or am I overlooking something?\r\n\r\nNot really. It also seemed more straight-forward that way.\r\nHow much of a problem is it to have the Boost dependency in the header?","created_at":"2015-05-21T10:12:57Z","updated_at":"2015-05-21T10:12:57Z","html_url":"https://github.com/OpenMS/OpenMS/pull/1424#discussion_r30788962","pull_request_url":"https://api.github.com/repos/OpenMS/OpenMS/pulls/1424","_links":{"self":{"href":"https://api.github.com/repos/OpenMS/OpenMS/pulls/comments/30788962"},"html":{"href":"https://github.com/OpenMS/OpenMS/pull/1424#discussion_r30788962"},"pull_request":{"href":"https://api.github.com/repos/OpenMS/OpenMS/pulls/1424"}}},"pull_request":{"url":"https://api.github.com/repos/OpenMS/OpenMS/pulls/1424","id":35334800,"html_url":"https://github.com/OpenMS/OpenMS/pull/1424","diff_url":"https://github.com/OpenMS/OpenMS/pull/1424.diff","patch_url":"https://github.com/OpenMS/OpenMS/pull/1424.patch","issue_url":"https://api.github.com/repos/OpenMS/OpenMS/issues/1424","number":1424,"state":"open","locked":false,"title":"Wrappers for Percolator (MS-GF+ and Mascot)","user":{"login":"hendrikweisser","id":2251068,"avatar_url":"https://avatars.githubusercontent.com/u/2251068?v=3","gravatar_id":"","url":"https://api.github.com/users/hendrikweisser","html_url":"https://github.com/hendrikweisser","followers_url":"https://api.github.com/users/hendrikweisser/followers","following_url":"https://api.github.com/users/hendrikweisser/following{/other_user}","gists_url":"https://api.github.com/users/hendrikweisser/gists{/gist_id}","starred_url":"https://api.github.com/users/hendrikweisser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hendrikweisser/subscriptions","organizations_url":"https://api.github.com/users/hendrikweisser/orgs","repos_url":"https://api.github.com/users/hendrikweisser/repos","events_url":"https://api.github.com/users/hendrikweisser/events{/privacy}","received_events_url":"https://api.github.com/users/hendrikweisser/received_events","type":"User","site_admin":false},"body":"These changes add support for using Percolator in OpenMS via GenericWrapper and IDFileConverter (as an alternative approach to TopPerc).\r\n\r\nMore specifically, MS-GF+ is supported via this workflow: MSGFPlusAdapter -> GenericWrapper (MSGFtoPercolator) -> GenericWrapper (Percolator) -> IDFileConverter\r\n\r\nAnd Mascot is supported via this workflow: MascotAdapterOnline -> GenericWrapper (MascotPercolator) -> IDFileConverter\r\n\r\nPercolator or MascotPercolator, respectively, must be installed independently. An updated version of MascotPercolator is required which will be made available for download soon.","created_at":"2015-05-13T14:50:39Z","updated_at":"2015-05-21T10:12:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"230c7d773a7d7a71b0b15f9bd2b057014d00c851","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OpenMS/OpenMS/pulls/1424/commits","review_comments_url":"https://api.github.com/repos/OpenMS/OpenMS/pulls/1424/comments","review_comment_url":"https://api.github.com/repos/OpenMS/OpenMS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenMS/OpenMS/issues/1424/comments","statuses_url":"https://api.github.com/repos/OpenMS/OpenMS/statuses/7576b8016789200ee0b9ebc804cebd34b7fdec14","head":{"label":"hendrikweisser:percolator-wrappers","ref":"percolator-wrappers","sha":"7576b8016789200ee0b9ebc804cebd34b7fdec14","user":{"login":"hendrikweisser","id":2251068,"avatar_url":"https://avatars.githubusercontent.com/u/2251068?v=3","gravatar_id":"","url":"https://api.github.com/users/hendrikweisser","html_url":"https://github.com/hendrikweisser","followers_url":"https://api.github.com/users/hendrikweisser/followers","following_url":"https://api.github.com/users/hendrikweisser/following{/other_user}","gists_url":"https://api.github.com/users/hendrikweisser/gists{/gist_id}","starred_url":"https://api.github.com/users/hendrikweisser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hendrikweisser/subscriptions","organizations_url":"https://api.github.com/users/hendrikweisser/orgs","repos_url":"https://api.github.com/users/hendrikweisser/repos","events_url":"https://api.github.com/users/hendrikweisser/events{/privacy}","received_events_url":"https://api.github.com/users/hendrikweisser/received_events","type":"User","site_admin":false},"repo":{"id":16610685,"name":"OpenMS","full_name":"hendrikweisser/OpenMS","owner":{"login":"hendrikweisser","id":2251068,"avatar_url":"https://avatars.githubusercontent.com/u/2251068?v=3","gravatar_id":"","url":"https://api.github.com/users/hendrikweisser","html_url":"https://github.com/hendrikweisser","followers_url":"https://api.github.com/users/hendrikweisser/followers","following_url":"https://api.github.com/users/hendrikweisser/following{/other_user}","gists_url":"https://api.github.com/users/hendrikweisser/gists{/gist_id}","starred_url":"https://api.github.com/users/hendrikweisser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hendrikweisser/subscriptions","organizations_url":"https://api.github.com/users/hendrikweisser/orgs","repos_url":"https://api.github.com/users/hendrikweisser/repos","events_url":"https://api.github.com/users/hendrikweisser/events{/privacy}","received_events_url":"https://api.github.com/users/hendrikweisser/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hendrikweisser/OpenMS","description":"The codebase of the OpenMS project","fork":true,"url":"https://api.github.com/repos/hendrikweisser/OpenMS","forks_url":"https://api.github.com/repos/hendrikweisser/OpenMS/forks","keys_url":"https://api.github.com/repos/hendrikweisser/OpenMS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hendrikweisser/OpenMS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hendrikweisser/OpenMS/teams","hooks_url":"https://api.github.com/repos/hendrikweisser/OpenMS/hooks","issue_events_url":"https://api.github.com/repos/hendrikweisser/OpenMS/issues/events{/number}","events_url":"https://api.github.com/repos/hendrikweisser/OpenMS/events","assignees_url":"https://api.github.com/repos/hendrikweisser/OpenMS/assignees{/user}","branches_url":"https://api.github.com/repos/hendrikweisser/OpenMS/branches{/branch}","tags_url":"https://api.github.com/repos/hendrikweisser/OpenMS/tags","blobs_url":"https://api.github.com/repos/hendrikweisser/OpenMS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hendrikweisser/OpenMS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hendrikweisser/OpenMS/git/refs{/sha}","trees_url":"https://api.github.com/repos/hendrikweisser/OpenMS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hendrikweisser/OpenMS/statuses/{sha}","languages_url":"https://api.github.com/repos/hendrikweisser/OpenMS/languages","stargazers_url":"https://api.github.com/repos/hendrikweisser/OpenMS/stargazers","contributors_url":"https://api.github.com/repos/hendrikweisser/OpenMS/contributors","subscribers_url":"https://api.github.com/repos/hendrikweisser/OpenMS/subscribers","subscription_url":"https://api.github.com/repos/hendrikweisser/OpenMS/subscription","commits_url":"https://api.github.com/repos/hendrikweisser/OpenMS/commits{/sha}","git_commits_url":"https://api.github.com/repos/hendrikweisser/OpenMS/git/commits{/sha}","comments_url":"https://api.github.com/repos/hendrikweisser/OpenMS/comments{/number}","issue_comment_url":"https://api.github.com/repos/hendrikweisser/OpenMS/issues/comments{/number}","contents_url":"https://api.github.com/repos/hendrikweisser/OpenMS/contents/{+path}","compare_url":"https://api.github.com/repos/hendrikweisser/OpenMS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hendrikweisser/OpenMS/merges","archive_url":"https://api.github.com/repos/hendrikweisser/OpenMS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hendrikweisser/OpenMS/downloads","issues_url":"https://api.github.com/repos/hendrikweisser/OpenMS/issues{/number}","pulls_url":"https://api.github.com/repos/hendrikweisser/OpenMS/pulls{/number}","milestones_url":"https://api.github.com/repos/hendrikweisser/OpenMS/milestones{/number}","notifications_url":"https://api.github.com/repos/hendrikweisser/OpenMS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hendrikweisser/OpenMS/labels{/name}","releases_url":"https://api.github.com/repos/hendrikweisser/OpenMS/releases{/id}","created_at":"2014-02-07T09:56:51Z","updated_at":"2015-04-14T10:27:40Z","pushed_at":"2015-05-15T15:06:54Z","git_url":"git://github.com/hendrikweisser/OpenMS.git","ssh_url":"git@github.com:hendrikweisser/OpenMS.git","clone_url":"https://github.com/hendrikweisser/OpenMS.git","svn_url":"https://github.com/hendrikweisser/OpenMS","homepage":null,"size":204138,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"OpenMS:develop","ref":"develop","sha":"a56a7aad93dbce1837aa5e5db00b59d92c4901e3","user":{"login":"OpenMS","id":5994841,"avatar_url":"https://avatars.githubusercontent.com/u/5994841?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenMS","html_url":"https://github.com/OpenMS","followers_url":"https://api.github.com/users/OpenMS/followers","following_url":"https://api.github.com/users/OpenMS/following{/other_user}","gists_url":"https://api.github.com/users/OpenMS/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenMS/subscriptions","organizations_url":"https://api.github.com/users/OpenMS/orgs","repos_url":"https://api.github.com/users/OpenMS/repos","events_url":"https://api.github.com/users/OpenMS/events{/privacy}","received_events_url":"https://api.github.com/users/OpenMS/received_events","type":"Organization","site_admin":false},"repo":{"id":15763403,"name":"OpenMS","full_name":"OpenMS/OpenMS","owner":{"login":"OpenMS","id":5994841,"avatar_url":"https://avatars.githubusercontent.com/u/5994841?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenMS","html_url":"https://github.com/OpenMS","followers_url":"https://api.github.com/users/OpenMS/followers","following_url":"https://api.github.com/users/OpenMS/following{/other_user}","gists_url":"https://api.github.com/users/OpenMS/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenMS/subscriptions","organizations_url":"https://api.github.com/users/OpenMS/orgs","repos_url":"https://api.github.com/users/OpenMS/repos","events_url":"https://api.github.com/users/OpenMS/events{/privacy}","received_events_url":"https://api.github.com/users/OpenMS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenMS/OpenMS","description":"The codebase of the OpenMS project","fork":false,"url":"https://api.github.com/repos/OpenMS/OpenMS","forks_url":"https://api.github.com/repos/OpenMS/OpenMS/forks","keys_url":"https://api.github.com/repos/OpenMS/OpenMS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenMS/OpenMS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenMS/OpenMS/teams","hooks_url":"https://api.github.com/repos/OpenMS/OpenMS/hooks","issue_events_url":"https://api.github.com/repos/OpenMS/OpenMS/issues/events{/number}","events_url":"https://api.github.com/repos/OpenMS/OpenMS/events","assignees_url":"https://api.github.com/repos/OpenMS/OpenMS/assignees{/user}","branches_url":"https://api.github.com/repos/OpenMS/OpenMS/branches{/branch}","tags_url":"https://api.github.com/repos/OpenMS/OpenMS/tags","blobs_url":"https://api.github.com/repos/OpenMS/OpenMS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenMS/OpenMS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenMS/OpenMS/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenMS/OpenMS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenMS/OpenMS/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenMS/OpenMS/languages","stargazers_url":"https://api.github.com/repos/OpenMS/OpenMS/stargazers","contributors_url":"https://api.github.com/repos/OpenMS/OpenMS/contributors","subscribers_url":"https://api.github.com/repos/OpenMS/OpenMS/subscribers","subscription_url":"https://api.github.com/repos/OpenMS/OpenMS/subscription","commits_url":"https://api.github.com/repos/OpenMS/OpenMS/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenMS/OpenMS/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenMS/OpenMS/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenMS/OpenMS/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenMS/OpenMS/contents/{+path}","compare_url":"https://api.github.com/repos/OpenMS/OpenMS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenMS/OpenMS/merges","archive_url":"https://api.github.com/repos/OpenMS/OpenMS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenMS/OpenMS/downloads","issues_url":"https://api.github.com/repos/OpenMS/OpenMS/issues{/number}","pulls_url":"https://api.github.com/repos/OpenMS/OpenMS/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenMS/OpenMS/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenMS/OpenMS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenMS/OpenMS/labels{/name}","releases_url":"https://api.github.com/repos/OpenMS/OpenMS/releases{/id}","created_at":"2014-01-09T10:15:13Z","updated_at":"2015-05-15T02:49:00Z","pushed_at":"2015-05-21T05:43:39Z","git_url":"git://github.com/OpenMS/OpenMS.git","ssh_url":"git@github.com:OpenMS/OpenMS.git","clone_url":"https://github.com/OpenMS/OpenMS.git","svn_url":"https://github.com/OpenMS/OpenMS","homepage":null,"size":227317,"stargazers_count":28,"watchers_count":28,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":41,"mirror_url":null,"open_issues_count":315,"forks":41,"open_issues":315,"watchers":28,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenMS/OpenMS/pulls/1424"},"html":{"href":"https://github.com/OpenMS/OpenMS/pull/1424"},"issue":{"href":"https://api.github.com/repos/OpenMS/OpenMS/issues/1424"},"comments":{"href":"https://api.github.com/repos/OpenMS/OpenMS/issues/1424/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenMS/OpenMS/pulls/1424/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenMS/OpenMS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenMS/OpenMS/pulls/1424/commits"},"statuses":{"href":"https://api.github.com/repos/OpenMS/OpenMS/statuses/7576b8016789200ee0b9ebc804cebd34b7fdec14"}}}}