plot_conc: Phasing concordance plot

Description Usage Arguments Details Examples

View source: R/performance.R

Description

plot_conc plots the phasing concordance, see set_gt_conc

Usage

1
plot_conc(acset, feats = NA, cex = 0.5)

Arguments

acset

An acset list created by new_acset. The acset must contain the elements 'gt_conc' and 'gt_phased_conc' which contain the concordance and inconcordance for every gene before (gt_conc) and after phasing (gt_phased_conc), see set_gt_conc.

feats

A character vector of feature names to include in the plot.

cex

A numerical value giving the amount by which plotting text and symbols should be magnified relative to the default, see par.

Details

To assess the success of the phasing one can calculate the degree of variability remaining if all cells with haplotype 2 are set to haplotype 1. As a rough measure of this this function calculates the variability as the number of cells that differ from the inferred haplotype for every gene with two variants. The differing number of cells per gene we denote as the inconcordance and the number of cells with identical haplotype to the inferred haplotype as concordance, see set_gt_conc for further details.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
##load dataset
invisible(marinov)
acset = new_acset(featdata = marinov[['featdata']], refcount =
marinov[['refcount']], altcount = marinov[['altcount']], phenodata =
marinov[['phenodata']])

##Call gt
acset = call_gt(acset, min_acount = 3, fc = 3)

##Filter variants and genes
acset = filter_acset(acset, nmincells = 5, nminvar = 2)

##Phase
acset = phase(acset, input = 'gt', weigh = FALSE, method = 'exhaust')

##Calculate the genotype concordance before and after phasing
acset = set_gt_conc(acset)

##Plot the genotype concordance before and after phasing
acset = plot_conc(acset)

scphaser documentation built on May 29, 2017, 3:49 p.m.