{"action":"created","issue":{"url":"https://api.github.com/repos/fmfi-genomika/genomikaMalGlo/issues/6","repository_url":"https://api.github.com/repos/fmfi-genomika/genomikaMalGlo","labels_url":"https://api.github.com/repos/fmfi-genomika/genomikaMalGlo/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/fmfi-genomika/genomikaMalGlo/issues/6/comments","events_url":"https://api.github.com/repos/fmfi-genomika/genomikaMalGlo/issues/6/events","html_url":"https://github.com/fmfi-genomika/genomikaMalGlo/issues/6","id":303472475,"number":6,"title":"(F) Self-alignment (medium/slow needs A)","user":{"login":"mrshu","id":461491,"avatar_url":"https://avatars2.githubusercontent.com/u/461491?v=4","gravatar_id":"","url":"https://api.github.com/users/mrshu","html_url":"https://github.com/mrshu","followers_url":"https://api.github.com/users/mrshu/followers","following_url":"https://api.github.com/users/mrshu/following{/other_user}","gists_url":"https://api.github.com/users/mrshu/gists{/gist_id}","starred_url":"https://api.github.com/users/mrshu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrshu/subscriptions","organizations_url":"https://api.github.com/users/mrshu/orgs","repos_url":"https://api.github.com/users/mrshu/repos","events_url":"https://api.github.com/users/mrshu/events{/privacy}","received_events_url":"https://api.github.com/users/mrshu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"pecox","id":11404672,"avatar_url":"https://avatars1.githubusercontent.com/u/11404672?v=4","gravatar_id":"","url":"https://api.github.com/users/pecox","html_url":"https://github.com/pecox","followers_url":"https://api.github.com/users/pecox/followers","following_url":"https://api.github.com/users/pecox/following{/other_user}","gists_url":"https://api.github.com/users/pecox/gists{/gist_id}","starred_url":"https://api.github.com/users/pecox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pecox/subscriptions","organizations_url":"https://api.github.com/users/pecox/orgs","repos_url":"https://api.github.com/users/pecox/repos","events_url":"https://api.github.com/users/pecox/events{/privacy}","received_events_url":"https://api.github.com/users/pecox/received_events","type":"User","site_admin":false},"assignees":[{"login":"pecox","id":11404672,"avatar_url":"https://avatars1.githubusercontent.com/u/11404672?v=4","gravatar_id":"","url":"https://api.github.com/users/pecox","html_url":"https://github.com/pecox","followers_url":"https://api.github.com/users/pecox/followers","following_url":"https://api.github.com/users/pecox/following{/other_user}","gists_url":"https://api.github.com/users/pecox/gists{/gist_id}","starred_url":"https://api.github.com/users/pecox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pecox/subscriptions","organizations_url":"https://api.github.com/users/pecox/orgs","repos_url":"https://api.github.com/users/pecox/repos","events_url":"https://api.github.com/users/pecox/events{/privacy}","received_events_url":"https://api.github.com/users/pecox/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-03-08T13:04:47Z","updated_at":"2018-03-14T20:00:19Z","closed_at":null,"author_association":"COLLABORATOR","body":"- The goal here is to find regions in the genome which have multiple approximate copies\r\n- First we need to create local alignments of the genome to itself, then convert them to appropriate format\r\n- Last year done by blastz: https://github.com/fmfi-genomika/genomika-2017/wiki/Self-alignments---self-chain---segmental-duplications\r\n- This yeast I suggest using program last (ubuntu package last-align, website http://last.cbrc.jp/)\r\n- Here is an example how I have done it in the past, it would be great to rewrite one-liners to some nicer script\r\n   - ideally also patch the bug in pslToChain and submit the patch to the UCSC genome github\r\n\r\n\r\n```\r\nlastdb genome.fa genome.fa \r\nlastal genome.fa genome.fa -E 1e-20 > self.maf #slow part\r\nmaf-convert psl self.maf > tmpC.psl\r\n\r\n# filter out trivial self-alignments as well as alignments shorter than 100bp in one of the two sequences or with identity less than 0.9\r\nperl -lane 'die unless @F==21; $s=($F[9] eq $F[13] && $F[10]==$F[12] && $F[11]==0); $s = $s || $F[12]-$F[11]<100 || $F[16]-$F[15]<100 || $F[0]<0.9*($F[0]+$F[1]+$F[2]+$F[3]+$F[5]+$F[7]); print unless $s' tmpC.psl > tmpC100_90.psl\r\npslToChain tmpC100_90.psl tmpC100_90.chain # kent tools binary, available on genomika\r\n# fix bad coordinates on reverse strand \r\nperl -lane 'if ($F[0] eq \"chain\" && $F[9] eq \"-\") { ($F[10],$F[11]) = ($F[8]-$F[11], $F[8]-$F[10]); print join(\" \", @F) } else { print }' tmpC100_90.chain > self100_90.chain\r\n\r\n# another chain for alignments with at least 70% identity and length at least 300bp\r\nperl -lane 'die unless @F==21; $s=($F[9] eq $F[13] && $F[10]==$F[12] && $F[11]==0); $s = $s || $F[12]-$F[11]<300 || $F[16]-$F[15]<300 || $F[0]<0.7*($F[0]+$F[1]+$F[2]+$F[3]+$F[5]+$F[7]); print unless $s' tmpC.psl > tmpC300_70.psl\r\n/projects2/dipMag/magCap-2017/assembly/magCapA/seq-tracks/pslToChain tmpC300_70.psl tmpC300_70.chain # kent tools binary copied from genome-dev\r\n# fix bad coordinates on reverse strand \r\nperl -lane 'if ($F[0] eq \"chain\" && $F[9] eq \"-\") { ($F[10],$F[11]) = ($F[8]-$F[11], $F[8]-$F[10]); print join(\" \", @F) } else { print }' tmpC300_70.chain > self300_70.chain\r\n```\r\n\r\nParts of trackDb.ra (replace magCap5 with your genome name):\r\n\r\n```\r\ntrack selfChain100_90\r\nshortLabel Self aln >90%id\r\nlongLabel Self alignments with length >100bp, identity >90%\r\ngroup varRep\r\ntype chain magCapA5\r\n\r\ntrack selfChain300_70\r\nshortLabel Self aln >70%id\r\nlongLabel Self alignments with length >300bp, identity >70%\r\ngroup varRep\r\ntype chain magCapA5\r\n```"},"comment":{"url":"https://api.github.com/repos/fmfi-genomika/genomikaMalGlo/issues/comments/373155363","html_url":"https://github.com/fmfi-genomika/genomikaMalGlo/issues/6#issuecomment-373155363","issue_url":"https://api.github.com/repos/fmfi-genomika/genomikaMalGlo/issues/6","id":373155363,"user":{"login":"mrshu","id":461491,"avatar_url":"https://avatars2.githubusercontent.com/u/461491?v=4","gravatar_id":"","url":"https://api.github.com/users/mrshu","html_url":"https://github.com/mrshu","followers_url":"https://api.github.com/users/mrshu/followers","following_url":"https://api.github.com/users/mrshu/following{/other_user}","gists_url":"https://api.github.com/users/mrshu/gists{/gist_id}","starred_url":"https://api.github.com/users/mrshu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrshu/subscriptions","organizations_url":"https://api.github.com/users/mrshu/orgs","repos_url":"https://api.github.com/users/mrshu/repos","events_url":"https://api.github.com/users/mrshu/events{/privacy}","received_events_url":"https://api.github.com/users/mrshu/received_events","type":"User","site_admin":false},"created_at":"2018-03-14T20:00:19Z","updated_at":"2018-03-14T20:00:19Z","author_association":"COLLABORATOR","body":"@pecox anything I can help with here?"}}
{"actor":{"display_login":"mrshu"}}