filterFastqByBam: Filters FastQ files by bam

View source: R/ngsio.R

filterFastqByBamR Documentation

Filters FastQ files by bam

Description

Filters FastQ files by bam and writes them into new files.

Usage

filterFastqByBam(
  fqFiles,
  bamFile,
  fqOutFiles = NULL,
  doGzip = TRUE,
  keepUnmapped = TRUE,
  isProperPair = NA
)

removeReadsFromFastq(fqFiles, readIds, fqOutFiles = NULL, doGzip = TRUE)

Arguments

fqFiles

a character vector representing file paths to FastQ files.

bamFile

a character representing the bam file path.

fqOutFiles

an optional character vector representing file paths to the FastQ output files.

doGzip

a logical indicating whether to archive the output files in a gzip archive.

keepUnmapped

passed further to scanBamFlag().

isProperPair

passed further to scanBamFlag().

readIds

a character containing the read ID's from the bamFile.

Value

Returns the names of the filtered FastQ files.

Functions

  • removeReadsFromFastq: Removes reads from the FastQ files according to the bam filter.

Author(s)

Rehrauer, Hubert

Schmid, Peter

See Also

scanBam

ScanBamParam

Examples

bamFile <- system.file("extdata", "ex1.bam", package="Rsamtools", mustWork=TRUE)
file = system.file("extdata/yeast_10k/dataset.tsv", package="ezRun", mustWork = TRUE)
param = list()
param$dataRoot = system.file(package="ezRun", mustWork = TRUE)
input = EzDataset$new(file=file, dataRoot=param$dataRoot)
fqFiles = input$getFullPaths("Read1")
fqFiltered = filterFastqByBam(fqFiles, bamFile, doGzip = FALSE)

uzh/ezRun documentation built on Dec. 26, 2024, 9:53 a.m.