{"action":"created","issue":{"url":"https://api.github.com/repos/grunwaldlab/poppr/issues/179","repository_url":"https://api.github.com/repos/grunwaldlab/poppr","labels_url":"https://api.github.com/repos/grunwaldlab/poppr/issues/179/labels{/name}","comments_url":"https://api.github.com/repos/grunwaldlab/poppr/issues/179/comments","events_url":"https://api.github.com/repos/grunwaldlab/poppr/issues/179/events","html_url":"https://github.com/grunwaldlab/poppr/issues/179","id":316621556,"number":179,"title":"Error using win.ia function in poppr","user":{"login":"MarisaMiller","id":23660064,"avatar_url":"https://avatars2.githubusercontent.com/u/23660064?v=4","gravatar_id":"","url":"https://api.github.com/users/MarisaMiller","html_url":"https://github.com/MarisaMiller","followers_url":"https://api.github.com/users/MarisaMiller/followers","following_url":"https://api.github.com/users/MarisaMiller/following{/other_user}","gists_url":"https://api.github.com/users/MarisaMiller/gists{/gist_id}","starred_url":"https://api.github.com/users/MarisaMiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarisaMiller/subscriptions","organizations_url":"https://api.github.com/users/MarisaMiller/orgs","repos_url":"https://api.github.com/users/MarisaMiller/repos","events_url":"https://api.github.com/users/MarisaMiller/events{/privacy}","received_events_url":"https://api.github.com/users/MarisaMiller/received_events","type":"User","site_admin":false},"labels":[{"id":29007784,"url":"https://api.github.com/repos/grunwaldlab/poppr/labels/bug%20:bug:%20:skull_and_crossbones:","name":"bug :bug: :skull_and_crossbones:","color":"fc2929","default":false}],"state":"open","locked":false,"assignee":{"login":"zkamvar","id":3639446,"avatar_url":"https://avatars2.githubusercontent.com/u/3639446?v=4","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},"assignees":[{"login":"zkamvar","id":3639446,"avatar_url":"https://avatars2.githubusercontent.com/u/3639446?v=4","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}],"milestone":null,"comments":4,"created_at":"2018-04-22T23:08:00Z","updated_at":"2018-05-01T20:58:27Z","closed_at":null,"author_association":"NONE","body":"Please place an \"x\" in all the boxes that apply\r\n---------------------------------------------\r\n\r\n - [x] I have the most recent version of poppr and R\r\n - [x] I have found a bug\r\n   - [x] I have searched for solutions on this site and the [poppr forum](https://groups.google.com/group/poppr)\r\n   - [x] I have a [reproducible example](http://reprex.tidyverse.org/articles/reprex-dos-and-donts.html)\r\n - [ ] I want to request a new feature\r\n\r\n--------\r\n\r\nHello,\r\n\r\nI was recently using poppr for analysis of LD with the standardized index of association, and ran into an issue with the win.ia function. I have successfully used the samp.ia function with the same data included below, so I know that function works fine.\r\n\r\nBelow are the steps of my analysis with comments for clarity. Here is also a link to some Rdata for one of the genlight objects I am analyzing so you can reproduce: https://s3.msi.umn.edu/poppr_files/gl_1990_rmNA_LD.Rdata\r\n\r\n```\r\n#I am using poppr 2.7.1 and R version 3.4.0\r\n#This genlight object was generated with vcfR2genlight from vcfR (1.7.0), and entirely non-typed loci (NAs) were removed\r\n\r\nload(\"gl_1990_rmNA_LD.Rdata\")\r\n\r\n#I then tried to run the command below, but I get the error below.\r\n\r\nwin_ia_1990 <- win.ia(gl_1990_rmNA_LD, window = 10000L, min.snps = 3L)\r\n\r\n#Error in seq.default(nwin) : 'from' must be a finite number\r\n#In addition: Warning message:\r\n#In `position<-`(`*tmp*`, value = xpos) :\r\n # NAs introduced by coercion to integer range\r\n\r\n```\r\n\r\nI've narrowed it down to the region of the function below. I haven't taken a look at what the adjust_position function does, but it appears related to that. Perhaps there's something wrong with my input file though?\r\n\r\n```\r\n  if (chromos) {\r\n    CHROM <- chromosome(x)\r\n    x <- adjust_position(x, chromosome_buffer, window)\r\n  }\r\n```\r\n\r\nPlease let me know if you have any questions or need clarification.\r\n\r\n---------\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/grunwaldlab/poppr/issues/comments/385788203","html_url":"https://github.com/grunwaldlab/poppr/issues/179#issuecomment-385788203","issue_url":"https://api.github.com/repos/grunwaldlab/poppr/issues/179","id":385788203,"user":{"login":"MarisaMiller","id":23660064,"avatar_url":"https://avatars2.githubusercontent.com/u/23660064?v=4","gravatar_id":"","url":"https://api.github.com/users/MarisaMiller","html_url":"https://github.com/MarisaMiller","followers_url":"https://api.github.com/users/MarisaMiller/followers","following_url":"https://api.github.com/users/MarisaMiller/following{/other_user}","gists_url":"https://api.github.com/users/MarisaMiller/gists{/gist_id}","starred_url":"https://api.github.com/users/MarisaMiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarisaMiller/subscriptions","organizations_url":"https://api.github.com/users/MarisaMiller/orgs","repos_url":"https://api.github.com/users/MarisaMiller/repos","events_url":"https://api.github.com/users/MarisaMiller/events{/privacy}","received_events_url":"https://api.github.com/users/MarisaMiller/received_events","type":"User","site_admin":false},"created_at":"2018-05-01T20:58:27Z","updated_at":"2018-05-01T20:58:27Z","author_association":"NONE","body":"Hi @zkamvar, I just tested it out and it seems to be working fine! My only suggestion, if not too much trouble, is to also give the window coordinates with the contig (or chromosome) name? This might be useful for extracting the precise coordinates of interesting windows. I think it might be challenging to extract this information after the fact, particularly if the min.snps filter is used and the windows returned are not necessarily contiguous along each contig/chrom. But, this isn't really necessary just a suggestion."}}
{"actor":{"display_login":"MarisaMiller"}}