Description Usage Arguments Value See Also Examples

View source: R/DistToNearest.R

`plotGmmThreshold`

plots the results from `"gmm"`

method of
findThreshold, including the Gaussian distributions, input nearest neighbor
distance histogram, and threshold selected.

1 2 3 4 5 6 7 8 9 10 11 12 |

`data` |
GmmThreshold object output by the |

`cross` |
numeric vector of distances from distToNearest to draw as a
histogram below the |

`xmin` |
minimum limit for plotting the x-axis. If |

`xmax` |
maximum limit for plotting the x-axis. If |

`breaks` |
number of breaks to show on the x-axis. If |

`binwidth` |
binwidth for the histogram. If |

`title` |
string defining the plot title. |

`size` |
numeric value for lines in the plot. |

`silent` |
if |

`...` |
additional arguments to pass to ggplot2::theme. |

A ggplot object defining the plot.

See GmmThreshold for the the input object definition and findThreshold for generating the input object. See distToNearest calculating nearest neighbor distances.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
# Subset example data to one sample as a demo
data(ExampleDb, package="alakazam")
db <- subset(ExampleDb, sample_id == "-1h")
# Use nucleotide Hamming distance and normalize by junction length
db <- distToNearest(db, sequenceColumn="junction", vCallColumn="v_call_genotyped",
jCallColumn="j_call", model="ham", normalize="len", nproc=1)
# To find the threshold cut, call findThreshold function for "gmm" method.
output <- findThreshold(db$dist_nearest, method="gmm", model="norm-norm", cutoff="opt")
print(output)
# Plot results
plotGmmThreshold(output, binwidth=0.02)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.