Learn R Programming

minimapR (version 0.0.1.3)

minimap2: 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 = "minimap2_out",
  a = TRUE,
  preset_string = "map-hifi",
  threads = 1,
  return = FALSE,
  verbose = TRUE,
  ...
)

Value

This function returns the line needed to add minimap2 to PATH

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

Examples

Run this code
if (FALSE) {
reference <- system.file("extdata/S288C_ref_genome.fasta.gz", package = "minimapR")
query_sequences <- system.file("extdata/yeast_sample_hifi.fastq.gz", package = "minimapR")
# Warning: not setting output_file_prefix will generate the output in the current working directory
bam_out <- minimap2(reference, 
 query_sequences, 
 threads = 4,
 preset_string = "map-hifi", 
 return = TRUE, 
 verbose = TRUE)
}

if (FALSE) {
reference <- system.file("extdata/GRCh38_chr1_130k.fa.gz", package = "minimapR")
query_sequences <- system.file("extdata/ont_hs_sample.fastq.gz", package = "minimapR")
# Warning: not setting output_file_prefix will generate the output in the current working directory
bam_out <- minimap2(reference, 
 query_sequences, 
 threads = 4,
 preset_string = "map-hifi",
 return = TRUE, 
 verbose = TRUE)
}

Run the code above in your browser using DataLab