Package: LTFGRS 1.1.2

Emil Michael Pedersen

LTFGRS: Implementation of Several Phenotype-Based Family Genetic Risk Scores

Implementation of several phenotype-based family genetic risk scores with unified input data and data preparation functions to help facilitate the required data preparation and management. The implemented family genetic risk scores are the extended liability threshold model conditional on family history from Pedersen (2022) <doi:10.1016/j.ajhg.2022.01.009> and Pedersen (2023) <https://www.nature.com/articles/s41467-023-41210-z>, Pearson-Aitken Family Genetic Risk Scores from Krebs (2024) <doi:10.1016/j.ajhg.2024.09.009>, and family genetic risk score from Kendler (2021) <doi:10.1001/jamapsychiatry.2021.0336>.

Authors:Emil Michael Pedersen [aut, cre], Jette Steinbach [aut], Lucas Rasmussen [ctb], Morten Dybdahl Krebs [aut]

LTFGRS_1.1.2.tar.gz
LTFGRS_1.1.2.zip(r-4.7-x86_64)LTFGRS_1.1.2.zip(r-4.7-arm64)LTFGRS_1.1.2.zip(r-4.6-x86_64)LTFGRS_1.1.2.zip(r-4.6-arm64)LTFGRS_1.1.2.zip(r-4.5-x86_64)
LTFGRS_1.1.2.tgz(r-4.6-x86_64)LTFGRS_1.1.2.tgz(r-4.6-arm64)LTFGRS_1.1.2.tgz(r-4.5-x86_64)LTFGRS_1.1.2.tgz(r-4.5-arm64)
LTFGRS_1.1.2.tar.gz(r-4.7-arm64)LTFGRS_1.1.2.tar.gz(r-4.7-x86_64)LTFGRS_1.1.2.tar.gz(r-4.6-arm64)LTFGRS_1.1.2.tar.gz(r-4.6-x86_64)
LTFGRS_1.1.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
LTFGRS/json (API)

# Install 'LTFGRS' in R:
install.packages('LTFGRS', repos = c('https://emilmip.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/emilmip/ltfgrs/issues

Pkgdown/docs site:https://emilmip.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

cpp

5.86 score 2 stars 10 scripts 313 downloads 51 exports 51 dependencies

Last updated from:f306663128. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK186
linux-devel-x86_64OK208
source / vignettesOK450
linux-release-arm64OK168
linux-release-x86_64OK221
macos-release-arm64OK235
macos-release-x86_64OK503
macos-oldrel-arm64OK230
macos-oldrel-x86_64OK500
windows-devel-arm64OK395
windows-devel-x86_64OK138
windows-release-arm64OK386
windows-release-x86_64OK179
windows-oldrel-x86_64OK158
wasm-releaseOK148

Exports:attach_attributescensor_family_onsetsconstruct_covmatconstruct_covmat_multiconstruct_covmat_singleconvert_age_to_circonvert_age_to_threshconvert_cir_to_ageconvert_formatconvert_liability_to_aooconvert_observed_to_liability_scalecorrect_positive_definiteestimate_gen_liability_ltfhestimate_liabilityestimate_liability_multiestimate_liability_singleextract_estimation_info_graphextract_estimation_info_graph_multiextract_estimation_info_tblextract_estimation_info_tbl_multifamilywise_attach_attributesfamilywise_censoringfamilywise_censoring_multiget_all_combsget_covmatget_family_graphsget_generationsget_onset_timeget_relatednessget_relationsGibbs_estimatorgraph_based_covariance_constructiongraph_based_covariance_construction_multigraph_to_triokendler_family_calculationskendler_simplifiedlabel_relativesPA_algorithmpartition_indicesprepare_graphprepare_thresholdsprepare_thresholds_multiRelation_per_proband_plotrtmvnorm.gibbssimulate_under_LTMsimulate_under_LTM_multisimulate_under_LTM_singletnorm_meantnorm_mixture_conditionaltnorm_vartruncated_normal_cdf

Dependencies:batchmeansclicodetoolscpp11data.tabledigestdplyrfarverfuturefuture.applygenericsggplot2globalsgluegmmgtableigraphisobandjsonlitelabelinglatticelifecyclelistenvlubridatemagrittrMatrixmvtnormparallellypillarpkgconfigpurrrR6RColorBrewerRcpprlangS7sandwichscalesstringistringrtibbletidyrtidyselecttimechangetmvtnormutf8vctrsviridisLitewithrxgboostzoo

LTFGRS Workflow: Prepare Genetic Liability for Multi-trait GWAS
Simulate mock trio, phenotype, and CIP data | Cumulative incidence proportions (CIP) | Trio information | Phenotype data | Preparing for estimate_liability() | Population graph | Automatic identification of n-degree relatives | Mixture model genetic liability estimates

Last update: 2026-03-06
Started: 2026-03-06

LTFGRS Workflow: Prepare Genetic Liability for Multi-Trait Prediction
Simulate mock trio, phenotype, and CIP data | Cumulative incidence proportions (CIP) | Trio information | Phenotype data | Preparing for estimate_liability() | Population graph | Automatic identification of n-degree relatives | Censoring of future events on a family basis | Assign thresholds to censored families | Assign thresholds to family graphs | Estimating genetic liabilities with estimate_liability() | FGRS with personalised threshold and PA | FGRS with personalised threshold and Gibbs | FGRS with mixture model | Parallelisation

Last update: 2026-03-06
Started: 2026-03-06

Kendler workflow
Simulate mock trio, phenotype, and CIP data | Cumulative incidence proportions (CIP) | Trio information | Phenotype data | Preparing for kendler_simplified() | Preparing thresholds and cumulative incidence proportions | Population graph | Automatic identification of n-degree relatives | Estimating the simplified Kendler FGRS

Last update: 2026-01-09
Started: 2026-01-09

Reflections on the use of population representative CIPs
Simulating mock data | Mock phenotypes | Calculating CIPs | FGRS with population representative CIPs | FGRS with over-ascertained CIPs | Comparing the results

Last update: 2026-01-09
Started: 2026-01-09

From trio information to full families
From trio information to graph | From graph to subgraph and kinship matrix | Calculate kinship matrix

Last update: 2026-01-09
Started: 2026-01-09

Identifying, labelling, and plotting family relations from graphs
Introduction

Last update: 2026-01-09
Started: 2026-01-09

iGraph data management
Manipulating attributes | Using attributes for calculations | Removing vertices with certain attribute values

Last update: 2026-01-09
Started: 2026-01-09

LTFGRS Workflow: Prepare Genetic Liability for GWAS
Simulate mock trio, phenotype, and CIP data | Cumulative incidence proportions (CIP) | Trio information | Phenotype data | Preparing for estimate_liability() | Preparing thresholds and cumulative incidence proportions | Population graph | Automatic identification of n-degree relatives | Estimating genetic liabilities with estimate_liability() | FGRS with personalised threshold and PA | FGRS with personalised threshold and Gibbs | FGRS with mixture model | Parallelisation

Last update: 2026-01-09
Started: 2026-01-09

LTFGRS Workflow: Prepare Genetic Liability for Prediction
Simulate mock trio, phenotype, and CIP data | Cumulative incidence proportions (CIP) | Trio information | Phenotype data | Preparing for estimate_liability() | Population graph | Automatic identification of n-degree relatives | Censoring of future events on a family basis | Assign thresholds to censored families | Assign thresholds to family graphs | Estimate the genetic liability | Parallelisation

Last update: 2026-01-09
Started: 2025-05-19

Readme and manuals

Help Manual

Help pageTopics
Attach attributes to a family graphsattach_attributes
Censor onset times in a family based on a proband's end of follow-up.censor_family_onsets
Constructing a covariance matrix for a variable number of phenotypesconstruct_covmat
Constructing a covariance matrix for multiple phenotypesconstruct_covmat_multi
Constructing a covariance matrix for a single phenotypeconstruct_covmat_single
Convert age to cumulative incidence rateconvert_age_to_cir
Convert age to thresholdconvert_age_to_thresh
Convert cumulative incidence rate to ageconvert_cir_to_age
Attempts to convert the list entry input format to a long formatconvert_format
Convert liability to age of onsetconvert_liability_to_aoo
Convert the heritability on the observed scale to that on the liability scaleconvert_observed_to_liability_scale
Positive definite matricescorrect_positive_definite
Estimate genetic liability similar to LT-FHestimate_gen_liability_ltfh
Estimating the genetic or full liability for a variable number of phenotypesestimate_liability
Estimating the genetic or full liability for multiple phenotypesestimate_liability_multi
Estimating the genetic or full liabilityestimate_liability_single
Title Internal Function used to extact input needed from graph input for liability estimationextract_estimation_info_graph
Title Internal Function used to extact input needed from multi-trait graph input for liability estimationextract_estimation_info_graph_multi
Title Internal Function used to extact input needed for liability estimationextract_estimation_info_tbl
Title Internal Function used to extact input needed from multi-trait tibble input for liability estimationextract_estimation_info_tbl_multi
Wrapper to attach attributes to family graphsfamilywise_attach_attributes
Censor Family Onsets for Multiple Familiesfamilywise_censoring
Familywise Censoring for Multiple Outcomesfamilywise_censoring_multi
Fixing sex coding in trio infofixSexCoding
construct all combinations of input vectorget_all_combs
Construct kinship matrix from graphget_covmat
Automatically identify family members of degree nget_family_graphs
Compute Generational Distances and Kinship Coefficients from a Family Graphget_generations
Calculate age of diagnosis, age at end of follow up, and statusget_onset_time
Relatedness between a pair of family membersget_relatedness
Compute and Label Pairwise Relationships Across Multiple Family Graphsget_relations
Wrapper around the Gibbs Sampler that returns formatted liability estimates for the probandGibbs_estimator
Constructing covariance matrix from local family graphgraph_based_covariance_construction
Constructing covariance matrix from local family graph for multi trait analysisgraph_based_covariance_construction_multi
Convert from igraph to trio informationgraph_to_trio
Title Helper function for Kendler's FGRSkendler_family_calculations
(Simplified) Kendler's FGRSkendler_simplified
Label Pairwise Relationships Based on Generational Distance and Kinship Coefficientlabel_relatives
Title Pearson-Aitken algorithm to calculate mean values in truncated multivariate normal distributionsPA_algorithm
Generate row indices for partitioning a matrix-like objectpartition_indices
Construct graph from register informationprepare_graph
Calculate (personalised) thresholds based on CIPs.prepare_thresholds
Prepare thresholds for multiple phenotypesprepare_thresholds_multi
Plot the (Average) Number of Relatives per Proband by Relationship TypeRelation_per_proband_plot
Gibbs Sampler for the truncated multivariate normal distributionrtmvnorm.gibbs
Simulate under the liability threshold model.simulate_under_LTM
Simulate under the liability threshold model (multiple phenotypes).simulate_under_LTM_multi
Simulate under the liability threshold model (single phenotype).simulate_under_LTM_single
Title: Calculate the mean of the truncated normal distributiontnorm_mean
Title: Calculates mean and variance of mixture of two truncated normal distributionstnorm_mixture_conditional
Title: Calculate the variance of the truncated normal distributiontnorm_var
CDF for truncated normal distribution.truncated_normal_cdf