{"action":"created","issue":{"url":"https://api.github.com/repos/mirnylab/pairsamtools/issues/68","repository_url":"https://api.github.com/repos/mirnylab/pairsamtools","labels_url":"https://api.github.com/repos/mirnylab/pairsamtools/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/mirnylab/pairsamtools/issues/68/comments","events_url":"https://api.github.com/repos/mirnylab/pairsamtools/issues/68/events","html_url":"https://github.com/mirnylab/pairsamtools/issues/68","id":324494926,"number":68,"title":"Fragment-level analysis","user":{"login":"Phlya","id":2895034,"avatar_url":"https://avatars3.githubusercontent.com/u/2895034?v=4","gravatar_id":"","url":"https://api.github.com/users/Phlya","html_url":"https://github.com/Phlya","followers_url":"https://api.github.com/users/Phlya/followers","following_url":"https://api.github.com/users/Phlya/following{/other_user}","gists_url":"https://api.github.com/users/Phlya/gists{/gist_id}","starred_url":"https://api.github.com/users/Phlya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Phlya/subscriptions","organizations_url":"https://api.github.com/users/Phlya/orgs","repos_url":"https://api.github.com/users/Phlya/repos","events_url":"https://api.github.com/users/Phlya/events{/privacy}","received_events_url":"https://api.github.com/users/Phlya/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-05-18T17:37:37Z","updated_at":"2018-05-18T18:34:35Z","closed_at":null,"author_association":"NONE","body":"Discussion to address https://github.com/mirnylab/distiller-nf/issues/96.\r\nSince there is `pairsamtools restrict`, we can use that as a starting point for adding fragment-level stats. But after some thinking, it seems more complicated to implement properly than I thought.\r\n\r\nSo, how about we add another column (`pair_frags_type`?) to the pairs file with the classification of the pairs according to this. And then maybe the actual counting can be a part of the regular stats? Then in `distiller` `restrict` should be called before `stats`, if we include it there (and I think it should be there since people expect this kind of stats)?\r\n\r\nHere is a list of the stats that need to be implemented, basing off of `hiclib`. What did I forget?\r\n\r\n- Same-fragment pairs\r\n  - Dangling ends: pairs oriented towards each other that map to the same restriction fragment.\r\n  - Self-circles: the same, except they face in opposite directions.\r\n  - Self-ligations: the same, but oriented in the same direction (afaiu was not implemented in `hiclib`, but seems logical to include it)\r\n  - `hiclib` also has a category \"error\" here, what does that mean? @mimakaev \r\n- Undigested pairs - pairs that probably came from undigested or simply re-ligated fragments, so they face towards each other, map to different fragments, but the whole molecule is shorter than a certain threshold, which is the upper size of fragment sizes in the library. I'm presuming this is the \"extraDandlingEnds\" in `hiclib`?\r\n  - Can we estimate the fragment size from the pairs, by the way? E.g. as the longest dangling end? Something to think about.\r\n- Nothing from the above - \"Distal\"?\r\n- Did I forget something?"},"comment":{"url":"https://api.github.com/repos/mirnylab/pairsamtools/issues/comments/390294989","html_url":"https://github.com/mirnylab/pairsamtools/issues/68#issuecomment-390294989","issue_url":"https://api.github.com/repos/mirnylab/pairsamtools/issues/68","id":390294989,"user":{"login":"Phlya","id":2895034,"avatar_url":"https://avatars3.githubusercontent.com/u/2895034?v=4","gravatar_id":"","url":"https://api.github.com/users/Phlya","html_url":"https://github.com/Phlya","followers_url":"https://api.github.com/users/Phlya/followers","following_url":"https://api.github.com/users/Phlya/following{/other_user}","gists_url":"https://api.github.com/users/Phlya/gists{/gist_id}","starred_url":"https://api.github.com/users/Phlya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Phlya/subscriptions","organizations_url":"https://api.github.com/users/Phlya/orgs","repos_url":"https://api.github.com/users/Phlya/repos","events_url":"https://api.github.com/users/Phlya/events{/privacy}","received_events_url":"https://api.github.com/users/Phlya/received_events","type":"User","site_admin":false},"created_at":"2018-05-18T18:34:35Z","updated_at":"2018-05-18T18:34:35Z","author_association":"NONE","body":"I think we just need to tweak the output of stats a bit so that we don't don't need to do anything on the raw pairs - it already saves number of contacts at different distance with different orientations. I can make a plot like this from stats:\r\n![image](https://user-images.githubusercontent.com/2895034/40251732-18018252-5ad2-11e8-8033-4ee5c67f6aae.png)\r\n\r\nI suppose, it lack normalisation over the areas for each bin...\r\n(This is all for mouse - with no centromeres, whether not counting over-centromeres pairs in stats directly is feasible I am not sure)\r\n\r\nAlso, if there any ideas what went wrong with the \"Bad\" sample, I would be happy to hear your thoughts..."}}
{"actor":{"display_login":"Phlya"}}