msc.depth: Check the read depth of assembled minicircles

Description Usage Arguments Value Examples

View source: R/msc.depth.R

Description

The depth statistics, generated with KOMICS, include average, median, minimum and maximum per site read depth of every minicircle contig that has been assembled. The msc.depth function allows you to summarize those statistics and to estimate minicircle copy numbers by standardizing median read depths per minicircle contig to the median genome-wide read depths.

Usage

1
msc.depth(depthstats, groups, HCN = NULL)

Arguments

depthstats

a character vector containing the file names of the depth statistics (output of KOMICS), e.g. sampleA.depthstats.txt, sampleB.depthstats.txt,... .

groups

a vector specifying to which groups (e.g. species) the samples belong to.

HCN

a numeric vector containing haploid copy numbers of the corresponding samples (optional, by default set to null).

Value

all

a table merging depth statistics of all samples. Depth statistics include the average, median, minimum and maximum per site read depth.

plots

a plot per sample visualizing the median read depth distribution.

medianRD

one graph summarizing the median read depth distribution of all samples.

CN

one graph summarizing the copy number (if HCN is not null) of all samples.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
require(ggpubr)
data(exData)

### run function

depth <- msc.depth(depthstats = system.file("extdata", 
                  exData$depthstats, package = "rKOMICS"), groups = exData$species,
                  HCN = exData$medGWD/2)

### visualize results 
hist(depth$all[,"MEDIAN.DEPTH"], breaks=100, 
    main="Global median depth distribution",xlab = (''))

### alter plot 
annotate_figure(depth$plots$CUM29A1, fig.lab = "CUM29A1", 
               fig.lab.pos = "bottom.right", fig.lab.face = 'italic')

rKOMICS documentation built on July 21, 2021, 5:07 p.m.