star_align: Align reads to a reference genome using STAR

View source: R/04_read_mapping.R

star_alignR Documentation

Align reads to a reference genome using STAR

Description

Align reads to a reference genome using STAR

Usage

star_align(
  sample_info = NULL,
  filtdir = "results/03_filtered_FASTQ",
  qc_table = NULL,
  mappingdir = "results/04_read_mapping",
  gff_path = NULL,
  threads = 1
)

Arguments

sample_info

Data frame of sample metadata created with the function create_sample_info.

filtdir

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

qc_table

Data frame of fastp summary statistics as returned by summary_stats_fastp().

mappingdir

Path to the directory where read mapping files (.bam) will be stored.

gff_path

Path to the .gff/.gtf file with annotations.

threads

Number of threads for STAR aligner. Default: 1.

Value

A 2-column data frame with BioSample IDs in the first column and STAR running status in the second column, with "OK" if reads were mapped (.bam files were created) and NA if STAR failed to map reads.

Examples


data(sample_info)
qc_table <- summary_stats_fastp(system.file("extdata", package = "bears"))
genome_path <- system.file("extdata", "Hsapiens_GRCh37.75_subset.fa", 
                            package="bears")
gff_path <- system.file("extdata", "Homo_sapiens.GRCh37.75_subset.gtf", 
                         package="bears")
mappingdir <- tempdir()
filtdir <- system.file("extdata", package="bears")
if(star_is_installed()) {
    star_genome_index(genome_path, gff_path, mapping_dir, indexdir)
    star_align(sample_info, filtdir, qc_table, mappingdir, gff_path)
}


almeidasilvaf/gead documentation built on April 26, 2023, 3:47 p.m.