Contents

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

1 Introduction

This is a package containing unCOVERApp, a shiny graphical application for clinical assessment of sequence coverage. unCOVERApp allows:

2 Installation and example

Install the latest version of uncoverappLib using BiocManager.

uncoverappLib requires:


install.packages("BiocManager")
BiocManager::install("uncoverappLib")
library(uncoverappLib)

Alternatively, it can be installed from GitHub using:


library(devtools)
install_github("Manuelaio/uncoverappLib")
library(uncoverappLib)

When users load uncoverappLib for the first time, the first thing to do is a download of annotation files. getAnnotationFiles() function allows to download the annotation files from Zenodo and parse it using uncoverappLib package. The function does not return an R object but store the annotation files in a cache (sorted.bed.gz and sorted.bed.gz.tbi) and show
the cache path. The local cache is managed by the BiocFileCache Bioconductor package. It is sufficient run the function getAnnotationFiles(verbose= TRUE) one time after installing uncoverappLib package as shown below. The preprocessing time can take few minutes, therefore during running vignette, users can provide vignette= TRUE as a parameter to download an example annotation files, as below.

library(uncoverappLib)
#> 
#> 
getAnnotationFiles(verbose= TRUE, vignette= TRUE)
#> your file already exists in cache
#> [1] "~/.cache/uncoverappLib/POLG.bed.gz.gz"     
#> [2] "~/.cache/uncoverappLib/POLG.bed.gz.tbi.tbi"

The preprocessing time can take few minutes.

3 Input file

All unCOVERApp functionalities are based on the availability of a BED-style formatted input file containing tab-separated specifications of genomic coordinates (chromosome, start position, end position), the coverage value, and the reference:alternate allele counts for each position. In the first page Preprocessing, users can prepare the input file by specifying the genes to be examined and the BAM file(s) to be inspected. Users should be able to provide:

gene.list<- system.file("extdata", "mygene.txt", package = "uncoverappLib")

Type the following command to load our example:


bam_example <- system.file("extdata", "example_POLG.bam", package = "uncoverappLib")

print(bam_example)
#> [1] "/tmp/RtmpE0oI6p/Rinst3129df370938c2/uncoverappLib/extdata/example_POLG.bam"

write.table(bam_example, file= "./bam.list", quote= FALSE, row.names = FALSE, 
            col.names = FALSE)

and launch run.uncoverapp(where="browser") command. After running run.uncoverapp(where="browser") the shiny app appears in your deafult browser. RStudio user can define where launching uncoverapp using where option:

If option where is not defined uncoverapp will launch with default option of R.

In the first page Preprocessing users can load mygene.txt in Load input file and bam.list in Load bam file(s) list. In general, a target bed can also be used instead of genes name selecting Target Bed option in Choose the type of your input file. Users should also specify the reference genome in Genome box and the chromosome notation of their BAM file(s) in Chromosome Notation box. In the BAM file, the number option refers to 1, 2, …, X,.M chromosome notation, while the chr option refers to chr1, chr2, … chrX, chrM chromosome notation. Users can specify the minimum mapping quality (MAPQ) value in box and minimum base quality (QUAL) value in box. Default values for both mapping and base qualities is 1. Users can download Statistical_Summary report to obtain a coverage metrics per genes (List of genes name) or per amplicons (Target Bed) according to uploaded input file. The report summarizes following information: mean, median, number of positions under 20x and percentage of position above 20x.

To run the example, choose chr chromosome notation, hg19 genome reference and leave minimum mapping and base qualities to the default settings, as shown in the following screenshot of the Preprocessing page:

Screenshot of Preprocessing page.

Figure 1: Screenshot of Preprocessing page

unCOVERApp input file generation fails if incorrect gene names are specified. An unrecognized gene name(s) table is displayed if such a case occurs. Below is a snippet of a the unCOVERApp input file generated as a result of the preprocessing step performed for the example


chr15   89859516        89859516        68      A:68
chr15   89859517        89859517        70      T:70
chr15   89859518        89859518        73      A:2;G:71
chr15   89859519        89859519        73      A:73
chr15   89859520        89859520        74      C:74
chr15   89859521        89859521        75      C:1;T:74

The preprocessing time depends on the size of the BAM file(s) and on the number of genes to investigate. In general, if many (e.g. > 50) genes are to be analyzed, we would recommend to use buildInput function
in R console before launching the app as shown in following example. This function also return a file with .txt estention containg statistical report of each genes/amplicon

library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union

gene.list<- system.file("extdata", "mygene.txt", package = "uncoverappLib")

bam_example <- system.file("extdata", "example_POLG.bam", package = "uncoverappLib")
cat(bam_example, file = "bam.list", sep = "\n")
temp_dir=tempdir()
buildInput(geneList= gene.list, genome= "hg19", type_bam= "chr", type_input = "genes",bamList= "bam.list", outDir= temp_dir)
#> Reading gene name started at:
#> 2022-05-01 18:09:55
#> 'select()' returned 1:1 mapping between keys and columns
#> 'select()' returned 1:many mapping between keys and columns
#> Write output file in directory /tmp/RtmpOzX2mB/output/Sun_May_01_2022.bed
#> 2022-05-01 18:10:00
#> Building input ended!... Now statistical analysis is starting...
#> 2022-05-01 18:10:00
#> Write output file in directory /tmp/RtmpOzX2mB/output/Sun_May_01_2022.txt
#> 2022-05-01 18:10:01
#> Statistical summary ended!Goodbye

Alternatively, other tools do a similar job and can be used to generate the unCOVERApp input file ( for instance: bedtools, samtools, gatk). In this case, users can load the file directly on Coverage Analysis page in Select input file box.

Once pre-processing is done, users can move to the Coverage Analysis page and push the load prepared input file button.

Screenshot of Coverage Analysis page.

Figure 2: Screenshot of Coverage Analysis page

To assess sequence coverage of the example, the following input parameters must be specified in the sidebar of the Coverage Analysis section

Other input sections, as Chromosome, Transcript ID, START genomic position, END genomic position and Region coordinate, are dynamically filled.

4 Output

unCOVERApp generates the following outputs :

Screenshot of output of UCSC gene table.

Figure 3: Screenshot of output of UCSC gene table