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

Improve summaryRuns description #17

Open
mgb1985 opened this issue Jun 11, 2020 · 2 comments · May be fixed by #28
Open

Improve summaryRuns description #17

mgb1985 opened this issue Jun 11, 2020 · 2 comments · May be fixed by #28

Comments

@mgb1985
Copy link

mgb1985 commented Jun 11, 2020

Hi!
With the summaryRuns function, I guessed that what is obtained with $summary_ROH_mean_chr is the mean length of runs per chromosome and group (because it is the fifth element of the summary list and in the help page of summaryRuns it's written that it is what the fifth element is).
But in the tutorial, it is written, talking about the various sumstats obtained with summaryRuns:
"Or, the average number of ROH per chromosome and per breed can be obtained.
summaryList$summary_ROH_mean_chr".
Which is clearly not the same!
So I was wondering, what is summary_ROH_mean_chr? Is it mean count or mean length? If length, what is the unit?
Thanks!
Muriel

@bunop
Copy link
Contributor

bunop commented Jun 11, 2020

Hi @mgb1985 ,

Thank you for your interest in detectRUNs. Regarding your question:

I guessed that what is obtained with $summary_ROH_mean_chr is the mean length of runs per chromosome and group (because it is the fifth element of the summary list and in the help page of summaryRuns it's written that it is what the fifth element is).

Your supposition is correct, here you can find how this value is calculated. This value is the mean length expressed in MB. You can proof it by selecting, for examples, all the runs for Jacobs and chrom 2: if you calculate the average of lengthBps column and divide by 1e6

 > mean(slidingRuns[(slidingRuns$group=="Jacobs" & slidingRuns$chrom==2),"lengthBps"]) / 1e6
[1] 4.069597

You will obtain the same value calculated for the chrom 2 and Jacobs that you see in the vignette for summaryList$summary_ROH_mean_chr label:

##   chrom   Jacobs Navajo-Churro
## 1     2 4.069597      4.492243
## 2    24 3.697987      2.745963

I Think that the example explained in the vignetted is not describe correctly. @filippob , what do you think? should summaryRuns be described better in both vignette and docs?

@bunop bunop added the question label Jun 11, 2020
@mgb1985
Copy link
Author

mgb1985 commented Jun 16, 2020

Hi @bunop !

Thanks for the link on the calculation!
It's all clear now!

Muriel

@bunop bunop changed the title What is Improve summaryRuns description Jun 20, 2020
@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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants