readAllocate: Allocate ChIP-seq reads

Description Usage Arguments Details Value Author(s) Examples

View source: R/readAllocate.R

Description

Allocate ChIP-Seq multi-reads using prior information.

Usage

1
2
3
readAllocate(object, outfileLoc = "./", outputFormat, outputFilter, chipThres, chipFile,
bowtieDir, bowtieIndex, vBowtie = 2, mBowtie = 99, pBowtie = 8, bwaDir,
bwaIndex, nBWA = 2, oBWA = 1, tBWA = 8, mBWA = 99, csemDir, picardDir, fragL = 200)

Arguments

object

Default set as NULL. A "Prior" S4 object generated by priorGenerate. If object=NULL, then extra parameters, which are chipFile, bowtieIndex, bowtieDir, vBowtie, mBowtie, pBowtie (or bwaDir, bwaIndex, nBWA, oBWA, tBWA, mBWA), csemDir, fragL, need to be defined and CSEM will allocate-multi reads without using prior information (see details for more information).

outfileLoc

Directory to store processed files. Default set as "./".

outputFormat

Output Format. Default is NULL and will only return results in bam format. Possible values are tagAlign and bed

outputFilter

Boolean parameter indicating whether or not the aligned BAM file should be filtered by removing duplicates. If chipThres parameter is also provided, the aligned BAM file will also get rid of low quality scored alignments. Default value is TRUE.

chipThres

For thresholding reads. Default value is NULL and it will not filter the alignment results if users do not specify the threshold. It will select reads with scores higher than
chipThres (allocation probability*1000). Default set at NULL and will not threshold reads.

chipFile

Default set as NULL, only needed when object = NULL. ChIP-Seq files, in fastq format or sam format to save time if it is already aligned and includes multi-mapping reads. Aligned BAM format is also accepted for further filtering or format transformation.

bowtieDir

Default set as NULL, only needed when object = NULL. Directory where Bowtie was installed

bowtieIndex

Default set as NULL, only needed when object=NULL. Bowtie index, used in bowtie aligning. Users can specify the aligner, Bowtie or BWA, by specifying the index that will be used.

w

vBowtie

Default set as 2, only needed when object = NULL. Bowtie parameter. In -v mode, alignments may have no more than vBowtie mismatches, where v may be a number from 0 through 3 set using the -v option. Default value is 2.

mBowtie

Default set as 99, only needed when object = NULL. Bowtie parameter. -m parameter instructs bowtie to refrain from reporting any alignments for reads having more than mBowtie reportable alignments. Default value is 99 allowing multi-reads alignment.

pBowtie

Default set as 8, only needed when object = NULL. The -p option causes Bowtie to launch a specified number of parallel search threads. Each thread runs on a different processor/core and all threads find alignments in parallel. Default value is 8.

bwaDir

Default set as NULL, only needed when object = NULL. Directory where BWA was installed.

bwaIndex

Default set as NULL, only needed when object = NULL. BWA index used in BWA alignment. Users can specify the aligner, Bowtie or BWA, by specifying the index that will be used.

nBWA

Default set as 2, only needed when object = NULL. BWA paramter. In "bwa aln -n" mode, if it is an integer, it denotes the maximum edit distances including mismatch and gap open. Otherwise, it will be the fraction of missing alignments given 2% uniform base errr rate.

oBWA

Default set as 1, only neede when object = Null. BWA parameter. In "bwa aln -o" mode, it specifies the maximum number of gap open.

tBWA

Default set as 8, only needed when object = NULL. BWA parameter. In "bwa aln -t" mode, it is the number of threads in multi-threading mode.

mBWA

Default set as 99, only needed when object = NULL. BWA parameter. In "bwa samse -n", it restricts the maximum number of alignments to output for each read. If a read has more hits, the XA tag will not be written.

csemDir

Default set as NULL, only needed when object = NULL. Directory where CSEM was installed.

picardDir

Default set as NULL, the path to the picard jar (jar folder name included) is needed when aligned BAM file need filtering and users want to use picard to remove the duplicates. Otherwise, filtering can be done by samtools if csemDir is provided. If both csemDir and picardDir are provided, picard will be used.

fragL

Default set as 200, only needed when object = NULL. Fragment length.

Details

By default, it will allocate multi-reads using prior information from the object generated by
priorGenerate.

If prior information is not available (DNase and/or histone), do not run priorProcess and priorGenerate. Instead, set object as NULL and give the extra parameters: chipFile, bowtieDir, bowtieIndex, vBowtie, mBowtie, pBowtie, bwaDir, bwaIndex, nBWA, oBWA, tBWA, mBWA, csemDir, and fragL. CSEM will allocate the ChIP-seq.

Users can select from Bowtie and BWA to do the alignment by providing the corresponding index and leaving the other as default value NULL. If both indices are provided, the package will automatically use Bowtie to do the multi-mapping reads alignment.

plot(), summary(), names() and print() methods included. To obtain the alignment information from bowtie use summary().

Value

An updated "Prior" object is returned together with the aligned ChIP-seq output files.

chipSAM

Location of aligned ChIP-seq files in SAM format.

chipAllocate

Location of allocated ChIP-seq files in bam format.

chipFormat

Location of allocated ChIP-seq files in other format (tagAlign or bed).

outfileLoc

Directory where processed files are (given as an argument).

Or if no prior is built and allocate ChIP-seq by CSEM directly, a new "Prior" object will be created.

chipName

Name of ChIP-seq dataset(s).

chipNum

Number of ChIP-seq dataset(s).

chipAlign

ChIP-seq alignment summary feedback from bowtie.

chipSAM

Location of aligned ChIP-seq in SAM format.

chipAllocate

Location of the final allocated ChIP-seq output by Permseq in BAM format.

chipAlignFormat

Location of the final allocated ChIP-seq output by Permseq in other selected format (tagAlign or bed).

chrList

Chromsome list.

fragL

Fragment length.

bowtieInfo

List of bowtie information used: bowtieIndex, bowtieDir, vBowtie, mBowtie and pBowtie.

bwaInfo

List of BWA realted information: bwaDir, bwaIndex, nBWA, oBWA, tBWA, mBWA.

csemDir

Directory where CSEM was installed.

picardDir

Directory where PICARD jar file is saved. For incorporating multi-mapping reads, we do not recommend using picard to remove duplicates. You can leave this option empty so that samtools will be adopted to remove PCR duplicates.

outfileLoc

Directory to store output files.

Author(s)

Xin Zeng, M. Constanza Rojo-Alfaro, Ye Zheng.

Examples

1
2
3
4
## Not run: 
readAllocate(object, outfileLoc = "./", outputFormat = "tagAligne")

## End(Not run)

yezhengSTAT/permseq_0.3.0 documentation built on Aug. 17, 2017, 1:27 a.m.