Description Usage Arguments Details Examples
View source: R/plot_SNPindex.r
This function allows plotting the mean SNP-index values from each bulk against the mid position of the corresponding window of a specific chromosome. By setting the dpi parameter (resolution), the plot will be automatically saved in .TIF format.
Note: for journal publications the preferred format is .TIF, and the minimum resolution is of 600 dpi or 1200 dpi. Always refer to journal-specific guidelines.
1 2 3 4 5 6 7 8 9 10 |
SNPindex.windows |
filtered data frame (containing both bulks) |
chr |
chrosome ID |
filename |
file name under which the file will be saved (default="plot_SNPindex_chX") |
path |
path where the file will be saved (default=current working directory) |
dpi |
resolution value. If no value is given, plots will be generated but not saved |
width |
width value (default=7.5) |
height |
height value (default=5) |
units |
size units (default="in") |
The mean SNP-index from each bulk is plotted in a different colour against the corresponding window mid position in a ggplot2 line plot.
If the dpi argument is not passed, the plot will be shown in the plot panel; however, if a value is added to the dpi argument, the graph will be saved in TIFF format. Additionally, the name with which to save the file, the directory, the height and width of the plot and their units can be specified in the arguments.
The plot will be saved with default values if different ones are not specified.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## OR use default values AND save the plot
plot_SNPindex(SNPindex.windows=SNPindex_windows,
chr=3,
dpi=1200)
## OR customise default parameters
plot_SNPindex(SNPindex.windows=SNPindex_windows,
chr=3,
filename="SNPindex_ch3",
path="Document/Plots",
dpi=1200,
width=20,
height=12,
units="cm")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.