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

mvp.pc.txt and mvp.kin.txt #31

Closed
liqingbioinfo opened this issue Jan 24, 2019 · 2 comments
Closed

mvp.pc.txt and mvp.kin.txt #31

liqingbioinfo opened this issue Jan 24, 2019 · 2 comments

Comments

@liqingbioinfo
Copy link

liqingbioinfo commented Jan 24, 2019

Hello Xiaolei

I have a problem while creating kinship files. I have loaded "mvp.geno.desc" as genotype in my R, but when I tries "MVP.Data.Kin(TRUE, mvp_prefix='mvp', out='mvp'", it does not work.

>  MVP.Data.PC(TRUE, out='mvp', perc=1, pcs.keep=5)
Error in MVP.Data.PC(TRUE, out = "mvp", perc = 1, pcs.keep = 5) : 
   could not find function "MVP.Data.PC"

The same thing happened when I typed "MVP.Data.PC(TRUE, out='mvp', perc=1, pcs.keep=5)". How can I fix this problem? Otherwise, may I have your example the kinship file and Principal Components files?

Best regards
Leah

@YinLiLin
Copy link
Collaborator

hi

Thank you for using of MVP!
There are two ways to calculate kinship and pc. First, it could be automatically outputted to your workplace when transforming your genetype by setting as following:

MVP.Data(..., fileKin=TRUE, filePC=TRUE)

Second, you could use the corresponding functions to derive it if your genetype is already in required file format of MVP (.geno.desc, .geno.bin):
Loading your genotype to R:

genotype <- attach.big.matrix("mvp.geno.desc")

For kinship:

K <- MVP.K.VanRaden(genotype)

For PC

PC <- MVP.PCA(genotype)

Please have a try with either above for your case, and any questions are welcome to discuss with us here.

Good luck,
Lilin

@hyacz
Copy link
Collaborator

hyacz commented Feb 5, 2019

Hi, Leah

MVP.Data.Kin and MVP.Data.PC are new functions that was recently added to MVP. If you are using an old version of MVP, you can use the following code to update to the latest version.

devtools::install_github("xiaoleiLiubio/rMVP")

Or use the MVP.Data function to do this, as LiLin Yin replied. I closed this issue, and if you have any new questions, you can open another issue.

Best,
Haohao

@hyacz hyacz closed this as completed Feb 5, 2019
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

3 participants