runHomoplasyFinderJarTool: Run HomoplasyFinder using Java jar file. Use if you can't get...

Description Usage Arguments Examples

View source: R/homoplasyFinder.R

Description

This function runs HomoplasyFinder as a command line jar tool to identify positions that are potentially homoplasious. Output(s) will appear in current working directory.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
runHomoplasyFinderJarTool(
  treeFile,
  fastaFile = NULL,
  presenceAbsenceFile = NULL,
  createFasta = 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 NULL

presenceAbsenceFile

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

createFasta

Flag to tell HomoplasyFinder whether to create FASTA file without any inconsistent positions. 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 tell 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
23
24
25
# 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")

# Run the HomoplasyFinder jar tool
runHomoplasyFinderJarTool(treeFile, fastaFile)

# Get the current date
date <- format(Sys.Date(), "%d-%m-%y")

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

# Read in the output table
resultsFile <- paste0(workingDirectory, "consistencyIndexReport_", date, ".txt")
results <- read.table(resultsFile, header=TRUE, sep="\t", stringsAsFactors=FALSE)

# Note the inconsistent positions
inconsistentPositions <- results[results$ConsistencyIndex < 1, "Position"]

# 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.