remove_rrna: Remove rRNA sequences from .fastq files with SortMeRNA

View source: R/03_read_filtering.R

remove_rrnaR Documentation

Remove rRNA sequences from .fastq files with SortMeRNA

Description

Remove rRNA sequences from .fastq files with SortMeRNA

Usage

remove_rrna(
  sample_info,
  fastqdir = "results/01_FASTQ_files",
  filtdir = "results/03_filtered_FASTQ",
  rrna_db_dir = NULL,
  threads = 1
)

Arguments

sample_info

Data frame of sample metadata created with the function create_sample_info.

fastqdir

Path to the directory where .fastq files are stored.

filtdir

Path to the directory where filtered reads will be stored. Default: results/03_filtered_FASTQ.

rrna_db_dir

Path to directory containing reference rRNA database, which must be stored as FASTA files.

threads

Number of threads for SortMeRna. Default: 1.

Value

A 2-column data frame with run accessions in the first column and SortMeRNA running status in the second column, with "OK" if SortMeRNA ran successfully for each file and NA otherwise.

Examples

data(sample_info)
fastqdir <- system.file("extdata", package="bears")
filtdir <- tempdir()
rrna_db_dir <- tempdir()
rrna_file <- system.file("extdata", "bac_16s_subset.fa", package="bears")
file.copy(from = rrna_file, to = rrna_db_dir)
if(sortmerna_is_installed()) {
    remove_rrna(sample_info, fastqdir, filtdir, rrna_db_dir)
}

almeidasilvaf/bears documentation built on April 14, 2023, 7:06 p.m.