View source: R/calculate_window_size.R
calculate_window_size | R Documentation |
This function given the number of gametes (gametes
), coverage (coverage
),
genotyping error rate (se
), and average recombination rate (avgr
),
as well as the number of hetSNPs in the data,
is used to automatically calculate a preferred window size for phasing.
This is accomplished by using the predict function and a pre-trained beta regression model betaregmodel_20220718
.
The user can call this function themselves outside of rhapsodi's main steps, or the user can specify they would rather rhapsodi
calculate a window size based on the input data characteristics.
calculate_window_size(ngam, cov, nsnp, ger, avgr)
ngam |
an integer; number of gametes in the dataset; this should be the number of columns in the input dataframe (excluding the positions column) |
cov |
a numeric; sequencing depth of coverage applicable to the data |
nsnp |
an integer; number of hetSNPs in the dataset; this should be the number of rows in the input dataframe (after filtering to include hetSNPs only) |
ger |
a numeric; genotyping error rate applicable to data |
avgr |
a numeric; average recombination rate |
window_size an integer; the preferred window size for accurate phasing given the data characteristics
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.