infer_strandedness: Infer library strandedness

View source: R/utils.R

infer_strandednessR Documentation

Infer library strandedness

Description

Infer library strandedness

Usage

infer_strandedness(
  mapping_passed = NULL,
  bedpath = NULL,
  mappingdir = "results/04_read_mapping",
  sample_n = 4e+05
)

Arguments

mapping_passed

Metadata of samples that passed mapping QC. This can be obtained with mapping_pass.

bedpath

Path to BED file. GFF files can be converted to BED with gff2bed.

mappingdir

Directory where .bam files are stored.

sample_n

Numeric indicating the number of reads to sample from .bam file to infer strandedness. Default: 400000.

Value

A data frame with sample metadata as in mapping_passed, but with an additional column named 'Orientation' containing library strandedness for each BioProject.

Examples

data(sample_info)
mapping_passed <- sample_info[, -grep("Orientation", names(sample_info))]
bedpath <- system.file("extdata", "Homo_sapiens.GRCh37.75_subset.bed", 
                        package="bears")
mappingdir <- system.file("extdata", package = "bears")
if(rseqc_is_installed()) {
    s <- infer_strandedness(mapping_passed, bedpath, mappingdir)
}

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