findTails: Find the positions with polyA tails genome/chromosome-wide

View source: R/scAPAtrap_funlib.R

findTailsR Documentation

Find the positions with polyA tails genome/chromosome-wide

Description

Find the precise positions with polyA tails genome-wide or on one given chromosome. Given chr, this function will traverse each chromosome and find the site through the A-rich at the end.

Usage

findTails(bamfile, chr = NULL, len = NULL, tailsfile = NULL, ...)

Arguments

bamfile

A BAM file which needs the index file (.bai).

chr

NULL or a character string. If NULL, search whole genome. Otherwise search tails on one chr.

len

NULL or the chromosome length of the given chr.

tailsfile

if not NULL then output to tailsfile, and return the tailsfile name.

...

Arguments passed to other methods and/or advanced arguments. Advanced arguments:

verbose

If 'TRUE' basic status updates will be printed along the way.

logf

If not NULL, then it should be a character string denoting a file name. Then message will be written to 'logf'.

Value

A data frame recording tail positions with chr/strand/coord/count; or tailsfile name (if tailsfile not NULL)

Examples

## Not run: 
findTails(bamfile, chr=1, len=1000000001)
findTails(bamfile, tailsfile='output/output.tails')

## End(Not run)

BMILAB/scAPAtrap documentation built on Oct. 13, 2023, 2:36 a.m.