-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Welcome to the expressed-variant-reporting wiki!
SnpReportR is a program to generate clinical and research reports of patient-derived RNA-seq data, using annotated .vcf files.
SnpReportR requires an annotated .vcf file containing fields X, Y, and Z, as generated by upstream Collaborative Bioinformatics Pipeline programs X, Y, and Z. See the example annotated .vcf file, below.
[annotated .vcf example .jpeg here]
Currently supported VCF files are from version 2.5.0 of the CTAT Mutations Pipeline. There is a companion CTAT Mutations WDL workflow developed for the DNAnexus cloud platform for easily producing the necessary VCF files from RNA-seq.
Step 0.
Before running SnpReportR, follow the directions to authenticate usage for gmailr
package.
- configure
gmailR
package according to quickstart instructions
Step1.
1A. Define your sample name IDs for each VCF file and prepare the VCF data objects according to the script DATASET.R
in the data-raw
directory. This will produce the input files that are formatted properly for the analysis. You can look at example inputs that come with the R package: sample_names, counts_results, degs_results, and the VCF objects can be found using the code below.
snpReportR::sample_names[1]
vcf_obj <- get(snpReportR::sample_names[1])
str(vcf_obj)
head(snpReportR::counts_results)
1B. Run the snpReportR::setup()
function with the your sample file names.
library(snpReportR)
setup(sample_names=sample_names, counts_results="counts_results",degs_results="degs_results", directory="my_reports")
The set-up script will produce a new directory for the output reports, and it will include an R script with the name {DATE}_VCF_report_rendering.R
in the directory, where {DATE} in the date the setup()
was run. This allows for increased reproducibility in the pipeline.
The {DATE}_VCF_report_rendering.R
script must be edited to include the sender and recipients email addresses.
Step 2.
- open
{DATE}_VCF_report_rendering.R
to edit the following lines below.
#Email Config
sender <- '[email protected]'
recipients <- c('[email protected]','[email protected]','[email protected]') #should work for other email hosts need to test
Invoke the R script {DATE}_VCF_report_rendering.R
to run SnpReportR once you have authenticated the gmail account to use and defined the sample names associated with the VCF data objects (step1). Simply run the following command on the terminal (Mac OSX 10.16.7 tested).
Step 3.
- run the
{DATE}_VCF_report_rendering.R
script interactively in Rstudio by running the script on the console.
source("my_reports/{DATE}_VCF_report_rendering.R")
You can expect to render the Rmarkdown analysis HTML report, and have recipients receive the email with the HTML report as an attachment. Estimated time per VCF file is approximately 2 min. The VCF_report_rendering.R
script will be updated to have parallelization of rending and sending the emails using foreach
R package in the next version (To Do).