PlotInDels: Check for insertions and deletions in samples

View source: R/PlotInDels.R

PlotInDelsR Documentation

Check for insertions and deletions in samples

Description

Generates insertion/deletion plots for each evaluated sample from consensus haplotypes' sequences.

Usage

PlotInDels(machfiles, pm.res)

Arguments

machfiles

Vector including the paths of files generated by ConsHaplotypes function, with fna extension.

pm.res

The list returned by demultiplexPrimer, including fileTable and poolTable data frames.

Value

After execution, a file named GapsBarPlots.pdf will be saved in the reports folder, including the plots generated for all samples. In each plot, insertions are represented by red lines and deletions are represented by blue lines.

Note

This function is designed to be applied at the end of the quality assessment analysis and requires the previous execution of demultiplexPrimer and ConsHaplotypes functions from the same package.

Examples

## Execute demultiplexing by primer
splitDir <- "./splits"
splitfiles <- list.files(splitDir,recursive=TRUE,full.names=TRUE,include.dirs=TRUE)
pm.res <- demultiplexPrimer(splitfiles,samples,primers)

## Obtain consensus haplotypes (default parameters)
trimDir <- "./trim"
trimfiles <- list.files(trimDir,recursive=TRUE,full.names=TRUE,include.dirs=TRUE)
int.res <- ConsHaplotypes(trimfiles, pm.res, thr, min.seq.len)

## Apply function
mach.Dir <- "./MACH"
machfiles <- list.files(mach.Dir,recursive=TRUE, full.names=TRUE, include.dirs=TRUE)
PlotInDels(machfiles,pm.res)

aliafdz/QApckg documentation built on June 2, 2022, 10:29 a.m.