ligera
function and scripts/ligera.R
command line interface script, which supports plink BED/BIM/FAM files.ligera2
, which implements full "BOLT trick" to avoid having to calculate kinship explicitly, and which scales as $O( m n \sqrt{\kappa} )$ instead of $O( mn^2 + n^2 \sqrt{\kappa} )$, which is far better as n increases.ligera2_bed
, a version of ligera2
specific to plink BED files sped up with Rcpp code for critical components!ligera
, ligera2
, and ligera2_bed
).ligera_multi
, ligera2_multi
, ligera2_bed_multi
), which iterates the genetic association scans and adds significant loci to covariates (options for one per iteration or all significant per iteration) to condition upon them and increase power on the weaker signals.ligera
, ligera2
, and ligera2_bed
).ligera_multi
, ligera2_multi
, ligera2_bed_multi
) to work when the genotype matrix has missing values, as these may be incorporated as covariates in the iteration.class
usage now that matrices return a two-element array in R version 4.ligera
, ligera2
, ligera2_bed
, and *_multi
variants)m_chunk_max
to further reduce memory usage (compared to previous default) without sacrificing speed.scripts/
) for main 3 versions of ligera, each with a --multi
option to also cover the 3 multiscan versions (actually added 2020-09-29)scripts/
; also added 2020-09-29)conj_grad_scan_bed_wcpp
) affecting ligera2_bed
and ligera2_bed_multi
versions only.sweep
cases with matrix
version (redid Tiffany Tu devel branch commits e9629dc and 8493282 with minor edits, thanks Tiffany!!!)ligera_f
, ligera_f_multi
ligera
, which uses the faster Wald test (calibrated for quantitative but not binary traits), the F-test version is quite a bit slower, and is optimized for m >> n
, so it is a work in progress.NEWS.md
slightly to improve its automatic parsing.n = 20
, from 100; left m = 1000
)ligera
fixed bug that inbr
wasn't subset for non-NA individuals when there is missingness in the input traitinbr
was explicitly provided, otherwise lazy evaluation from kinship (which was subset) ensured that it was subset when it was not provided as explicit parameter.ligera2
, ligera2_bed
, ligera_f
) do not have the option of providing inbr
so were not affected by similar bugs.ligera_f
V
to specify algorithm (there are four versions, numbered 0-3, roughly falling into two scalability classes). This is a temporary option that will be removed if one version emerges as clearly superior.V=0
(default was V=1
before, but internal tests show that it has the lowest numerical stability of all the choices, below machine precision). Previously all versions were commented out except V=1
.I/2
) with popkin estimates in all tests. This was necessary so WG-biased estimates would differ from their unbiased counterparts, and helped identify the numeric stability issues of the previous ligera_f
version.ligera_f
is invariant to WG bias (a type of bias that always results in non-singular kinship matrices).ligera
is not invariant to WG, and it is unclear at the moment why.ligera2_f
, a version of ligera_f
that calculates performs all calculations without an explicit kinship matrix estimate (like ligera2
was to ligera
).V
versions as before, and (except for V=1
) all and agree with each other and with ligera_f
up to machine precision. Runtime has not been evaluated, might not be good yet for any version (f versions remain experimental).popkin_prod
added option want_inbr
(to skip calculation of inbr
, as it is unused in f versions; default is to calculate and return it as before).conj_grad_scan
added options want_inbr
(to skip calculation of inbr
), want_b
(to return b
, default does not as before), and b
(allows for providing b
as calculated in a previous run). Additionally mean_kinship
is now NA
by default and it does not have to be provided if b
is provided. Lastly, if want_inbr
and want_b
are both false, then only Z
is returned (instead of a list with these objects and Z
).ligera_f
, ligera2_f
: removed previous V=1
algorithm, which was numerically unstable. Shifted down previous versions 2:3
to 1:2
.ligera2_f_multi
.conj_grad_scan
and cgsolve_mat
: handled a case where input Y
has a column of zeroes, which should give an output Z
with zeroes in the same columns but which the conjugate gradient algorithm gave NaN's for those same columns of Z
(because of a 0/0 factor). This special case is now recognized and handled correctly.ligera2_bed_f
.ligera2_bed_f_multi
.ligera2_bed_f_multi
added ability to filter discovered loci by LD, using internal function ld_prune
.prune_ld
to turn this feature on, and r2_max
and pos_window
to control how pruning is done.m_loci
and n_ind
now that function just reads BIM and FAM files in addition to BED file that is required.genio
is now imported to read these files (used to be merely "suggested").ligera2_bed_multi
ported ability to filter discovered loci by LD from ligera2_bed_f_multi
, and all other related changes from previous entry.ligera2_bed_f_multi
added parameter V
(to pass to ligera2_bed_f
).scripts/ligera2_bed.R
added --fstat
option for running ligera2_bed_f
and ligera2_bed_f_multi
on a plink1 set of files on the terminal.sprintf
and stop
calls in Rcpp code with direct stop
calls.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.