HudsonFst.plot | R Documentation |
Plot Fst values along chromosomes
HudsonFst.plot( Info, HFst.m, HFst.prof = NULL, Coord = NULL, Ref = NULL, Threshold = NULL )
Info |
a data.frame providing information about markers |
HFst.m |
a data.frame with 2 columns, Fst and Weight, as provided by the |
HFst.prof |
a data.frame corresponding to one item of the output of the |
Coord |
a vector with the minimum and maximum coordinates (i.e. positions along the genome) providing the range of the genomic region that will be plotted. |
Ref |
a value to plot a reference line |
Threshold |
a value to plot a threshold line |
a ggplot object
## The full example execution takes a few seconds. data(Freq);data(NbGamete) FreqNbG <- BuildFreqNbG(Freq,NbGamete) HFst.m <- HudsonFst.m(FreqNbG) TwoPops <- list(First="Colombian",Second="Tuscan") HFst.prof <- HudsonFst.prof(HFst.m,Contrast=TwoPops) ## Plot the raw data HudsonFst.plot(Info,HFst.m$Colombian_Tuscan) ## Plot the raw data and the segmentation HudsonFst.plot(Info,HFst.m$Colombian_Tuscan,HFst.prof$Colombian_Tuscan) ## Add a background/reference level RefLevel <- median(HFst.prof$Colombian_Tuscan) HudsonFst.plot(Info,HFst.m$Colombian_Tuscan,HFst.prof$Colombian_Tuscan, Ref=RefLevel) ## Add a threshold Threshold <- 3*RefLevel HudsonFst.plot(Info,HFst.m$Colombian_Tuscan,HFst.prof$Colombian_Tuscan, Ref=RefLevel,Threshold = Threshold)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.