{"action":"created","issue":{"url":"https://api.github.com/repos/tanghaibao/jcvi/issues/23","repository_url":"https://api.github.com/repos/tanghaibao/jcvi","labels_url":"https://api.github.com/repos/tanghaibao/jcvi/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/tanghaibao/jcvi/issues/23/comments","events_url":"https://api.github.com/repos/tanghaibao/jcvi/issues/23/events","html_url":"https://github.com/tanghaibao/jcvi/issues/23","id":173708202,"number":23,"title":"Why does whisker disappear in the karyotype figure of 3 species?","user":{"login":"sophy7074","id":8351253,"avatar_url":"https://avatars.githubusercontent.com/u/8351253?v=3","gravatar_id":"","url":"https://api.github.com/users/sophy7074","html_url":"https://github.com/sophy7074","followers_url":"https://api.github.com/users/sophy7074/followers","following_url":"https://api.github.com/users/sophy7074/following{/other_user}","gists_url":"https://api.github.com/users/sophy7074/gists{/gist_id}","starred_url":"https://api.github.com/users/sophy7074/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sophy7074/subscriptions","organizations_url":"https://api.github.com/users/sophy7074/orgs","repos_url":"https://api.github.com/users/sophy7074/repos","events_url":"https://api.github.com/users/sophy7074/events{/privacy}","received_events_url":"https://api.github.com/users/sophy7074/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-08-29T06:54:24Z","updated_at":"2016-09-07T15:40:16Z","closed_at":null,"body":"Hi HaiBao,\r\nI got the karyotype figure successfully following https://github.com/tanghaibao/jcvi/wiki/MCscan-(Python-version).\r\nFirstly, I got the karyotype figure between A and B.\r\n![image](https://cloud.githubusercontent.com/assets/8351253/18045645/6b7598d4-6e06-11e6-94ab-c6d5a15fb6b3.png)\r\n\r\n\r\nSecondly, I got the karyotype figure between B and C. \r\n![image](https://cloud.githubusercontent.com/assets/8351253/18045633/582bdc8e-6e06-11e6-8057-90d6c03a1c1b.png)\r\n\r\nThen I `cat B.A.anchors B.C.anchors > B.2Spp.anchors;\r\ncat A.bed C.bed > 2Spp.bed;\r\npython -m jcvi.compara.synteny screen --minspan=10 --simple B.2Sp.anchors B.2Spp.anchors.simple` and modified the context of seqids and layout:\r\n**seqids:**\r\nChrA1,ChrA2,ChrA3,...\r\nscaffoldB1,scaffoldB2,scaffoldB3,...\r\nchC1,chC2,chC3,...\r\n**layout:**\r\n\\# y, xstart, xend, rotation, color, label,     va,      bed\r\n .8,     .1,    .8,       0,  blue,  A,      top,  2Spp.bed\r\n .6,     .1,    .8,       0,   red,  B, bottom,       B.bed\r\n .4,     .1,    .8,       0, green, C,    top,    2Spp.bed\r\n\\# edges\r\ne, 0, 1, B.2Spp.anchors.simple\r\n\r\nbut the whisker disappeared in figure:\r\n![image](https://cloud.githubusercontent.com/assets/8351253/18045439/6900acfc-6e05-11e6-8aae-1d905fec3995.png)\r\n\r\nHow can I add the whisker?\r\n\r\nSincerely,\r\nTiany"},"comment":{"url":"https://api.github.com/repos/tanghaibao/jcvi/issues/comments/245322231","html_url":"https://github.com/tanghaibao/jcvi/issues/23#issuecomment-245322231","issue_url":"https://api.github.com/repos/tanghaibao/jcvi/issues/23","id":245322231,"user":{"login":"tanghaibao","id":106987,"avatar_url":"https://avatars.githubusercontent.com/u/106987?v=3","gravatar_id":"","url":"https://api.github.com/users/tanghaibao","html_url":"https://github.com/tanghaibao","followers_url":"https://api.github.com/users/tanghaibao/followers","following_url":"https://api.github.com/users/tanghaibao/following{/other_user}","gists_url":"https://api.github.com/users/tanghaibao/gists{/gist_id}","starred_url":"https://api.github.com/users/tanghaibao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tanghaibao/subscriptions","organizations_url":"https://api.github.com/users/tanghaibao/orgs","repos_url":"https://api.github.com/users/tanghaibao/repos","events_url":"https://api.github.com/users/tanghaibao/events{/privacy}","received_events_url":"https://api.github.com/users/tanghaibao/received_events","type":"User","site_admin":false},"created_at":"2016-09-07T15:40:15Z","updated_at":"2016-09-07T15:40:15Z","body":"Tiany,\n\nGood that you find the issues. I pointed you the samearc parameter, but\nthere needs to be some code changes. If your top two tracks are track-0 and\ntrack-1 for example, you can set samearc = \"above\" if (i, j) == (0, 1). A\ncleaner solution is to put the samearc option in the edge lines.\n\nThe block exchange code is there to handle the situation when the query and\nsubject are switched. For example, your .simple file may have tomato in the\nquery (first two columns), but instead should be in the subject (next two\ncolumns). The code will then effectively check existence of gene in both\nquery and subject. In your case, I don't yet understand why MAG11416-RA\ndoesn't exist in the .bed since the .simple file should be derived from the\nsynteny calculation which uses the .bed file.\n\nSorry for the confusion. Some behavior of the code requires a good\nunderstanding of the peculiarities of the synteny blocks. If you find a\nsolution, please make a pull request and I'll merge your changes later.\n\nHaibao\n\nOn Wed, Sep 7, 2016 at 1:02 AM, Tiany <notifications@github.com> wrote:\n\n> Hi HaiBao,\n>\n> When I processed data and config files, I found the first question happend\n> because the scaffold where blocks locate were deleted in seqids. There is\n> nothing wrong about highlight in jcvi.\n>\n> About the second problem, it didn't work after I change samearc parameter.\n> Line 124 samearc = \"above\" if i == j and i == 0 else \"below\" in\n> karyotype.py means that whiskers only can be drawn above when they connect\n> scaffolds in same specie (i = j). In my figure, they connect scaffolds from\n> different species. If I change edges in layout file, a KeyError occurred\n> because it can not find track-1.\n>\n> Besides, I read the code after KeyError occurred. I found that the code\n> https://github.com/tanghaibao/jcvi/blob/master/compara/synteny.py#L238 to\n> https://github.com/tanghaibao/jcvi/blob/master/compara/synteny.py#L241\n> make no sense.\n>\n> If genes in blocks exists in *.simple but not in *.bed, the order of genes\n> in block exchange (Like the first problem). Then\n> https://github.com/tanghaibao/jcvi/blob/master/graphics/karyotype.py#L221\n> fails because a and b from track[j] can not exist in atrack (track[i]).\n> Example:\n> KeyError:\n> [image: 3]\n> <https://cloud.githubusercontent.com/assets/8351253/18303226/93b39404-750e-11e6-9da1-d081cfa66031.PNG>\n> Block:\n> [image: 1]\n> <https://cloud.githubusercontent.com/assets/8351253/18303170/502aad44-750e-11e6-8030-7241630d9a0d.PNG>\n> Bed:\n> [image: 2]\n> <https://cloud.githubusercontent.com/assets/8351253/18303175/56217f5c-750e-11e6-8dad-48b65b68af4e.PNG>\n> In fact, the gene MAG11416-RA did not exist in Mage.bed. It is difficult\n> to correct.\n>\n> If the bed file can't be loaded seem as the situation in second problem\n> after I change e, 0, 0, *.simple, or everthing is right, these codes\n> don't even run.\n> I modify the code:\n> [image: image]\n> <https://cloud.githubusercontent.com/assets/8351253/18303686/ea67ac2a-7510-11e6-9e9f-e185a3cd783c.png>\n>\n> Files I used for plotting are in https://github.com/sophy7074/\n> jcvi-karotype-example .\n>\n> Thank you!\n> Tiany\n>\n> —\n> You are receiving this because you commented.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/tanghaibao/jcvi/issues/23#issuecomment-245205654>, or mute\n> the thread\n> <https://github.com/notifications/unsubscribe-auth/AAGh66NuJNrB8A7d-jFCroOFBLH45mA2ks5qnm-lgaJpZM4JvMZt>\n> .\n>\n"}}
{"actor":{"display_login":"tanghaibao"}}