{"action":"created","issue":{"url":"https://api.github.com/repos/nextgenusfs/funannotate/issues/37","repository_url":"https://api.github.com/repos/nextgenusfs/funannotate","labels_url":"https://api.github.com/repos/nextgenusfs/funannotate/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/nextgenusfs/funannotate/issues/37/comments","events_url":"https://api.github.com/repos/nextgenusfs/funannotate/issues/37/events","html_url":"https://github.com/nextgenusfs/funannotate/issues/37","id":194197970,"number":37,"title":"GAG failure","user":{"login":"antben","id":11451490,"avatar_url":"https://avatars.githubusercontent.com/u/11451490?v=3","gravatar_id":"","url":"https://api.github.com/users/antben","html_url":"https://github.com/antben","followers_url":"https://api.github.com/users/antben/followers","following_url":"https://api.github.com/users/antben/following{/other_user}","gists_url":"https://api.github.com/users/antben/gists{/gist_id}","starred_url":"https://api.github.com/users/antben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antben/subscriptions","organizations_url":"https://api.github.com/users/antben/orgs","repos_url":"https://api.github.com/users/antben/repos","events_url":"https://api.github.com/users/antben/events{/privacy}","received_events_url":"https://api.github.com/users/antben/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-07T22:59:43Z","updated_at":"2016-12-08T19:49:34Z","closed_at":null,"body":"Hi Jon,\r\n\r\nI'm getting this error:\r\n[03:01:06 PM]: Converting to preliminary Genbank format\r\nTraceback (most recent call last):\r\n  File \"/data/local/funannotate/2016-08-24/funannotate/bin/funannotate-predict.py\", line 956, in <module>\r\n    shutil.copyfile(os.path.join('gag2', 'genome.fasta'), os.path.join('gag2', 'genome.fsa'))\r\n  File \"/usr/local/python/2.7.12/lib/python2.7/shutil.py\", line 82, in copyfile\r\n    with open(src, 'rb') as fsrc:\r\nIOError: [Errno 2] No such file or directory: 'gag2/genome.fasta'\r\n\r\nWhen I try to run the second GAG conversion manually, I get: \r\n  File \"/Genomics/kocherlab/berubin/local/src/GAG/src/gff_reader.py\", line 352, in read_file\r\n    parent_gene = self.genes[mrna.parent_id]\r\nKeyError: 'evm.TU.2371.1'\r\n\r\nThe \"mRNA\", \"CDS\", and \"exon\" features for that parent are present in \"cleaned.gff3\" but the \"gene\" feature is not. Notably, that \"gene\" feature is in \"bad_models.gff\". So the issue seems to stem from the elimination of bad \"gene\" features but not all of the corresponding \"mRNA\", \"CDS\", and \"exons\". It looks like there are only 38 features that are missing their parent. Does this make sense? Any suggestions for working around the problem?\r\n\r\nThanks,\r\nBen"},"comment":{"url":"https://api.github.com/repos/nextgenusfs/funannotate/issues/comments/265836765","html_url":"https://github.com/nextgenusfs/funannotate/issues/37#issuecomment-265836765","issue_url":"https://api.github.com/repos/nextgenusfs/funannotate/issues/37","id":265836765,"user":{"login":"antben","id":11451490,"avatar_url":"https://avatars.githubusercontent.com/u/11451490?v=3","gravatar_id":"","url":"https://api.github.com/users/antben","html_url":"https://github.com/antben","followers_url":"https://api.github.com/users/antben/followers","following_url":"https://api.github.com/users/antben/following{/other_user}","gists_url":"https://api.github.com/users/antben/gists{/gist_id}","starred_url":"https://api.github.com/users/antben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antben/subscriptions","organizations_url":"https://api.github.com/users/antben/orgs","repos_url":"https://api.github.com/users/antben/repos","events_url":"https://api.github.com/users/antben/events{/privacy}","received_events_url":"https://api.github.com/users/antben/received_events","type":"User","site_admin":false},"created_at":"2016-12-08T19:49:34Z","updated_at":"2016-12-08T19:49:34Z","body":"Hey Jon,\n\nYes, this is a bit mysterious. The one thing that looks a little suspicious\nis that the protein translation in \"gag1/genome.proteins.fasta\" looks quite\nbad:\n\n>evm.model.2371.1 protein\nSRQSFVHWIL*I*KNII**ILILEQKAMSKNIMTLQLIRRTLLIVL*TLRLIFQIP**NPEIRLAR*KLIVRT*KKRRLSF*NNNLF*ILCMTNRPPAKLYF*ILLGQNFLPHLMMK**KLLDGIFKGTCCL*IFLTKKALTTAALLKTGWIL*LKSY*MTILDFLNRMRIKPPLGHLNMT\n\nI don't actually see how that could be causing the problem though.\n\nI just noticed that model 2023 is in \"bad_models.gff\". Could that be\nmatching just the gene feature of 2371? Since the description is\n\"Name=EVM%20prediction%202371.1\" and, therefore, contains the string \"2023\"?\n\nIs there an easy way that I can feed a corrected version of \"cleaned.gff3\"\ninto the pipeline and just have it continue from that step? I'm working on\na cluster so can't modify the code directly, though I am working on\ninstalling locally as well.\n\nThanks,\nBen\n\nOn Thu, Dec 8, 2016 at 10:58 AM, Jon Palmer <notifications@github.com>\nwrote:\n\n> Hi Ben,\n> So basically here is what the removeBadModels function does (this is very\n> hackish because parsing GFF files properly parent:child features is\n> difficult - but certainly this could be improved):\n>\n>    1. runs BedTools intersect with the GFF from repeat masker and your\n>    GFF and finds gene models that are at least 90% overlapping with repeat\n>    region\n>    2. then parses BLASTP search of transposon protein models\n>    3. looks for proteins that are less than specified length or contain\n>    XXX (meaning they are spanning regions of ambiguous DNA sequence).\n>    4. finally, it takes all of these \"bad gene models\" into a list and\n>    then tries to reduce that list to the gene name, i.e. the part of the name\n>    that is the same in all parent:child features, in this case it is\n>    2371.1. The function then parses the incoming GFF file and uses a\n>    regex search (search is setup to catch the basename followed by a\n>    semi-colon to make sure it isn't also matching something like 2371.12)\n>    for matching lines in the \"bad model list\", dumps the lines that don't\n>    match into the \"good GFF\" and those that match into the \"bad GFF\".\n>\n> It seems like the regex search missed the children of these models or that\n> the gene model got picked up and it was not suppose to. What is strange is\n> that I took your GFF file, recapitulated the regex search on my computer\n> and it gets picked up, so I'm not sure what the problem is. Here is the\n> little test that I did if you want to try it. Here's my version of python: Python\n> 2.7.12: GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.38)\n>\n> Your GFF snippets file\n> <https://github.com/nextgenusfs/funannotate/files/639867/test.txt>\n>\n> import re\n> remove = ['evm.TU.2371.1', 'evm.TU.2372.5', 'evm.model.2371.2']\n> remove = [w.replace('evm.TU.','') for w in remove]\n> remove = [w.replace('evm.model.','') for w in remove]\n> remove_match = re.compile(r'\\b(?:%s)[\\.;]+\\b' % '|'.join(remove))\n> with open('test.txt', 'rU') as input:\n>      for line in input:\n>           if not remove_match.search(line):\n>                print \"Good Hits: \"+line\n>           else:\n>                print \"Bad Hits: \"+line\n>\n> This then output:\n>\n> Bad Hits: 2371    EVM     gene    135     750     .       -       .       ID=evm.TU.2371.1;Name=EVM%20prediction%202371.1\n> Bad Hits: 2371    EVM     mRNA    135     750     .       -       .       ID=evm.model.2371.1;Parent=evm.TU.2371.1;Name=EVM%20prediction%202371.1\n> Bad Hits: 2371    EVM     exon    650     750     .       -       .       ID=evm.model.2371.1.exon1;Parent=evm.model.2371.1\n> Bad Hits: 2371    EVM     CDS     650     750     .       -       1       ID=cds.evm.model.2371.1;Parent=evm.model.2371.1\n> Bad Hits: 2371    EVM     exon    135     580     .       -       .       ID=evm.model.2371.1.exon2;Parent=evm.model.2371.1\n> Bad Hits: 2371    EVM     CDS     135     580     .       -       2       ID=cds.evm.model.2371.1;Parent=evm.model.2371.1\n>\n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/nextgenusfs/funannotate/issues/37#issuecomment-265776020>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AK68YodKbaXbfIcNLa731t1X_94nkJxaks5rGCkNgaJpZM4LHOpE>\n> .\n>\n"}}
{"actor":{"display_login":"antben"}}