amplican_print_reads: Pretty print forward and reverse reads aligned to each other.

Description Usage Arguments Value Examples

View source: R/helpers_rmd.R

Description

Usefull and needed for barcode reports.

Usage

1
amplican_print_reads(forward, reverse)

Arguments

forward

(character or vector of characters) Forward reads.

reverse

(character or vector of characters) Will be reverse complemented before alignment.

Value

Vector with alignments ready to be printed.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# load example data
unassigned_file <- system.file('extdata', 'results',  'alignments',
                               'unassigned_reads.csv', package = 'amplican')
unassigned <- data.table::setDF(data.table::fread(unassigned_file))
# sort by frequency
unassigned <- unassigned[order(unassigned$BarcodeFrequency,
                               decreasing = TRUE), ]
# print alignment of most frequent unassigned reads
cat(amplican_print_reads(unassigned[1, 'Forward'],
                         unassigned[1, 'Reverse']),
          sep = "\n")

amplican documentation built on Nov. 8, 2020, 11:10 p.m.