repair: Re-order paired-end reads to place reads from the same pair...

Description Usage Arguments Details Value Author(s)

View source: R/repair.R

Description

Fast re-odering of paired-end reads using read names and mapping locations.

Usage

1
2
repair(inFiles,inFormat="BAM",outFiles=paste(inFiles,"repair",sep="."),
addDummy=TRUE,fullData=TRUE,compress=FALSE,nthreads=8)

Arguments

inFiles

a character vector giving names of input files. These files are typically location-sorted BAM files.

inFormat

a character string specifying format of input files. Supported formats include BAM and SAM.

outFiles

a character string giving names of output files. Re-ordered reads are saved to BAM-format files.

addDummy

logical indicating if a dummy read will be added to each singleton read which has a missing pair in the input. TRUE by default.

fullData

logical indicating if sequences and base-calling quality scores of reads will be included in the output. TRUE by default.

compress

logical indicating if compression should be turned on when generating BAM output. FALSE by default.

nthreads

a numeric value giving number of CPU threads. 8 by default.

Details

This function takes as input paired-end BAM or SAM files, re-orders reads to make reads from the same pair be adajacent to each other and then outputs the re-ordered reads into BAM files.

The function makes use of both read names and mapping information of reads (eg. mapping coordinates) to identify reads belonging to the same pair. This makes sure that all paired-end reads are correctly re-ordered, especially those multi-mapping read pairs that include more than one reported alignment in the input.

The BAM files produced by this function are comptible with featureCounts, meaning that no read re-ordering will be performed when providing these files to featureCounts.

Value

No value is produced but BAM files with re-ordered reads are written to the current working directory.

Author(s)

Wei Shi and Yang Liao


Rsubread documentation built on Nov. 9, 2018, 6 p.m.