diff --git a/R/facets-segment.R b/R/facets-segment.R index b864a19..d2dd989 100644 --- a/R/facets-segment.R +++ b/R/facets-segment.R @@ -169,6 +169,8 @@ segsnps <- function(mat, cval=25, hetscale=FALSE, delta=0) { jointsegsummary <- function(jointseg) { # remove snps with NA in segs (due to NA in cnlr) jointseg <- jointseg[is.finite(jointseg$seg),] + # properly order the data + jointseg <- jointseg[order(jointseg$seg, jointseg$chrom, jointseg$maploc), ] # initialize output table nsegs <- max(jointseg$seg) # segment start and end indices and number of loci