You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have some issues running detectRUNs in SNP data generated from a draft assembly of a nonmodel genome.
When we execute the command summaryRuns, we obtain the following error:
Error in names(x) <- value : ‘names’ attribute [2] must be the same length as the vector [1]
We tried the workaround you described in issue #23 (replacing the chromosome names), but it didn’t work. We then realised that in issue #24 you mentioned that the function Froh_inbreeding could have issues when the input contains > 100 chromosomes (as in our case).
Diving in your source code, we saw that in line 121 of the file Stats.R you hardcoded the maximum number of chromosomes to 100 (chr_order <- c((0:99),“X”,“Y”,“XY”,“MT”,“Z”,“W”)). Still, the smallest chromosome id in our dataset is bigger than 99. Thus, after line 121, summaryRuns produces an empty list, and hence, the error mentioned above. Renaming the chromosomes is not a solution for us either as we have more than 100 scaffolds.
Would be a problem is we change line 121 to: c(0:max(sort(as.numeric(list_chr))), “X”,“Y”, “XY”, “MT”, “Z”, “W”)?, which makes the maximum number of chromosomes dependent on the input file.
Nevertheless, we are unsure if the change we propose will be effective as we don’t know if you also hardcoded the number of chromosomes in other files of your library.
Thanks
The text was updated successfully, but these errors were encountered:
Thank you for your interest in detectRUNS and reporting this: I'm not sure if your solution will apply in all cases, for example when chromosomes are textual. I think we have to change this in a more general way, and check if there are others magic values like this.
In the meantime, you could clone this repository locally, try to fix it for your case as suggested and the install this package from your local files.
Hi,
We have some issues running
detectRUNs
in SNP data generated from a draft assembly of a nonmodel genome.When we execute the command
summaryRuns
, we obtain the following error:We tried the workaround you described in issue #23 (replacing the chromosome names), but it didn’t work. We then realised that in issue #24 you mentioned that the function
Froh_inbreeding
could have issues when the input contains > 100 chromosomes (as in our case).Diving in your source code, we saw that in line 121 of the file Stats.R you hardcoded the maximum number of chromosomes to 100 (
chr_order <- c((0:99),“X”,“Y”,“XY”,“MT”,“Z”,“W”)
). Still, the smallest chromosome id in our dataset is bigger than 99. Thus, after line 121,summaryRuns
produces an empty list, and hence, the error mentioned above. Renaming the chromosomes is not a solution for us either as we have more than 100 scaffolds.Would be a problem is we change line 121 to:
c(0:max(sort(as.numeric(list_chr))), “X”,“Y”, “XY”, “MT”, “Z”, “W”)
?, which makes the maximum number of chromosomes dependent on the input file.Nevertheless, we are unsure if the change we propose will be effective as we don’t know if you also hardcoded the number of chromosomes in other files of your library.
Thanks
The text was updated successfully, but these errors were encountered: