extract_results: Extract tables from hap.py result lists

Description Usage Arguments Value Examples

View source: R/getters.R

Description

Extract results tables from multiple hap.py result objects and combine into a single data.frame. Source information from each result is added as an additional column (happy_prefix).

Usage

1
2
3
extract_results(happy_result_list, table = c("summary", "extended",
  "pr.all", "pr.indel.pass", "pr.indel.sel", "pr.indel.all", "pr.snp.pass",
  "pr.snp.sel", "pr.snp.all"))

Arguments

happy_result_list

A happy_result_list object.

table

Table of data to extract from each result. "summary" or "extended" get top level tables; the pr options get Precision-Recall tables.

Value

a data.frame of combined tables from list

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
samplesheet <- readr::read_csv("group_id,replicate_id,happy_prefix
PCR-Free,NA12878-I30,NA12878-I30_S1
PCR-Free,NA12878-I33,NA12878-I33_S1
Nano,NA12878-R1,NA12878-R1_S1
Nano,NA12878-R2,NA12878-R2_S1
")
hap_samplesheet <- read_samplesheet_(samplesheet = samplesheet_df)

# get collapsed summary table of high-level metrics
summary_df <- extract_results(hap_samplesheet$results, table = "summary")
unique(summary_df$happy_prefix)
# [1] "/output/path/prefix"  "/different/path/prefix"

## End(Not run)

Illumina/happyR documentation built on July 12, 2019, 7:57 p.m.