is_paired_end: Guess whether the samples are paired end

Description Usage Arguments Value See Also Examples

View source: R/transform_counts.R

Description

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

Usage

1
2
3
4
5
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## 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)

recount3 documentation built on Feb. 13, 2021, 2 a.m.