parse_by_trim_status: Partition rows by trimming status.

View source: R/rnaseq_workflow_qc.R

parse_by_trim_statusR Documentation

Partition rows by trimming status.

Description

Partition rows of a data frame by trimming status using string matching on row names.

Usage

parse_by_trim_status(
  data,
  str_query = "trimmed",
  paired_end = F,
  r1_query = "R1",
  r2_query = "R2",
  unpaired_query = "unpaired"
)

Arguments

data

A data frame with rows corresponding to samples with names that differentiate different stages of sample processing from the RNA-seq data processing workflow (pre vs. post-Trimmomatic and "R1" and "R2" for read pairs in paired-end sequencing).

str_query

A string in the row names for data that distinguish pre-Trimmomatic from post-Trimmomatic records.

paired_end

A logical. Is the data from paired-end sequencing? If so, additional partitions will be made that separate the forward and reverse read pairs.

r1_query

A string in the row names for data that distinguish R1 reads from others in paired-end sequencing data.

r2_query

A string in the row names for data that distinguish R2 reads from others in paired-end sequencing data.

unpaired_query

A string in the row names for data that distinguish unpaired reads from preserved pairs in paired-end sequencing data.

Details

Parses a quality metric table that has data from multiple stages of the RNA-seq data processing workflow into separate tables for pre-Trimmomatic and post-Trimmomatic data. If the data are from paired-end sequencing, additional partitions can be made that separate post-Trimmomatic preserved read pairs from post-Trimmomatic unpaired reads, and read 1 (R1) and read 2 (R2). This function is intended for use with auto-generated QC metrics tables from the RNA-seq data processing workflow and tables exported from MultiQC HTML reports.

Value

For single-end sequencing data, a list with the elements untrimmed and trimmed to denote data frames with pre-Trimmomatic and post-Trimmomatic data respectively. For paired-end sequencing data, a list with the following elements:

  • untrimmed_r1: Data frame with pre-Trimmomatic R1 reads.

  • untrimmed_r2: Data frame with pre-Trimmomatic R2 reads.

  • trimmed_r1: Data frame with post-Trimmomatic R1 reads from preserved pairs.

  • trimmed_r2: Data frame with post-Trimmomatic R2 reads from preserved pairs.

  • unpaired_r1: Data frame with post-Trimmomatic R1 reads without a read pair.

  • unpaired_r2: Data frame with post-Trimmomatic R2 reads without a read pair.


bryancquach/omixjutsu documentation built on Jan. 29, 2023, 3:47 p.m.