load_BAM_files: Batch load BAM files

View source: R/Load_BAM_files.R

load_BAM_filesR Documentation

Batch load BAM files

Description

Batch load BAM files

Usage

load_BAM_files(
  bamfiles,
  mode,
  ngs_mode = "SE",
  skip_split_aln = TRUE,
  strand_mode = 2,
  filter_tlen = 500
)

Arguments

bamfiles

Character vector of BAM filenames.

mode

Character. Must be one of the following: "long_read", "tss", "pas" or "nascent".

ngs_mode

Character. Must be either "SE" or "PE".

skip_split_aln

Logical.

strand_mode

Integer. Must be either 1 or 2.

filter_tlen

Non-negative integer.

Value

A GRangesList object, if mode %in% c("long_reads", "tss", "pas")). A GRanges object, if mode == "nascent").

Details

The values of mode correspond to different NGS library preparation protocols:

  • "tss" for 5' tag sequencing (e.g. CAGE)

  • "pas" for 3' tag sequencing (e.g. PAT-seq)

  • "long_read" for full-length RNA sequencing (e.g. Direct RNA-seq by Oxford Nanopore)

  • "nascent" for nascent RNA sequencing (e.g. NET-seq of GRO-seq)

if mode == "long_reads", then each GRanges element in the returned GRangesList object corresponds to an individual long read (each genomic range represents an exonic subalignment). The replicate samples are pooled together;
If mode %in% c("tss", "pas"), then each GRanges element in the returned GRangesList corresponds to an individual sample (replicates are not pooled). The input short reads are truncated to the first sequenced base and converted to genomic coverage;
If mode == "nascent", then the whole reads are converted to genomic coverage, and the replicates are pooled.
The following arguments are used only mode == "nascent": ngs_mode describes if the sequencing was single-end or paired-end. Most often nascent RNA is sequenced in single-end mode, however some protocols (pNET-seq, plaNET-seq) require PE sequencing.
skip_split_aln set to TRUE requires to skip split alignments (because nascent RNA molecules usually are not expected to be spliced). However, if nascent RNA is sequenced by a 3rd generation platform and produces single-end long reads (e.g. chrRNA-seq), this argument has to be set to FALSE.
strand_mode depends on strand orientation of the library preparation protocol. This argument is used only if ngs_mode == "PE".
filter_tlen requires to skip paired-end alignments with template length (9th field in SAM/BAM files) below the value provided. Most nascent RNA-seq protocols include an RNA fragmentation step, thus unrealistically long inserts most probably originate either from sample contamination with mature RNA species, or from alignment errors.


Maxim-Ivanov/TranscriptomeReconstructoR documentation built on Oct. 3, 2023, 11:19 p.m.