{"action":"created","issue":{"url":"https://api.github.com/repos/bonsai-team/matam/issues/61","repository_url":"https://api.github.com/repos/bonsai-team/matam","labels_url":"https://api.github.com/repos/bonsai-team/matam/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/bonsai-team/matam/issues/61/comments","events_url":"https://api.github.com/repos/bonsai-team/matam/issues/61/events","html_url":"https://github.com/bonsai-team/matam/issues/61","id":317284013,"node_id":"MDU6SXNzdWUzMTcyODQwMTM=","number":61,"title":"Error in taxonomic assignment","user":{"login":"jmtsuji","id":18713012,"node_id":"MDQ6VXNlcjE4NzEzMDEy","avatar_url":"https://avatars2.githubusercontent.com/u/18713012?v=4","gravatar_id":"","url":"https://api.github.com/users/jmtsuji","html_url":"https://github.com/jmtsuji","followers_url":"https://api.github.com/users/jmtsuji/followers","following_url":"https://api.github.com/users/jmtsuji/following{/other_user}","gists_url":"https://api.github.com/users/jmtsuji/gists{/gist_id}","starred_url":"https://api.github.com/users/jmtsuji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmtsuji/subscriptions","organizations_url":"https://api.github.com/users/jmtsuji/orgs","repos_url":"https://api.github.com/users/jmtsuji/repos","events_url":"https://api.github.com/users/jmtsuji/events{/privacy}","received_events_url":"https://api.github.com/users/jmtsuji/received_events","type":"User","site_admin":false},"labels":[{"id":326436555,"node_id":"MDU6TGFiZWwzMjY0MzY1NTU=","url":"https://api.github.com/repos/bonsai-team/matam/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":{"login":"loic-couderc","id":23629447,"node_id":"MDQ6VXNlcjIzNjI5NDQ3","avatar_url":"https://avatars1.githubusercontent.com/u/23629447?v=4","gravatar_id":"","url":"https://api.github.com/users/loic-couderc","html_url":"https://github.com/loic-couderc","followers_url":"https://api.github.com/users/loic-couderc/followers","following_url":"https://api.github.com/users/loic-couderc/following{/other_user}","gists_url":"https://api.github.com/users/loic-couderc/gists{/gist_id}","starred_url":"https://api.github.com/users/loic-couderc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loic-couderc/subscriptions","organizations_url":"https://api.github.com/users/loic-couderc/orgs","repos_url":"https://api.github.com/users/loic-couderc/repos","events_url":"https://api.github.com/users/loic-couderc/events{/privacy}","received_events_url":"https://api.github.com/users/loic-couderc/received_events","type":"User","site_admin":false},"assignees":[{"login":"loic-couderc","id":23629447,"node_id":"MDQ6VXNlcjIzNjI5NDQ3","avatar_url":"https://avatars1.githubusercontent.com/u/23629447?v=4","gravatar_id":"","url":"https://api.github.com/users/loic-couderc","html_url":"https://github.com/loic-couderc","followers_url":"https://api.github.com/users/loic-couderc/followers","following_url":"https://api.github.com/users/loic-couderc/following{/other_user}","gists_url":"https://api.github.com/users/loic-couderc/gists{/gist_id}","starred_url":"https://api.github.com/users/loic-couderc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loic-couderc/subscriptions","organizations_url":"https://api.github.com/users/loic-couderc/orgs","repos_url":"https://api.github.com/users/loic-couderc/repos","events_url":"https://api.github.com/users/loic-couderc/events{/privacy}","received_events_url":"https://api.github.com/users/loic-couderc/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/bonsai-team/matam/milestones/13","html_url":"https://github.com/bonsai-team/matam/milestone/13","labels_url":"https://api.github.com/repos/bonsai-team/matam/milestones/13/labels","id":3643783,"node_id":"MDk6TWlsZXN0b25lMzY0Mzc4Mw==","number":13,"title":"v1.5.2","description":null,"creator":{"login":"loic-couderc","id":23629447,"node_id":"MDQ6VXNlcjIzNjI5NDQ3","avatar_url":"https://avatars1.githubusercontent.com/u/23629447?v=4","gravatar_id":"","url":"https://api.github.com/users/loic-couderc","html_url":"https://github.com/loic-couderc","followers_url":"https://api.github.com/users/loic-couderc/followers","following_url":"https://api.github.com/users/loic-couderc/following{/other_user}","gists_url":"https://api.github.com/users/loic-couderc/gists{/gist_id}","starred_url":"https://api.github.com/users/loic-couderc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loic-couderc/subscriptions","organizations_url":"https://api.github.com/users/loic-couderc/orgs","repos_url":"https://api.github.com/users/loic-couderc/repos","events_url":"https://api.github.com/users/loic-couderc/events{/privacy}","received_events_url":"https://api.github.com/users/loic-couderc/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":2,"state":"open","created_at":"2018-09-11T12:18:48Z","updated_at":"2018-09-11T12:50:31Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2018-04-24T15:39:44Z","updated_at":"2018-09-11T12:50:31Z","closed_at":"2018-09-11T12:50:31Z","author_association":"NONE","body":"**Problem description**\r\n\r\nI have successfully run MATAM on two of my metagenomic datasets with the `--perform_taxonomic_assignment` flag. However, I receive the following error during taxonomic assignment when I run MATAM on another one of my datasets (subset of logfile below):\r\n```\r\nINFO - Abundance calculation completed in 69.0905 seconds wall time\r\nINFO - === Taxonomic assignment & Krona visualization ===\r\nCRITICAL - The RDP file is no well formatted, line: 829\t-\tRoot\trootrank\t1.0\tBacteria\tdomain\t0.91\t\"Chlamydiae\"\tphylum\t0.05\tChlamydiia\tclass\t0.05\tChlamydiales\torder\t0.05\tParachlamydiaceae\tfamily\t0.03\tParachlamydia\tgenus\t0.03\r\nFailed to parse RDP file:L227-2014-8m/matam_assembly/workdir/scaffolds.NR.min_500bp.abd.rdp.tab\r\n```\r\n\r\n**Troubleshooting**\r\n\r\nI suspect that the dash (\"-\") following '829' in the RDP classification file may be the cause of the problem. (This dash suggests that classification was very poor for this sequence, correct?) The line mentioned in the above error message is the only one with a dash in the entire file:\r\n\r\n```\r\n$ grep \"-\" scaffolds.NR.min_500bp.abd.rdp.tab\r\n829\t-\tRoot\trootrank\t1.0\tBacteria\tdomain\t0.91\t\"Chlamydiae\"\tphylum\t0.05\tChlamydiia\tclass\t0.05\tChlamydiales\torder\t0.05\tParachlamydiaceae\tfamily\t0.03\tParachlamydia\tgenus\t0.03\r\n```\r\n\r\nFor comparison, here are a couple other lines from the same file:\r\n```\r\n284\t\tRoot\trootrank\t1.0\tBacteria\tdomain\t1.0\t\"Proteobacteria\"\tphylum\t1.0\tBetaproteobacteria\tclass\t1.0\tBurkholderiales\torder\t1.0\tBurkholderiaceae\tfamily\t1.0\tPolynucleobacter\tgenus\t1.0\r\n160\t\tRoot\trootrank\t1.0\tBacteria\tdomain\t1.0\t\"Verrucomicrobia\"\tphylum\t0.53\tVerrucomicrobiae\tclass\t0.51\tVerrucomicrobialesorder\t0.51\tVerrucomicrobiaceae\tfamily\t0.51\tRoseimicrobium\tgenus\t0.4\r\n```\r\n\r\n**Possible solutions**\r\nThe issue may be in the `read_rpd_file` function in `rdp.py`:\r\n```\r\ndef read_rpd_file(rdp_path):\r\n    \"\"\"\r\n    parse a rdp file and return a generator\r\n    \"\"\"\r\n    with open(rdp_path, 'r') as in_rdp_handler:\r\n        for l in in_rdp_handler:\r\n            l = l.strip()\r\n            if not l or l.startswith('#'): continue\r\n            rdp_line = re.split('\"?\\t+\"?', l)\r\n            rdp_line = [field.strip() for field in rdp_line]\r\n            if len(rdp_line) != 19: # seqid + 6 taxonomic levels * 3\r\n                logger.fatal('RDP: wrong number of fields -- %s, expected 19, line: %s' % (len(rdp_line), l))\r\n                sys.exit('Failed to parse RDP file:%s' % rdp_path)\r\n\r\n            yield rdp_line\r\n```\r\n\r\nThe dash likely causes `len(rdp_line)` to be 20 instead of 19.\r\n\r\nCould `read_rdp_file` need a special case for handling dashes? (E.g., These sequences could be thrown away due to low confidence.)\r\n"},"comment":{"url":"https://api.github.com/repos/bonsai-team/matam/issues/comments/420262531","html_url":"https://github.com/bonsai-team/matam/issues/61#issuecomment-420262531","issue_url":"https://api.github.com/repos/bonsai-team/matam/issues/61","id":420262531,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMDI2MjUzMQ==","user":{"login":"loic-couderc","id":23629447,"node_id":"MDQ6VXNlcjIzNjI5NDQ3","avatar_url":"https://avatars1.githubusercontent.com/u/23629447?v=4","gravatar_id":"","url":"https://api.github.com/users/loic-couderc","html_url":"https://github.com/loic-couderc","followers_url":"https://api.github.com/users/loic-couderc/followers","following_url":"https://api.github.com/users/loic-couderc/following{/other_user}","gists_url":"https://api.github.com/users/loic-couderc/gists{/gist_id}","starred_url":"https://api.github.com/users/loic-couderc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loic-couderc/subscriptions","organizations_url":"https://api.github.com/users/loic-couderc/orgs","repos_url":"https://api.github.com/users/loic-couderc/repos","events_url":"https://api.github.com/users/loic-couderc/events{/privacy}","received_events_url":"https://api.github.com/users/loic-couderc/received_events","type":"User","site_admin":false},"created_at":"2018-09-11T12:50:31Z","updated_at":"2018-09-11T12:50:31Z","author_association":"MEMBER","body":"Fixed in v1.5.2"}}
{"actor":{"display_login":"loic-couderc"}}