bam_strand_split: Split BAM with paired-end data into forward-strand and...

Description Usage Arguments Details Author(s) Examples

View source: R/bam_strand_split.R

Description

Given a list of BAM files, write two new BAM files for each, one containing forward-strand reads and the other reverse-strand reads.

Usage

1
2
bam_strand_split(inFiles, samtoolsPath = "~/anaconda2/bin/", outDest = "./",
  verbose = TRUE)

Arguments

inFiles

Character - BAM file list

samtoolsPath

String - path to samtools directory

outDest

String - Save new BAM files here

verbose

Logical - whether to print progress / results

Details

Requires samtools to be installed. For explanations of samtools flags (like "-f 0x10" and "-f 0x20" below), see this tool: http://broadinstitute.github.io/picard/explain-flags.html Note that "-f" means to include only things with these flags, and "-F" means to exclude anything with these flags. TIME:

Author(s)

Emma Myers

Examples

1
2
3
4
bamfiles = dir('/Volumes/CodingClub1/RNAseq/smallRNA/20180402_NXT/barcodes_new/Emma/filtered_and_indexed', pattern=".bam", full.names=TRUE)
bamfiles = bamfiles[ -which(regexpr(".bai", bamfiles) > 0) ]
bamfiles = bamfiles[c(4,5,6,1,2,3)]
bam_pair_split(bamfiles, outDest=resPath)

e-myers/rnaseq documentation built on May 20, 2019, 9:14 p.m.