run_minimap2: Run Minimap2

View source: R/run_minimap2.R

run_minimap2R Documentation

Run Minimap2

Description

Runs the Minimap2 tool, can be used for single end and paired end reads from Illumina, Oxford Nanopore and PacBio platforms

Usage

run_minimap2(
  input1 = NULL,
  input2 = NULL,
  index = NULL,
  genome = NULL,
  sample.name = NULL,
  out.dir = NULL,
  platform = NULL,
  parallel = FALSE,
  cores = 4,
  execute = TRUE,
  minimap2 = NULL,
  version = FALSE
)

Arguments

input1

input1 List of the paths to files containing to the forward reads, required

input2

input2 List of the paths to files containing to the reverse reads, required for paired end sequence data

index

Path to the reference genome minimap index

genome

Path to the reference genome fasta

sample.name

List of the sample names, required

out.dir

Name of the directory from the Minimap2 alignments.

platform

Names of the sequencing platform used for the reads, choose either "ONT", "PacBio" or "Illumina"

parallel

Run in parallel, default set to FALSE

cores

Number of cores/threads to use for parallel processing, default set to 4

execute

Whether to execute the commands or not, default set to TRUE

minimap2

Path to the Minimap2 program, required

version

Returns the version number

Value

A list with the Minimap2 commands

Examples

## Not run: 
  # Set the variables
  minimap2 <- "/software/minimap2-v2.21/minimap2"
  out.dir <- "minmap2_alignments"
  input1 <- c("sample1_R1.fq", "sample2_R1.fq")
  input2 <- c("sample1_R2.fq", "sample2_R2.fq")
  sample.names <- c("sample1", "sample2")
  genome <- "reference.fa"
  index <- "reference.mmi"

  # Get the version number
  run_minimap2(minimap2 = minimap2,
               version = TRUE)

  # Alignment commands
  minimap_cmds <- run_minimap2(input1 = input,
                               sample.name = sample.names,
                               index = index,
                               out.dir = out.dir,
                               platform = "ONT",
                               parallel = TRUE,
                               cores = 2,
                               execute = FALSE,
                               minimap2 = minimap2)

  minimap_cmds

## End(Not run)


GrahamHamilton/pipelineTools documentation built on Dec. 8, 2024, 3:53 p.m.