bwaMem: bwaMem

Description Usage Arguments Details Value Author(s) References Examples

Description

Wrapper function for bwa aligner with MEM algorithm.

Usage

1
2
  bwaMem(reads1, output, ref, opt = "", mc.cores = getThreads(), 
         binaryBWA = "bwa", binarySamtools = "samtools")

Arguments

reads1

The filename of first reads.

output

The filename of output bam files.

ref

The filename of bwa index prefix.

opt

Additional arguments passed to bwa-mem.

mc.cores

The number of threads to use. By default, we use a internal function NGS:::getThreads to decide.

binaryBWA

The name/filename of the binary "bwa" to call.

binarySamtools

The name/filename of the binary "samtools" to call.

Details

The BWA-MEM algorithm is suitable for aligning 70bp-1Mbp query sequences. The bam file will be sorted by coordinates. A idnex file will be created. A corresponding bigwig file will also be created.

Value

The filename of output bam file.

Author(s)

Ge Tan

References

http://bio-bwa.sourceforge.net/bwa.shtml

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  ## Not run: 
  ## This example is not tested because it requires external software "bwa" and
  ## reads/reference
    bwaMem(reads1=file.path(system.file("extdata", package="NGS"), "fastq",
                            "nanocage_ACAGAT_carp_embryo_R1.fastq"),
           output="nanocage_ACAGAT_carp_embryo.bam",
           ref=file.path(system.file("extdata", package="NGS"), "reference",
                         "BWAIndex", "genome.fa"),
           opt = "", mc.cores=4)
  
## End(Not run)

ge11232002/NGS documentation built on May 17, 2019, 12:13 a.m.