{"action":"opened","issue":{"url":"https://api.github.com/repos/grunwaldlab/poppr/issues/109","repository_url":"https://api.github.com/repos/grunwaldlab/poppr","labels_url":"https://api.github.com/repos/grunwaldlab/poppr/issues/109/labels{/name}","comments_url":"https://api.github.com/repos/grunwaldlab/poppr/issues/109/comments","events_url":"https://api.github.com/repos/grunwaldlab/poppr/issues/109/events","html_url":"https://github.com/grunwaldlab/poppr/issues/109","id":170475756,"number":109,"title":"mlg.filter: check that distance matrix belongs to the data","user":{"login":"zkamvar","id":3639446,"avatar_url":"https://avatars.githubusercontent.com/u/3639446?v=3","gravatar_id":"","url":"https://api.github.com/users/zkamvar","html_url":"https://github.com/zkamvar","followers_url":"https://api.github.com/users/zkamvar/followers","following_url":"https://api.github.com/users/zkamvar/following{/other_user}","gists_url":"https://api.github.com/users/zkamvar/gists{/gist_id}","starred_url":"https://api.github.com/users/zkamvar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zkamvar/subscriptions","organizations_url":"https://api.github.com/users/zkamvar/orgs","repos_url":"https://api.github.com/users/zkamvar/repos","events_url":"https://api.github.com/users/zkamvar/events{/privacy}","received_events_url":"https://api.github.com/users/zkamvar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-10T17:41:16Z","updated_at":"2016-08-10T17:41:16Z","closed_at":null,"body":"I recently received an email from someone who had accidentally defined a distance matrix from a data set called \"bruvo.dist\". When they tried to filter a separate data set with a different number of samples using Bruvo's distance, they got an error:\r\n\r\n> Error in mlg.filter.internal(gid = <S4 object of class \"genclone\">, threshold = 0.02083333,  : \r\n  MLG must contain one numeric or integer entry for each individual in the population.\r\n\r\nThis was because R had attempted to use the distance matrix as opposed to the function, but there was a difference between the number of samples in the data and the incoming distance matrix. \r\n\r\nThis error only occurred [when the filtered MLGs were being inserted into the data][1], but it should happen before the filtering ever occurs. It would most likely be wise to insert it into the `mlg.filter.internal()` function and throw a sensible warning.\r\n\r\n[1]: https://github.com/grunwaldlab/poppr/blob/4fe6d843594cac8d521cd09b51a84f7257744480/R/methods.r#L1533"}}
{"actor":{"display_login":"zkamvar"}}