Skip to content

Instantly share code, notes, and snippets.

@mgaynor1
Created June 9, 2025 17:52
Show Gist options
  • Select an option

  • Save mgaynor1/e5a4a9fb2eaba8aabbcf6ff1ef2075f1 to your computer and use it in GitHub Desktop.

Select an option

Save mgaynor1/e5a4a9fb2eaba8aabbcf6ff1ef2075f1 to your computer and use it in GitHub Desktop.
# Input data setup - this is not kmers, but your allele frequencies (which you labeled `temp`)
xm <- as.matrix(temp)
xi <- (xm[,2]/xm[,1])
# Other variables
trunc = c(0.0,0.0)
niter = 1000
epsilon = 0.1
parmlist = list(avec = c(0.33, 0.33, 0.33), mvec = c(0.25, 0.50, 0.75), svec = c(0.01, 0.01,0.01)) #This is your expected for your tetraploid
saveme <- emstepNA(parmlist = parmlist, xi = xi, niter = niter, epsilon = epsilon, trunc = trunc, type = "fixed")
@mgaynor1

Copy link
Copy Markdown
Author

Update with 1.0.5

Input data setup - this is not kmers, but your allele frequencies (which you labeled temp)

xm <- as.matrix(temp)
xi <- (xm[,2]/xm[,1])

Other variables

trunc = c(0.0,0.0)
niter = 1000
epsilon = 0.1
parmlist = list(avec = c(0.33, 0.33, 0.33), mvec = c(0.25, 0.50, 0.75), svec = c(0.01, 0.01,0.01)) #This is your expected for your tetraploid

saveme <- emstepNA(parmlist = parmlist, xi = xi, niter = niter, epsilon = epsilon, trunc = trunc, type = "fixed", glreturn = TRUE)
gpmatrix <- saveme$pir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment