{"action":"created","issue":{"url":"https://api.github.com/repos/lgatto/synapter/issues/111","repository_url":"https://api.github.com/repos/lgatto/synapter","labels_url":"https://api.github.com/repos/lgatto/synapter/issues/111/labels{/name}","comments_url":"https://api.github.com/repos/lgatto/synapter/issues/111/comments","events_url":"https://api.github.com/repos/lgatto/synapter/issues/111/events","html_url":"https://github.com/lgatto/synapter/issues/111","id":132514028,"number":111,"title":"unrecognized multiple matches in the grid search","user":{"login":"sgibb","id":1828443,"avatar_url":"https://avatars.githubusercontent.com/u/1828443?v=3","gravatar_id":"","url":"https://api.github.com/users/sgibb","html_url":"https://github.com/sgibb","followers_url":"https://api.github.com/users/sgibb/followers","following_url":"https://api.github.com/users/sgibb/following{/other_user}","gists_url":"https://api.github.com/users/sgibb/gists{/gist_id}","starred_url":"https://api.github.com/users/sgibb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgibb/subscriptions","organizations_url":"https://api.github.com/users/sgibb/orgs","repos_url":"https://api.github.com/users/sgibb/repos","events_url":"https://api.github.com/users/sgibb/events{/privacy}","received_events_url":"https://api.github.com/users/sgibb/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lgatto/synapter/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"sgibb","id":1828443,"avatar_url":"https://avatars.githubusercontent.com/u/1828443?v=3","gravatar_id":"","url":"https://api.github.com/users/sgibb","html_url":"https://github.com/sgibb","followers_url":"https://api.github.com/users/sgibb/followers","following_url":"https://api.github.com/users/sgibb/following{/other_user}","gists_url":"https://api.github.com/users/sgibb/gists{/gist_id}","starred_url":"https://api.github.com/users/sgibb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgibb/subscriptions","organizations_url":"https://api.github.com/users/sgibb/orgs","repos_url":"https://api.github.com/users/sgibb/repos","events_url":"https://api.github.com/users/sgibb/events{/privacy}","received_events_url":"https://api.github.com/users/sgibb/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/lgatto/synapter/milestones/1","html_url":"https://github.com/lgatto/synapter/milestones/2.0","labels_url":"https://api.github.com/repos/lgatto/synapter/milestones/1/labels","id":849290,"number":1,"title":"2.0","description":"","creator":{"login":"sgibb","id":1828443,"avatar_url":"https://avatars.githubusercontent.com/u/1828443?v=3","gravatar_id":"","url":"https://api.github.com/users/sgibb","html_url":"https://github.com/sgibb","followers_url":"https://api.github.com/users/sgibb/followers","following_url":"https://api.github.com/users/sgibb/following{/other_user}","gists_url":"https://api.github.com/users/sgibb/gists{/gist_id}","starred_url":"https://api.github.com/users/sgibb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgibb/subscriptions","organizations_url":"https://api.github.com/users/sgibb/orgs","repos_url":"https://api.github.com/users/sgibb/repos","events_url":"https://api.github.com/users/sgibb/events{/privacy}","received_events_url":"https://api.github.com/users/sgibb/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":28,"state":"open","created_at":"2014-11-01T11:05:40Z","updated_at":"2016-02-09T19:45:56Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-02-09T19:45:56Z","updated_at":"2016-02-22T17:59:07Z","closed_at":null,"body":"While investigating #110 I recognized that there are some multiple matches that are not filtered by fragment matching. It happens because they are not marked as multiple matching.\r\n\r\nCurrently the grid search finds multiple matching quants for one ident. But if the idents are close together it could happen that they are matched to the same quant entry, e.g.:\r\n\r\n| |protein.Accession|protein.Description|protein.falsePositiveRate|peptide.mhp|peptide.seq|peptide.score|precursor.leID.ident|precursor.mhp|precursor.retT|precursor.inten|precursor.z|precursor.mz|precursor.Mobility|predictedRt|sdRt|matchedEMRTs|spectrumID|rt_min|mwHPlus|Intensity|matched.quant.spectrumIDs|precursor.leID.quant|idSource|synapterPlgsAgreement|FragmentMatching|\r\n|---|-----------------|-------------------|-------------------------|-----------|-----------|-------------|--------------------|-------------|--------------|---------------|-----------|------------|------------------|-----------|----|------------|----------|------|-------|---------|-------------------------|--------------------|--------|---------------------|----------------|\r\n|16207|P20338|Ras-related protein Rab-4A OS=Homo sapiens GN=RAB4A PE=1 SV=3|0.0009|700.4352|IINVGGK|6.7113|16207|700.4373|34.6481|6548|1|700.4373|86894|33.8821990348665|0.500659446260807|1|8343|35.0009|700.4378|306942|8343|8343|transfer|agree|2|\r\n|25330|P27797|Calreticulin OS=Homo sapiens GN=CALR PE=1 SV=1|0|700.4352|NVLINK|7.9979|25330|700.4398|34.7458654449727|12028|1|700.4398|87102|35.2292622234454|0.544438607361508|1|8343|35.0009|700.4378|306942|8343|NA|transfer|no_plgs_id|6|\r\n\r\nThe current implementation of the most functions (even `fragmentMatching`) don't handle this case (multiple ident vs one quant; just the other way around (one ident vs multiple quants)). \r\nI am unsure whether we could improve this situation by modifying the `fragmentMatching` alone. Maybe we have to modify the grid search. \r\n\r\nBTW `fragmentMatching` would prefer the second entry because of 6 common peaks (vs 2 for the first one) but PLGS has identified the first:\r\n\r\n![dup1](https://cloud.githubusercontent.com/assets/1828443/12928425/a8b68510-cf6d-11e5-8216-e891c2ff0939.png)\r\n![dup2](https://cloud.githubusercontent.com/assets/1828443/12928431/ac304cf8-cf6d-11e5-9b08-62effa6745c5.png)\r\n\r\nI will look at the grid search the next days whether we could avoid such events.\r\n\r\n@pavel-shliaha any comments?\r\n\r\nIn @pavel-shliaha test set there are 90 pairs (181 duplicated matches, in one case there are three idents vs one quant) out of 24000 ident and 11500 quant entries.\r\n"},"comment":{"url":"https://api.github.com/repos/lgatto/synapter/issues/comments/187295288","html_url":"https://github.com/lgatto/synapter/issues/111#issuecomment-187295288","issue_url":"https://api.github.com/repos/lgatto/synapter/issues/111","id":187295288,"user":{"login":"sgibb","id":1828443,"avatar_url":"https://avatars.githubusercontent.com/u/1828443?v=3","gravatar_id":"","url":"https://api.github.com/users/sgibb","html_url":"https://github.com/sgibb","followers_url":"https://api.github.com/users/sgibb/followers","following_url":"https://api.github.com/users/sgibb/following{/other_user}","gists_url":"https://api.github.com/users/sgibb/gists{/gist_id}","starred_url":"https://api.github.com/users/sgibb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgibb/subscriptions","organizations_url":"https://api.github.com/users/sgibb/orgs","repos_url":"https://api.github.com/users/sgibb/repos","events_url":"https://api.github.com/users/sgibb/events{/privacy}","received_events_url":"https://api.github.com/users/sgibb/received_events","type":"User","site_admin":false},"created_at":"2016-02-22T17:59:07Z","updated_at":"2016-02-22T17:59:07Z","body":"> 1) after matching (including fragment matching) dont delete EMRTs that match the same peptide and write \"EMRT_matched_to_multiple_Ident_peptides\" in \"Counts\" column of the matched EMRTs data.frame\r\n\r\nWe can't do this. `Counts` is a `numeric` column. We could set `Counts` `NA` (or remove the entries completely). Or we introduce yet another column `EMRT_matched_to_multiple_Ident_peptides` with `TRUE/FALSE` (that would be again another often useless column)."}}