runHomoplasyFinderInJava: Run HomoplasyFinder using Java code

Description Usage Arguments Examples

View source: R/homoplasyFinder.R

Description

This function runs HomoplasyFinder (coded in Java) to identify positions that are potentially homoplasious

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
runHomoplasyFinderInJava(
  treeFile,
  fastaFile = "Not provided",
  presenceAbsenceFile = "Not provided",
  path,
  createFasta = TRUE,
  createReport = TRUE,
  createAnnotatedNewickTree = TRUE,
  includeConsistentSitesInReport = FALSE,
  verbose = TRUE,
  multithread = FALSE
)

Arguments

treeFile

The full path to the Newick formatted phylogenetic tree file

fastaFile

The full path to a FASTA formatted nucleotide sequence alignment. Defaults to "Not provided"

presenceAbsenceFile

The full path to a CSV table file reporting the presence/absence of INDELs. Defaults to "Not provided"

path

The full path to the directory where the output files will be created

createFasta

Flag to tell HomoplasyFinder whether to create FASTA file without any inconsistent positions. Defaults to TRUE

createReport

Flag to tell HomoplasyFinder whether to create report file detailing the inconsistent sites identified. Defaults to TRUE

createAnnotatedNewickTree

Flag to tell HomoplasyFinder whether to create annotated Newick formatted phylogenetic tree file. Defaults to TRUE

includeConsistentSitesInReport

Flag to tell HomoplasyFinder whether to include information about the consistent sites in the report. Defaults to TRUE

verbose

Flag to parse to HomoplasyFinder to request detailed information. Defaults to true

multithread

Flag to tell HomoplasyFinder to use multiple threads. Defaults to false

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Find the FASTA and tree files attached to package
fastaFile <- system.file("extdata", "example.fasta", package = "homoplasyFinder")
treeFile <- system.file("extdata", "example.tree", package = "homoplasyFinder")

# Get the current working directory
workingDirectory <- paste0(getwd(), "/")

# Run the HomoplasyFinder java code
inconsistentPositions <- runHomoplasyFinderInJava(treeFile, fastaFile, path=workingDirectory)

# Get the current date
date <- format(Sys.Date(), "%d-%m-%y")
 
# Read in the output table
resultsFile <- paste0(workingDirectory, "consistencyIndexReport_", date, ".txt")
results <- read.table(resultsFile, header=TRUE, sep="\t", stringsAsFactors=FALSE)

# Read in the annotated tree
tree <- readAnnotatedTree(workingDirectory)

# Plot the annotated tree
plotAnnotatedTree(tree, inconsistentPositions, fastaFile)

JosephCrispell/homoplasyFinder documentation built on June 7, 2021, 11 a.m.