minimap2 {minimapR}R Documentation

minimap2

Description

This function is a wrapper for the command line tool minimap2. minimap2 is a long read sequencing alignment tool that is used to align long reads to a reference genome.

Usage

minimap2(
  reference,
  query_sequences,
  output_file_prefix,
  a = TRUE,
  preset_string = "map-hifi",
  threads = 1,
  return = FALSE,
  verbose = TRUE,
  ...
)

Arguments

reference

Reference genome to align the query sequences

query_sequences

Query sequences to align to the reference genome

output_file_prefix

Output file to save the alignment results

a

Logical value to use the preset string with the -a flag

preset_string

Preset string to use with the -x flag

threads

Number of threads to use

return

Logical value to return the alignment results

verbose

Logical value to print progress of the installation

...

Additional arguments to pass to minimap2

Value

This function returns the line needed to add minimap2 to PATH

Examples

## Not run: 
reference <- system.file("extdata/S288C_ref_genome.fasta", package = "minimapR")
query_sequences <- system.file("extdata/yeast_sample_hifi.fastq.gz", package = "minimapR")
out_dir <- system.file("extdata/test_out", package = "minimapR")
output_file_prefix <- paste0(out_dir, "/yeast_sample_hifi")
bam_out <- minimap2(reference, 
 query_sequences, 
 output_file_prefix,
 threads = 4,
 preset_string = "map-hifi", 
 return = TRUE, 
 verbose = TRUE)

## End(Not run)

## Not run: 
reference <- system.file("extdata/GRCh38_chr1_50m.fa", package = "minimapR")
query_sequences <- system.file("extdata/ont_hs_sample.fastq.gz", package = "minimapR")
out_dir <- system.file("extdata/test_out", package = "minimapR")
output_file_prefix <- paste0(out_dir, "/ont_hs_sample")
bam_out <- minimap2(reference, 
 query_sequences, 
 output_file_prefix,
 threads = 4,
 preset_string = "map-hifi",
 return = TRUE, 
 verbose = TRUE)

## End(Not run)


[Package minimapR version 0.0.1.0 Index]