bamtolist_rW: bamtolist_rW

View source: R/MODULE_1_CELP_BIAS.R

bamtolist_rWR Documentation

bamtolist_rW

Description

Function to convert bam files and an annotation file to a reads_list object.

Usage

bamtolist_rW(bamfolder, annotation, transcript_align = TRUE,
  name_samples = NULL, indel_threshold = 5, refseq_sep = NULL,
  granges = FALSE)

Arguments

bamfolder

Path to the folder containing ribo-seq bam files (one bam file per sample is expected).

annotation

Annotation data table produced by read_annotation listing transcript names and lengths of their 5'UTR, CDS and 3'UTR segments. It has five columns: transcript, l_tr, l_utr5, l_cds and l_utr3. Transcript names and segment lengths must correspond to the reference sequences to which the reads were mapped.

transcript_align

A logical argument indicating whether the reads were mapped to transcripts (TRUE) or geneome + gtf (FALSE). Default: TRUE.

indel_threshold

Maximum number of indels allowed per read. Default: 5.

...

...

Details

This function takes a folder of ribo-seq bam files (one per sample) and an annotation table as input, and produces a reads_list object.

Value

The output is a reads_list object each element of which is a data frame representing one sample. Each row in the data frame contains mapping information (transcript name and read start and end coordinates) for one read.

Examples

reads_list_LMCN <- bamtolist_rW("<folder.path>/RPF_sorted_indexed", annotation_human_cDNA)

goodarzilab/Ribolog documentation built on Oct. 7, 2022, 10:14 p.m.