read_STAR: Read STAR log files

View source: R/read_STAR.R

read_STARR Documentation

Read STAR log files

Description

Read STAR Log.final.out files and optionally reshape into wide format.

Usage

read_STAR(path = ".", pattern, reshape = FALSE)

Arguments

path

the path to STAR log files, the default corresponds to the working directory.

pattern

regular expression for file name matching, default .final.out

reshape

reshape percent mapping into wide format with samples in rows

Value

A tibble

Note

Reading output files requires a unique sample identifier in either the file name or parent directory

Author(s)

Chris Stubben

Examples

## Not run: 
 x <- read_STAR( pattern=".star.out$")
  reads <- c("Uniquely mapped",  "Mapped to multiple loci",
               "Mapped to too many loci", "Unmapped reads")
  y <- filter(x, stat %in% reads) %>% mutate( stat= factor(stat, levels=reads ))
         hchart(y, "bar", x=sample ,  y=value, group=stat ) %>%
            hc_plotOptions(bar = list(stacking = "normal")) %>%
             hc_colors( c('#437bb1', '#7cb5ec', '#f7a35c', '#b1084c') ) %>%
               hc_yAxis(reversedStacks = FALSE)
 read_STAR( pattern=".star.out$", reshape=TRUE)

## End(Not run)

HuntsmanCancerInstitute/hciR documentation built on Aug. 20, 2024, 12:22 a.m.