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
Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, :
arguments imply differing number of rows: 333, 335, 332, 334
In addition: Warning messages:
1: In matrix(unlist(e), ncol = x@ploidy[1], byrow = TRUE) :
data length [665] is not a sub-multiple or multiple of the number of rows [333]
2: In matrix(unlist(e), ncol = x@ploidy[1], byrow = TRUE) :
data length [669] is not a sub-multiple or multiple of the number of rows [335]
3: In matrix(unlist(e), ncol = x@ploidy[1], byrow = TRUE) :
data length [667] is not a sub-multiple or multiple of the number of rows [334]
4: In matrix(unlist(e), ncol = x@ploidy[1], byrow = TRUE) :
data length [665] is not a sub-multiple or multiple of the number of rows [333]
I encountered a similar problem when one allele of a diploid genotype is unkown. For example, with 3 individuals, genotypes at a locus may be A/A, T, A/T, then it causes the problem. Note that for the second individual, only 1 allele was recovered, and the other allele isn't known (e.g. failed sequencing). In the code below, I added a section which deals with this problem.
I'm attaching a text file, which correct this problem. The fix was based on the version 2.1.5 of adegenet.
The additional argument, rm.incompleteGeno controls what to do when there are missing alleles for a genotype. By default (rm.incompleteGeno=F), the genotypes of the second individual in the example above will become T/NA. If you set the option to true, it will remove the incomplete genotypes, and replace it with NA/NA (for diploid).
I also noticed that character string of "NA" is used instead of NA with oneColPerAll=T. So I added another fix to convert them to real NA in the code below.
With this modification, the sample code by @dfriend21 gives the expected result without the error.
Running this code produces an error:
session info
I noticed that there are two closed issues that might be relevant: #18 and #192.
The text was updated successfully, but these errors were encountered: