ngsLCA_deContam: Remove Contamination Taxa

View source: R/ngsLCA_deContam.R

ngsLCA_deContamR Documentation

Remove Contamination Taxa

Description

Generate a contamination list from blank control lca files, and subtract listed taxa from the combined taxa profile. Running this function will update the existing "complete_profile.txt".

Usage

ngsLCA_deContam(
  path,
  run = "run01",
  control_path,
  threshold.1_control = 2,
  threshold.2_control = 0,
  threshold.3_control = 5
)

Arguments

path

working directory, same to ngsLCA_profile.

run

name of the run, default is "run01".

control_path

path to the directory that contains all blank control lca files.

threshold.1_control

for generating contamination list, minimum reads number required for keeping a taxon in each blank control; default is 2.

threshold.2_control

for generating contamination list, minimum read percentage (to the total reads number of a blank control) required for keeping a taxon in each blank control, ranging from 0 to 1; default is 0.

threshold.3_control

for generating contamination list, minimum sum of reads across all blank controls required for keeping a taxon; default is 5.

Value

An updated complete_profile.txt (after removing contaminations).

Examples

ngsLCA_deContam(path=system.file("extdata","lca_files",package="ngsLCA"),
                run="run01",
                control_path=system.file("extdata","blank_controls",package="ngsLCA"),
                threshold.1_control=0,
                threshold.2_control=0,
                threshold.3_control=0)

## This will combine the blank control lca files within folder
## "extdata/blank_controls/" to generate a contamination list,
## and then filter this list using the 3 control thresholds
## supplied. The listed taxa will be subtracted from the combined
## taxa profile.



wyc661217/ngsLCA documentation built on June 2, 2025, 12:02 a.m.