{"action":"opened","issue":{"url":"https://api.github.com/repos/katholt/srst2/issues/27","labels_url":"https://api.github.com/repos/katholt/srst2/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/katholt/srst2/issues/27/comments","events_url":"https://api.github.com/repos/katholt/srst2/issues/27/events","html_url":"https://github.com/katholt/srst2/issues/27","id":54775620,"number":27,"title":"Miscalling alleles with only indels differences between variants","user":{"login":"Takadonet","id":64732,"avatar_url":"https://avatars.githubusercontent.com/u/64732?v=3","gravatar_id":"","url":"https://api.github.com/users/Takadonet","html_url":"https://github.com/Takadonet","followers_url":"https://api.github.com/users/Takadonet/followers","following_url":"https://api.github.com/users/Takadonet/following{/other_user}","gists_url":"https://api.github.com/users/Takadonet/gists{/gist_id}","starred_url":"https://api.github.com/users/Takadonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Takadonet/subscriptions","organizations_url":"https://api.github.com/users/Takadonet/orgs","repos_url":"https://api.github.com/users/Takadonet/repos","events_url":"https://api.github.com/users/Takadonet/events{/privacy}","received_events_url":"https://api.github.com/users/Takadonet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-19T15:15:34Z","updated_at":"2015-01-19T15:15:34Z","closed_at":null,"body":"This will be a long post so the quick summary is that the new version of SRST2 added a new parameter which causes the miss prediction of allele ldh from 1 to 197. It effect only results where the different their is larger in length between different variant of an allele. Parameter in question is called \"--mlst_max_mismatch\" with default value of 10.\r\n\r\n**Possible solutions**\r\n* Allow users to turn off \"mlst_max_mismatch\"\r\n\r\n\r\n**Details:**\r\n\r\n\r\nA few new parameters were added to SRST2 between the different version from 0.2.0 to 0.2.1 . One of theses parameters is called \"--mlst_max_mismatch\". Description from the srst2.py --help is the following :\r\n\r\n--mlst_max_mismatch MLST_MAX_MISMATCH\r\n\r\nMaximum number of mismatches per read for MLST allele calling (default 10)\r\n\r\nThe parameter will filter reads AFTER they have been mapped with bowtie2 based on the CIGAR string. If it see that it has more then 10 mismatch/indels, it throws out the read from the alignment completely. So another words, pre-filtering data before it starts determining the alleles.\r\n\r\nHowever, this pre-filtering removes data that helps with making the create call in the case with ldh alelle.\r\n\r\nBelow is a screenshot of the alignment between ldh 1 and ldh 197. They are 100% identical but ldh_1 has an extra 19 base pairs near the end.\r\n![gap](https://cloud.githubusercontent.com/assets/64732/5802341/96a721b6-9fb9-11e4-9425-e935e57568d4.png)\r\n\r\nSince both variants of the alleles have a length differences of 19 base pairs, all reads aligning to ldh_197 that have the extra 19 base pairs are thrown out but should be kept! Attached is the pileup view of the region in question against ldh_197. Top windows is the old version of srst 0.20 and bottom is 0.2.1. As you can see, almost all reads are thrown out in that region.\r\n\r\nSo when it comes time to score each allele variants,both ldh_1 and ldh_197 both report having no indels when it 197 variant should have 19!\r\n\r\n![bad_srst_pileup](https://cloud.githubusercontent.com/assets/64732/5802337/8e78d94e-9fb9-11e4-9834-7e30426137d7.png)\r\n\r\n"}}