Learn R Programming

CNEr (version 1.8.3)

lastal: lastal wrapper

Description

Wrapper function of lastal to do the pairwise whole genome alignment. This function doesn't work on Windows platform.

Usage

lastal(db, queryFn, outputFn=sub("\\.(fa|fasta)$", ".maf", paste(basename(db), basename(queryFn), sep = ","), ignore.case = TRUE), distance=c("far", "medium", "close"), binary="lastal", mc.cores=getOption("mc.cores", 2L), echoCommand=FALSE)

Arguments

db
character(1): the file name of target assembly's lastal index.
queryFn
character(1): the file name of query assembly fasta file.
outputFn
character(1): the file name of the output maf file.
distance
It can be "far", "medium" or "close". It decides the score matrix used in lastz aligner. See `?scoringMatrix` for more details.
binary
character(1): the name/filename of the binary lastal to call.
mc.cores
integer(1): the number of threads to use. By default, getOption("mc.cores", 2L).
echoCommand
boolean(1): When TRUE, only the command to run lastal is returned.

Value

A character(1) vector of ouput maf file names.

References

http://last.cbrc.jp/

See Also

lastz

Examples

Run this code
  ## Not run: 
#     assemblyDir <- "/Users/gtan/OneDrive/Project/CSC/CNEr/2bit"
#     ## Build the lastdb index
#     system2(command="lastdb", args=c("-c", file.path(assemblyDir, "danRer10"),
#                                      file.path(assemblyDir, "danRer10.fa")))
# 
#     ## Run lastal aligner
#     lastal(db=file.path(assemblyDir, "danRer10"),
#          queryFn=file.path(assemblyDir, "hg38.fa"),
#          outputFn=file.path(axtDir, "danRer10.hg38.maf"),
#          distance="far", binary="lastal", mc.cores=4L)
# 
#     ## maf to psl 
#     psls <- file.path(axtDir, "danRer10.hg38.psl")
#     system2(command="maf-convert", 
#             args=c("psl", file.path(axtDir, "danRer10.hg38.maf"),
#                    ">", psls))
#   ## End(Not run)

Run the code above in your browser using DataLab