Description Usage Arguments Details Examples
View source: R/SNPratio_plot.R
This wrapper function is used to fully run the SNP-ratio method, by calling all the funcitons involved in plotting the SNP-ratio values across positions of a specific chromosome.
SNPindex=AD_alt/(AD_ref + AD_alt)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
vcf.list |
object containing meta information and vcf data frame |
wtBulk |
Wild-Type pool |
mBulk |
Mutant pool |
variants |
variants to be considered. Default is "SNP" (allowed: "SNP" or "all") |
min.SNPratio |
min value allowed for the SNP index (default=0.3) |
min.DP |
min value allowed for the read depth (default=50) |
max.DP |
max value allowed for the read depth (default=200) |
chrID |
chromosome ID of interest |
chr |
chromosome name printed on the plot |
degree |
LOESS smoothing degree (default=2) |
span |
LOESS smoothing span (default=0.07) |
filename |
file name under which the file will be saved (default="plot_SNPratio_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") |
Wrapper function that sequentially calls the required functions involved in generating the SNP-ratio plot: calc_SNPratio(), filter_SNPratio(), extract_chrIDs() and plot_SNPratio(). The resulting plot will show SNP-ratio values (for both bulks) across chromosome positions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ## Use default values WITHOUT saving the plot
SNPratio_plot(vcf.list=vcf_list,
wtBulk="pool_S3781_minus",
mBulk="pool_S3781_plus",
chrID="SL4.0ch03",
chr=3)
## OR use default values AND save the plot
SNPratio_plot(vcf.list=vcf_list,
wtBulk="pool_S3781_minus",
mBulk="pool_S3781_plus",
chrID="SL4.0ch03",
chr=3,
dpi=1200)
## OR customise default parameters
SNPratio_plot(vcf.list=vcf_list,
wtBulk="pool_S3781_minus",
mBulk="pool_S3781_plus",
variants="all",
min.SNPratio=0.3,
min.DP=60,
max.DP=250,
chrID="SL4.0ch03",
chr=3,
degree=1,
span=0.05,
filename="deltaSNPindex_chrom03",
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.