{"action":"created","issue":{"url":"https://api.github.com/repos/bioperl/bioperl-live/issues/110","labels_url":"https://api.github.com/repos/bioperl/bioperl-live/issues/110/labels{/name}","comments_url":"https://api.github.com/repos/bioperl/bioperl-live/issues/110/comments","events_url":"https://api.github.com/repos/bioperl/bioperl-live/issues/110/events","html_url":"https://github.com/bioperl/bioperl-live/issues/110","id":67180177,"number":110,"title":"Bio::AlignIO::stockholm creates improperly formatted mark-up lines","user":{"login":"wichne","id":7444096,"avatar_url":"https://avatars.githubusercontent.com/u/7444096?v=3","gravatar_id":"","url":"https://api.github.com/users/wichne","html_url":"https://github.com/wichne","followers_url":"https://api.github.com/users/wichne/followers","following_url":"https://api.github.com/users/wichne/following{/other_user}","gists_url":"https://api.github.com/users/wichne/gists{/gist_id}","starred_url":"https://api.github.com/users/wichne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wichne/subscriptions","organizations_url":"https://api.github.com/users/wichne/orgs","repos_url":"https://api.github.com/users/wichne/repos","events_url":"https://api.github.com/users/wichne/events{/privacy}","received_events_url":"https://api.github.com/users/wichne/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-08T17:34:43Z","updated_at":"2015-04-11T20:57:47Z","closed_at":null,"body":"Within the Bio::AlignIO::stockholm module, when creating the mark-up lines within `sub write_aln`, in cases where the sequence accession exceeds the arbitrary size limit of 22 characters (the [Stockholm specification] (http://sonnhammer.sbc.su.se/Stockholm.html) states \"No size limits on any field\"), the 'feature' text becomes joined to the 'seqname' text. This causes hmmbuild to error out.\r\n\r\nLine 600:\r\n```perl\r\nmy $text = sprintf(\"%-4s%-22s%-3s%s\\n\",$seq_ann,\r\n\t\t\t       $aln->displayname($seq->get_nse), $tag, $acc);\r\n```\r\n\r\nIf:\r\n```\r\n$seq_ann = \"#=GS \"\r\n$tag = \"AC\"\r\n$acc = \"accession\"\r\n$aln->displayname($seq->get_nse) = \"1234567890123456789012345\"\r\n```\r\n\r\nthen:\r\n```perl\r\n$text = \"#=GS 1234567890k123456789012345AC accession\"\r\n```\r\n\r\nwhere the proper output should be:\r\n```perl\r\n$text = \"#=GS 1234567890k123456789012345 AC accession\"\r\n```\r\n\r\nThe simple fix is to enforce spaces within the sprintf command:\r\nLine 600:\r\n```perl\r\nmy $text = sprintf(\"%-4s % -22s %-3s %s\\n\",$seq_ann,\r\n\t\t\t       $aln->displayname($seq->get_nse), $tag, $acc);\r\n```\r\n\r\nWhich would yield:\r\n```perl\r\n$text = \"#=GS  1234567890k123456789012345 AC  accession\"\r\n```\r\nThis will parse even with the extra whitespace.\r\n\r\nCheers,\r\nBill\r\n"},"comment":{"url":"https://api.github.com/repos/bioperl/bioperl-live/issues/comments/91924534","html_url":"https://github.com/bioperl/bioperl-live/issues/110#issuecomment-91924534","issue_url":"https://api.github.com/repos/bioperl/bioperl-live/issues/110","id":91924534,"user":{"login":"bosborne","id":278004,"avatar_url":"https://avatars.githubusercontent.com/u/278004?v=3","gravatar_id":"","url":"https://api.github.com/users/bosborne","html_url":"https://github.com/bosborne","followers_url":"https://api.github.com/users/bosborne/followers","following_url":"https://api.github.com/users/bosborne/following{/other_user}","gists_url":"https://api.github.com/users/bosborne/gists{/gist_id}","starred_url":"https://api.github.com/users/bosborne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bosborne/subscriptions","organizations_url":"https://api.github.com/users/bosborne/orgs","repos_url":"https://api.github.com/users/bosborne/repos","events_url":"https://api.github.com/users/bosborne/events{/privacy}","received_events_url":"https://api.github.com/users/bosborne/received_events","type":"User","site_admin":false},"created_at":"2015-04-11T20:57:47Z","updated_at":"2015-04-11T20:57:47Z","body":"Bill,\n\nWhat about the block below it, for “DR”, starting around 613? Spaces in that output as well?\n\nThanks again,\n\nBrian O.\n\n> On Apr 8, 2015, at 1:34 PM, wichne <notifications@github.com> wrote:\n> \n> Within the Bio::AlignIO::stockholm module, when creating the mark-up lines within sub write_aln, in cases where the sequence accession exceeds the arbitrary size limit of 22 characters (the Stockholm specification <http://sonnhammer.sbc.su.se/Stockholm.html> states \"No size limits on any field\"), the 'feature' text becomes joined to the 'seqname' text. This causes hmmbuild to error out.\n> \n> Line 600:\n> \n> my $text = sprintf(\"%-4s%-22s%-3s%s\\n\",$seq_ann,\n>                    $aln->displayname($seq->get_nse), $tag, $acc);\n> If:\n> \n> $seq_ann = \"#=GS \"\n> $tag = \"AC\"\n> $acc = \"accession\"\n> $aln->displayname($seq->get_nse) = \"1234567890123456789012345\"\n> then:\n> \n> $text = \"#=GS 1234567890k123456789012345AC accession\"\n> where the proper output should be:\n> \n> $text = \"#=GS 1234567890k123456789012345 AC accession\"\n> The simple fix is to enforce spaces within the sprintf command:\n> Line 600:\n> \n> my $text = sprintf(\"%-4s % -22s %-3s %s\\n\",$seq_ann,\n>                    $aln->displayname($seq->get_nse), $tag, $acc);\n> Which would yield:\n> \n> $text = \"#=GS  1234567890k123456789012345 AC  accession\"\n> This will parse even with the extra whitespace.\n> \n> Cheers,\n> Bill\n> \n> —\n> Reply to this email directly or view it on GitHub <https://github.com/bioperl/bioperl-live/issues/110>.\n> \n\n"}}