Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement further checks on rebase_ebv #22

Open
bonifazi opened this issue Dec 8, 2024 · 0 comments
Open

implement further checks on rebase_ebv #22

bonifazi opened this issue Dec 8, 2024 · 0 comments

Comments

@bonifazi
Copy link
Owner

bonifazi commented Dec 8, 2024

In https://github.com/bonifazi/TuttiFrutti/blob/main/rebase_ebv.R
further checks should be implemented:

  1. data.frame is expected, data.table go thorugh but result in issues
Error in rebase_ebv(data = logval[[run]], base_pop = base_pop[, "SIRE",  :
  Not all IDs in 'base_pop' were found in 'data'. Check you input args.

In reality, the IDs were there. Converting the data to data.frame solved the issue.

  1. if the column has all 0's an error similar to this is returned
> tmp <- rebase_ebv(data = as.data.frame(logval[[run]]), base_pop = base_pop[,"SIRE", d
rop = F], plot = T, verbose = T)
 N. individuals in data: xyz
 N. individuals in base population: xyz
  
 Mean EBV of base pop. individulas for col.  dummy1  before rebasing =  0
 Mean EBV of base pop. individulas for col.  dummy1  after rebasing =  0
Error in if (round(test_cor, decimals) != 1) { :
  missing value where TRUE/FALSE needed
In addition: Warning message:
In cor(data[, ebv_col], new_data[, ebv_col]) :
  the standard deviation is zero

Excluding the columns with all 0's solved the problem. cols like this are for instance in Solani.out from MiXBLUP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant