is_paired_end: Guess whether the samples are paired end

View source: R/transform_counts.R

is_paired_endR Documentation

Guess whether the samples are paired end

Description

Based on two alignment metrics, this function guesses the samples are paired end or not.

Usage

is_paired_end(
  x,
  avg_mapped_read_length = "recount_qc.star.average_mapped_length",
  avg_read_length = "recount_seq_qc.avg_len"
)

Arguments

x

Either a RangedSummarizedExperiment-class created by create_rse() or the sample metadata created by read_metadata().

avg_mapped_read_length

A character(1) specifying the metdata column name that contains the average fragment length after aligning. This is typically twice the average read length for paired-end reads.

avg_read_length

A character(1) specifying the metadata column name that contains the average read length prior to aligning.

Value

A logical() vector specifying whether each sample was likely paired-end or not.

See Also

Other count transformation functions: compute_read_counts(), compute_scale_factors(), transform_counts()

Examples


## Download the metadata for SRP009615, a single-end study
SRP009615_meta <- read_metadata(
    metadata_files = file_retrieve(
        locate_url(
            "SRP009615",
            "data_sources/sra",
        )
    )
)

## Are the samples paired end?
is_paired_end(SRP009615_meta)

## Download the metadata for DRP000499, a paired-end study
DRP000499_meta <- read_metadata(
    metadata_files = file_retrieve(
        locate_url(
            "DRP000499",
            "data_sources/sra",
        )
    )
)
is_paired_end(DRP000499_meta)

LieberInstitute/recount3 documentation built on May 4, 2024, 4:16 a.m.