{"action":"opened","issue":{"url":"https://api.github.com/repos/biojava/biojava/issues/286","labels_url":"https://api.github.com/repos/biojava/biojava/issues/286/labels{/name}","comments_url":"https://api.github.com/repos/biojava/biojava/issues/286/comments","events_url":"https://api.github.com/repos/biojava/biojava/issues/286/events","html_url":"https://github.com/biojava/biojava/issues/286","id":90411223,"number":286,"title":"Structure Code behavior depends on the Algorithm Name (FatCat)","user":{"login":"lafita","id":11161522,"avatar_url":"https://avatars.githubusercontent.com/u/11161522?v=3","gravatar_id":"","url":"https://api.github.com/users/lafita","html_url":"https://github.com/lafita","followers_url":"https://api.github.com/users/lafita/followers","following_url":"https://api.github.com/users/lafita/following{/other_user}","gists_url":"https://api.github.com/users/lafita/gists{/gist_id}","starred_url":"https://api.github.com/users/lafita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lafita/subscriptions","organizations_url":"https://api.github.com/users/lafita/orgs","repos_url":"https://api.github.com/users/lafita/repos","events_url":"https://api.github.com/users/lafita/events{/privacy}","received_events_url":"https://api.github.com/users/lafita/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-23T14:55:53Z","updated_at":"2015-06-23T14:55:53Z","closed_at":null,"body":"We have had several problems when dealing with AFPChain alignments (one reported in #268), because the behavior of the code (superposition, display, sequence alignment) changes depending on the algorithm name that generated the AFPChain. In particular, if the algorithm name is jFatCat:\r\n\r\n- The sequence alignment has different symbols for gaps.\r\n- The superposition (rotation and translation) is recalculated again for every block in the display.\r\n\r\nEven if these variables (sequence alignment and superposition) were not null before, they are recalculated and reset every time if the alignment name is FatCat, which overrides the original AFPChain.\r\n\r\nOne of the main problems is generated because the DEFAULT_ALGORITHM_NAME = \"jFatCat_rigid\" in AFPChain, so that if a new AFPChain() is instantiated or a method creates it from scratch, the name is automatically FatCat rigid. \r\n\r\nPossible solutions:\r\n- Check if the variables are already set before calculating them again.\r\n- In case calculation is needed, do not override the original AFPChain if the variables were set.\r\n- Change the DEFAULT_ALGORITHM_NAME of AFPChain to \"unknown\".\r\n- Every method that generated a new AFPChain has to set the name of the algorithm."}}