msc.depth | R Documentation |
The msc.depth function allows you to analyze the read depth of assembled minicircles using depth statistics generated by KOMICS. These statistics provide information such as the average, median, minimum, and maximum read depth per site for each minicircle contig. By standardizing the median read depths per minicircle contig to the median genome-wide read depths, you can estimate minicircle copy numbers.
msc.depth(depthstats, groups, HCN = NULL)
depthstats |
character vector containing the file names of the depth statistics generated by KOMICS. Each file should be in the format "sample_name.depthstats.txt" (e.g., sampleA.depthstats.txt, sampleB.depthstats.txt,...). |
groups |
a vector specifying the groups (e.g., species) to which the samples belong. |
HCN |
an optional numeric vector containing haploid copy numbers of the corresponding samples. This argument is set to null by default. |
all |
a table that merges the depth statistics of all samples. The table includes the average, median, minimum, and maximum per site read depth. |
plots |
a plot per sample that visualizes the median read depth distribution. |
medianRD |
a graph summarizing the median read depth distribution of all samples. |
CN |
a graph summarizing the copy number (if HCN is not null) of all samples. |
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')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.