{"action":"created","issue":{"url":"https://api.github.com/repos/biopython/biopython/issues/1591","repository_url":"https://api.github.com/repos/biopython/biopython","labels_url":"https://api.github.com/repos/biopython/biopython/issues/1591/labels{/name}","comments_url":"https://api.github.com/repos/biopython/biopython/issues/1591/comments","events_url":"https://api.github.com/repos/biopython/biopython/issues/1591/events","html_url":"https://github.com/biopython/biopython/issues/1591","id":310512802,"number":1591,"title":"suggestion: SearchIO.parse directly get column header from \"outfmt 7\" blast-tab rather than ask user to provide","user":{"login":"wpwupingwp","id":3808130,"avatar_url":"https://avatars1.githubusercontent.com/u/3808130?v=4","gravatar_id":"","url":"https://api.github.com/users/wpwupingwp","html_url":"https://github.com/wpwupingwp","followers_url":"https://api.github.com/users/wpwupingwp/followers","following_url":"https://api.github.com/users/wpwupingwp/following{/other_user}","gists_url":"https://api.github.com/users/wpwupingwp/gists{/gist_id}","starred_url":"https://api.github.com/users/wpwupingwp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wpwupingwp/subscriptions","organizations_url":"https://api.github.com/users/wpwupingwp/orgs","repos_url":"https://api.github.com/users/wpwupingwp/repos","events_url":"https://api.github.com/users/wpwupingwp/events{/privacy}","received_events_url":"https://api.github.com/users/wpwupingwp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"bow","id":343998,"avatar_url":"https://avatars1.githubusercontent.com/u/343998?v=4","gravatar_id":"","url":"https://api.github.com/users/bow","html_url":"https://github.com/bow","followers_url":"https://api.github.com/users/bow/followers","following_url":"https://api.github.com/users/bow/following{/other_user}","gists_url":"https://api.github.com/users/bow/gists{/gist_id}","starred_url":"https://api.github.com/users/bow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bow/subscriptions","organizations_url":"https://api.github.com/users/bow/orgs","repos_url":"https://api.github.com/users/bow/repos","events_url":"https://api.github.com/users/bow/events{/privacy}","received_events_url":"https://api.github.com/users/bow/received_events","type":"User","site_admin":false},"assignees":[{"login":"bow","id":343998,"avatar_url":"https://avatars1.githubusercontent.com/u/343998?v=4","gravatar_id":"","url":"https://api.github.com/users/bow","html_url":"https://github.com/bow","followers_url":"https://api.github.com/users/bow/followers","following_url":"https://api.github.com/users/bow/following{/other_user}","gists_url":"https://api.github.com/users/bow/gists{/gist_id}","starred_url":"https://api.github.com/users/bow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bow/subscriptions","organizations_url":"https://api.github.com/users/bow/orgs","repos_url":"https://api.github.com/users/bow/repos","events_url":"https://api.github.com/users/bow/events{/privacy}","received_events_url":"https://api.github.com/users/bow/received_events","type":"User","site_admin":false}],"milestone":null,"comments":9,"created_at":"2018-04-02T15:16:31Z","updated_at":"2018-04-23T07:26:32Z","closed_at":null,"author_association":"NONE","body":"### Setup\r\nPython: 3.6.5rc1 (default, Mar 14 2018, 06:54:23) \\n[GCC 7.3.0]\r\nPlatform: Linux-4.9.0-3-amd64-x86_64-with-debian-buster-sid\r\nBiopython: 1.70\r\n\r\n\r\n### Expected behaviour\r\nAccording to the document of Bio.SearchIO,\r\n`\r\nNote that the 'fields' keyword argument will be ignored if the parsed file is commented. Commented files have their column ordering stated explicitly in the file, so there is no need to specify it again in SearchIO.\r\n`\r\nMy understand is, if I use \r\n`'-outfmt \"7  qseqid sseqid nident mismatch score qstart qend sstart send\"' `\r\nin blastn, which generated comment line in tab file, then I can directly use \r\n`SearchIO.parse(tab_file, 'blast-tab')`\r\nBut it still use \"std\" fields to parse my blast-tab  file,  so I got AssertionError:\r\n\r\n> AssertionError: Expected 12 columns, found: 9\r\n\r\nMy question is, what is \"commented\" file according to the documents?\r\n\r\n### Steps to reproduce\r\npython  file:\r\n\r\n```\r\n#!/usr/bin/python3\r\n\r\nfrom Bio import SearchIO\r\n\r\nfmt = 'qseqid sseqid nident mismatch score qstart qend sstart send'\r\nprint('with fields')\r\na = SearchIO.parse('wrong.tab', 'blast-tab', fields=fmt)\r\nprint(list(a))\r\nprint()\r\nprint('without fields')\r\nb = SearchIO.parse('wrong.tab', 'blast-tab')\r\nprint(list(b))\r\n```\r\ntab file:\r\n```\r\n# BLASTN 2.7.1+\r\n# Query: AvgMidLocation(0)-Tm(48.84)-Coverage(0.00%)-SumBitScore(0)-Start(994)-End(1013)\r\n# Database: /tmp/tmpyurpxrp1\r\n# Fields: query id, subject id, identical, mismatches, score, q. start, q. end, s. start, s. end\r\n# 2 hits found\r\na\tb\t20\t0\t40\t1\t20\t486\t505\r\nc\td\t20\t0\t40\t1\t20\t477\t496\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/biopython/biopython/issues/comments/383480036","html_url":"https://github.com/biopython/biopython/issues/1591#issuecomment-383480036","issue_url":"https://api.github.com/repos/biopython/biopython/issues/1591","id":383480036,"user":{"login":"wpwupingwp","id":3808130,"avatar_url":"https://avatars1.githubusercontent.com/u/3808130?v=4","gravatar_id":"","url":"https://api.github.com/users/wpwupingwp","html_url":"https://github.com/wpwupingwp","followers_url":"https://api.github.com/users/wpwupingwp/followers","following_url":"https://api.github.com/users/wpwupingwp/following{/other_user}","gists_url":"https://api.github.com/users/wpwupingwp/gists{/gist_id}","starred_url":"https://api.github.com/users/wpwupingwp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wpwupingwp/subscriptions","organizations_url":"https://api.github.com/users/wpwupingwp/orgs","repos_url":"https://api.github.com/users/wpwupingwp/repos","events_url":"https://api.github.com/users/wpwupingwp/events{/privacy}","received_events_url":"https://api.github.com/users/wpwupingwp/received_events","type":"User","site_admin":false},"created_at":"2018-04-23T07:26:32Z","updated_at":"2018-04-23T07:26:32Z","author_association":"NONE","body":"Yes"}}
{"actor":{"display_login":"wpwupingwp"}}