createCompositeFile: Create composite Strand-seq file

View source: R/createCompositeFile.R

createCompositeFileR Documentation

Create composite Strand-seq file

Description

This function will move through BAM files in a folder, read in each individual file and go through each chromosome, determine if the chromosome is WW or CC based on WCcutoff, reverse complement all reads in the WW file, append to a new composite file for that chromosome, order the composite file of each chromosome based on position.

Usage

createCompositeFile(
  file.list,
  chromosomes = NULL,
  pairedEndReads = TRUE,
  pair2frgm = FALSE,
  min.mapq = 10,
  filtAlt = FALSE,
  WC.cutoff = 0.9,
  genoT = "fisher",
  background = 0.05
)

Arguments

file.list

A list of BAM files to process.

chromosomes

If only a subset of the chromosomes should be binned, specify them here.

pairedEndReads

Set to TRUE if you have paired-end reads in your file.

pair2frgm

Set to TRUE if every paired-end read should be merged into a single fragment.

min.mapq

Minimum mapping quality when importing from BAM files.

filtAlt

Set to TRUE if you want to filter out alternative alignments defined in 'XA' tag.

WC.cutoff

Percentage of WW or CC reads to consider chromosome being WW or CC

genoT

A method ('fisher' or 'binom') to genotype regions defined by a set of breakpoints.

background

The percent (e.g. 0.05 = 5%) of background reads allowed for WW or CC genotype calls.

Value

A GRanges-class object.

Author(s)

Ashley Sanders, David Porubsky


daewoooo/breakpointR documentation built on April 20, 2023, 4:13 p.m.