| ras_harmonize_sumstats | R Documentation |
The entry point for summary-informed RAS. Takes a raw external summary-statistics file and a local genotype map, chooses the naming/build route from the data rather than from an assumption, and returns a verified weight vector together with a reproducible QC table.
ras_harmonize_sumstats(
sumstats,
map,
dict = NULL,
chain = NULL,
chain_back = NULL,
cup = NULL,
converter = .liftover_converter_ucsc,
check_reverse = TRUE,
assume_same_build = FALSE,
cols = list(),
...
)
sumstats |
Path to the external summary statistics, or a data frame. |
map |
Data frame with columns |
dict |
Optional variant dictionary ON THE MAP'S BUILD, from
|
chain, chain_back |
Optional liftOver chain files, enabling the
coordinate-conversion route. |
cup |
Optional data frame |
converter |
Conversion function for the liftOver route; the default
shells out to the UCSC |
check_reverse |
Logical. Round-trip every liftOver conversion and drop
what cannot return to its own position (default |
assume_same_build |
Logical. Assert, on the caller's authority, that both sides use the same genome build. Only then will positions be used without the build gate having verified them. Appropriate when the summary statistics are a GWAS Catalog harmonised (GRCh38) file and the map is GRCh38. |
cols |
Optional column-name overrides, passed through. |
... |
Passed to |
The driver never guesses about the genome build. It inspects both sides' ID
conventions and then either matches directly, translates the summary
statistics through a dictionary, lifts their coordinates over, or refuses –
listing exactly what would unblock it. Every path ends at
ras_weights_from_sumstats with build_check = TRUE unless
the caller has explicitly asserted the builds agree or a liftOver round trip
has already established them.
A list with
weights |
Numeric vector of length |
qc |
A data frame with one row per harmonisation stage
( |
route |
The route actually taken. |
trail |
Human-readable audit trail of every decision. |
weights_result |
The full |
sumstats_aligned |
The summary statistics after any translation or conversion. |
ras_scan_external to scan with these weights;
ras_sumstats_report to inspect an alignment without
committing to it.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.