inst/testScripts/bwa/11.bwa,index,level1.R

############################################################################
#
############################################################################
library("aroma.seq");

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Session information
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Assert that BWA is available
pathname <- findBWA();
printf("BWA executable: %s\n", pathname);

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Indexing a reference genome
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
path <- "annotationData/organisms/Lambda_phage";
pathnameFA <- file.path(path, "lambda_virus.fa");
pathnameFA <- Arguments$getReadablePathname(pathnameFA);
prefix <- bwaIndexPrefix(pathnameFA, method="bwtsw");
prefix <- Arguments$getWritablePathname(prefix) ## TAT addition; skip the mustNotExist=T
res <- systemBWA("index", a="is", p=prefix, pathnameFA, verbose=TRUE);
print(res);

files <- list.files(path=getParent(prefix));
print(files);


############################################################################
# HISTORY:
# 2012-09-24
# o Created.
############################################################################
HenrikBengtsson/aroma.seq documentation built on Feb. 15, 2021, 2:21 a.m.