Description Usage Arguments Value Examples
The msc.length function allows you to check the length of minicircle sequences based on one fasta file.
1 | msc.length(file, samples, groups)
|
file |
the name of the fasta file containing all minicircle sequences, e.g. all.minicircles.circ.fasta. |
samples |
a character vector containing the sample names. |
groups |
a vector, of equal length as samples, specifying to which group (e.g. subspecies) the samples belong to. |
length |
a numerical vector containing the length of minicircle sequences. |
plot |
a histogram visualizing the length frequency of minicircle sequences. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | require(ggplot2)
require(ggpubr)
### run function
bf <- msc.length(file = system.file("extdata", "all.minicircles.fasta", package="rKOMICS"),
samples = exData$samples, groups = exData$subspecies)
af <- msc.length(file = system.file("extdata", "all.minicircles.circ.fasta", package="rKOMICS"),
samples = exData$samples, groups = exData$subspecies)
length(which(bf$length<800))
length(which(bf$length>1400))
### visualize results
hist(af$length, breaks=50)
### alter plot
ggarrange(bf$plot + labs(caption = "Before filtering"),
af$plot + labs(caption = "After filtering"), nrow=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.