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

Error in .rowNamesDF<-(x, value = value) : invalid 'row.names' length #36

Open
Integratedhaplotypescore opened this issue Nov 10, 2022 · 2 comments · May be fixed by #28
Open

Error in .rowNamesDF<-(x, value = value) : invalid 'row.names' length #36

Integratedhaplotypescore opened this issue Nov 10, 2022 · 2 comments · May be fixed by #28
Labels

Comments

@Integratedhaplotypescore

Dear @bunop

When I run the tableRuns() command in detectRUNS, I get the following error. Can you help me solve this error?

topRuns <- tableRuns(runs = slidingRuns, genotypeFile = "ESMEclean.no-tabs.ped", mapFile = "False_clean.map", threshold = 0.5)

Threshold used: 50
I found only Runs data frame. GOOD!
Calculation % SNP in ROH
Chromosome founds: 26
|===============================================================================| 100%
Calculation % SNP in ROH finish
checking: ESME
Error in .rowNamesDF<-(x, value = value) : invalid 'row.names' length

The detectRUNs software sample .ped file is given as follows.

Jacobs H70 0 0 1 -9 T T A A
Jacobs H71 0 0 1 -9 C T G A

But my .ped file is as shown below. Instead of breed there is an individual rank number. Individual rank numbers were defined in the DetectRUNs software as if there were multiple groups. So I replaced the individual rank numbers with the breed name using R. Do you think this could be the cause of the error? I had no errors in the phases prior to this problem and everything seemed correct.

1 R01C01 0 0 0 -9 G G G C
2 R01C02 0 0 0 -9 G G G C

@bunop
Copy link
Contributor

bunop commented Nov 10, 2022

Hi @Integratedhaplotypescore ,

there are two problems here. The first, the error you got is quite cryptic but it depends by the threshold you used that is too high for your data. You can have the same error message with the sample dataset by setting threshold=1. I made some changes at the code to have a better error message, but is not published on cran, you have to install this library by source.

The second problem is related by your data: if I remember correctly (@filippob, please correct me), this function will filter the runs which occurs in more individuals within the same population (threshold=0.5, 50% of individuals within the same FID (or breed) have the same runs). If you have a FID different for each sample this function will not work as intended.

Hope it helps

@Integratedhaplotypescore
Copy link
Author

Dear @bunop

First of all, thank you very much for taking the time to reply. The reason I got the error was to set the threshold value high. For example, when I set "threshold = 0.1" I got no errors.
Thank you very much again for your help.

@bunop bunop added the question label Nov 10, 2022
@bunop bunop linked a pull request May 9, 2023 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants