ExtractAPA: Generate strand-specific two-dimensional coordinate files...

Description Usage Arguments Value Examples

View source: R/extractAPA.R

Description

Generate strand-specific two-dimensional coordinate files (prebed) of the BAM for clustering, and extract the cb list

Usage

1
2
3
4
5
6
7
8
9
ExtractAPA(
  in_bamfile,
  in_nSBfile,
  chr_info,
  out_dir,
  SA_cutoff = 5,
  min_median = 5,
  RCn = 1
)

Arguments

in_bamfile

A indexed BAM file, and the index files (.bai) must be in the same directory of the indexed BAM

in_nSBfile

A indexed soft-clipped BAM file, generated and indexed by samtools script

chr_info

A data.table that contains the chrinfo, can be generated by ExtractChrinfo()

out_dir

The directory where directories of two strands are created and the output files are stored

SA_cutoff

The minimum number of soft-clipped nts (default 5)

min_median

The minimum number of locations of the same umi when screening (default 5)

RCn

The cut-off value that decides the minimum weight of output when processing the in_bamfile (default 1)

Value

NULL, write the prebeds (sa, rc_end, rc_uni) in strand dirs under the out_dir and the cb list in out_dir.

Examples

1
ExtractAPA("test.bam", "test.s.bam", ExtractChrinfo("test.bam"), "output/")

HHengUG/hatpal2 documentation built on Dec. 17, 2021, 10:26 p.m.