load_BAM_files: Batch load BAM files

Description Usage Arguments Value Details

View source: R/Load_BAM_files.R

Description

Batch load BAM files

Usage

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

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 Jan. 28, 2021, 11:47 a.m.