Description Usage Arguments Details Examples
View source: R/SNPindex_plot.R
This wrapper function is used to fully run the SNP-index method, by calling all the funcitons involved in plotting the mean SNP-index values from each bulk against the mid position of the corresponding window 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 20 21 | 
| 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.SNPindex | min value allowed for the SNP index (default=0.3) | 
| max.SNPindex | max value allowed for the SNP index (default=0.9) | 
| min.DP | min value allowed for the read depth (default=50) | 
| max.DP | max value allowed for the read depth (default=200) | 
| min.GQ | min value allowed for the genotype quality (default=99) | 
| chrID | chromosome ID of interest | 
| chr | chromosome name printed on the plot | 
| windowSize | window size (default=1000000) | 
| windowStep | window step (default=10000) | 
| 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") | 
Wrapper function that sequentially calls the required functions involved in generating the SNP-index plot: calc_SNPindex(), filter_SNPindex(), extract_chrIDs(), slidingWindow() and plot_SNPindex(). The resulting plot will show (for each bulk) mean SNP-index values against the mid position of the corresponding window of a specific chromosome.
| 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 32 33 | ## Use default values WITHOUT saving the plot
SNPindex_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
SNPindex_plot(vcf.list=vcf_list, 
         wtBulk="pool_S3781_minus", 
         mBulk="pool_S3781_plus", 
         chrID="SL4.0ch03", 
         chr=3,
         dpi=1200)
#OR customise default parameters
SNPindex_plot(vcf.list=vcf_list, 
         wtBulk="pool_S3781_minus", 
         mBulk="pool_S3781_plus", 
         variants="all",
         min.SNPindex=0.25, 
         max.SNPindex=0.8, 
         min.DP=60, 
         max.DP=250, 
         min.GQ=98,
         chrID="SL4.0ch03", 
         chr=3,
         windowSize=2000000, 
         windowStep=20000,
         filename="SNPindex_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.