find_amplicon: Find the location of an amplicon in an alignment

View source: R/amplicon_extract.R

find_ampliconR Documentation

Find the location of an amplicon in an alignment

Description

Find the location of an amplicon in an alignment

Usage

find_amplicon(
  aln,
  fwd_primer,
  rev_primer,
  trim = c("none", "retain", "remove"),
  mark = TRUE,
  fwd_char = "{",
  rev_char = "}",
  outfile = NULL
)

Arguments

aln

(connection, character string giving a file name in Stockholm format, DNAMultipleAlignment, RNAMultipleAlignment, DNAStringSet, RNAStringSet, StockholmMultipleAlignment, or character vector) DNA or RNA multiple alignment in which to search for an amplicon.

fwd_primer

(character string or DNAString) Forward primer sequence to define the target amplicon.

rev_primer

(character string or DNAString) Reverse primer sequence to define the target amplicon. Should be given from 5' to 3' in the primer; i.e. the reverse complement of the expected sequence in the alignment.

trim

(one of "none", "retain", or "remove") Choice of how to trim the alignment: if "none" then the alignment is not trimmed; if "retain" then the alignment is trimmed to the amplicon, including the primer sites; if "remove" then the alignment is trimmed to the amplicon and the primer sites are also removed.

mark

(logical flag) If TRUE (default) the primer sites are marked in the alignment RF line.

fwd_char

(single character) Character to use for marking the forward primer location in the RF line.

rev_char

(single character) Character to use for marking the reverse primer location in the RF line.

outfile

(character file name or connection) If non-NULL, an output file or connection to write the result to.

Value

StockholmMultipleAlignment object with modified RF line to mark the primer locations, or if outfile is given, NULL invisibly.


brendanf/LSUx documentation built on Oct. 10, 2024, 1:31 p.m.