docs/documentation/index.md

Table of contents

Install HaplotypR

To install HaplotypR start R and first install ShortRead by typing:

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install("ShortRead")

Then install devtools by typing

install.packages("devtools")
install.packages("git2r")

and install Rswarm, Rvsearch and HaplotypR by typing

library(devtools)
library(git2r)
path <- file.path(tempfile(pattern="Rswarm-"), "Rswarm")
dir.create(path, recursive=TRUE)
repo <- clone("https://github.com/lerch-a/Rswarm.git", path)
clone("https://github.com/torognes/swarm.git", file.path(path, "src", "swarm"))
install(path)

path <- file.path(tempfile(pattern="Rvsearch-"), "Rvsearch")
dir.create(path, recursive=TRUE)
repo <- clone("https://github.com/lerch-a/Rvsearch.git", path)
clone("https://github.com/torognes/vsearch.git", file.path(path, "src", "vsearch"))
install(path)

detach("package:HaplotypR", unload=TRUE)
devtools::install_gith

Run HaplotypR on R command line

Workflow: Merge sequence read by fixed length Merge by overlapping sequence read

Run HaplotypR as Shiny App (currently dysfunctional)

Load HaplotypR package:

library("HaplotypR")

Copy Example Files to a working directory 'outputDir':

# Define output directory 
outputDir <- "~/exampleHaplotypR"  
# Create output directoy
if(!dir.exists(outputDir))
  dir.create(outputDir, recursive=T)
# Set working directory to output directory
setwd(outputDir)

# Copy example files to output directory
file.copy(from=system.file(package="HaplotypR", "extdata"), to=outputDir, recursive = T)
# List files example files in output directory
dir(file.path(outputDir, "extdata"))

The listed file can be used as example input files in the shiny app. The following files should be listed with the last R command: "barcode_Fwd.fasta", "barcode_Rev.fasta", "markerFile.txt", "readsF.fastq.gz", "readsR.fastq.gz", "sampleFile.txt".

Run HaplotypR GUI:

install.packages("shiny")
install.packages("shinyFiles")
runShinyApp()


lerch-a/HaplotypR documentation built on July 7, 2023, 7:58 a.m.