EuracBiomedicalResearch / FamAgg

This is the development version of the FamAgg Bioconductor package.
https://EuracBiomedicalResearch.github.io/FamAgg
MIT License
0 stars 2 forks source link

lable1 or age cannot match id #19

Closed alex46015 closed 5 years ago

alex46015 commented 5 years ago

I tried to plot the pedigree, and used lable1, lable2, or age , the value cannot match the id in plot

any suggestion?

Thanks!

Alex

jorainer commented 5 years ago

Dear Alex, can you please elaborate a little? Ideally you should provide a small example that causes the error, or at lease post the code you used (the function call) and the resulting error message (if any).

alex46015 commented 5 years ago

Here is the code I used for one family selped<-data.frame(family=c(8,8,8,8,8,8,8,8,8,8,8,8,8,8,8), id=c(11,12,14,15,1,2,4,5,6,7,9,10,3,8,13), father=c(2,NA,NA,NA,2,14,12,14,2,NA,7,14,2,7,NA), mother=c(13,NA,NA,NA,13,15,5,15,13,NA,10,15,13,10,NA), sex=c("M", "M", "M", "F", "F", "M", "M", "F", "F", "M", "F", "F","F", "M", "F"), affected=c(0,0,0,0,1,1,1,1,0,0,0,0,0,0,0), DNA=c("N", "N", "N", "N", "N", "N", "Y", "Y", "Y", "Y", "Y", "Y","Y", "Y", "Y"), age=c(27,73,93,90,24,66,35,68,33,59,24,57,31,31,61), Integration=c(0,0,0,0,1,1,1,1,2,2,2,2,3,3,3)) selped endage <- selped$age names(endage) <- selped$id Integration<-selped$Integration names(Integration)<-selped$id affection<-selped$affected names(affection) <-selped$id fad <- FAData(pedigree =selped,age=endage) trait(fad) <- affection plotPed(fad, id = 1, family=i, highlight.ids = list(S =selped[selped$DNA=="Y","id"]),label1=Integration,label3=endage) legendindex<-c("0:No information","1:Definite Glaucoma Diagnosis","2:Questionable Glaucoma Diagnosis","3:No Glaucoma","4:Can't Tell if Glaucoma","9:Mismatch between two databases") legend(1, 1, legend=legendindex,bty="n")

jorainer commented 5 years ago

I see, there is something strange with the labels. I will investigate.

jorainer commented 5 years ago

Labels and pedigree got mis-ordered. I fixed that. The updated FamAgg (package version 1.10.4) should become available from Bioconductor within the next few days and can then be updated with BiocManager::install() (assuming you have R-3.5 and Bioconductor version 3.8 installed).

Alternatively, you can install the updated package directly from github:

devtools::install_github("EuracBiomedicalResearch/FamAgg", ref = "RELEASE_3_8")
alex46015 commented 5 years ago

Great! I have plotted 31 pedigree and check most of them, there is no error. Our team are excited about your R package.

Thanks for your hard work!

Alex

jorainer commented 5 years ago

Thanks! Please let me know if you run into problems again.

I'm closing this issue now. Feel free to re-open if needed.