unalignedAAforAlignedAAPos: Computes the position in the unaligned sequence of a...

View source: R/iprSelectedPositions.R

unalignedAAforAlignedAAPosR Documentation

Computes the position in the unaligned sequence of a character indicated by sel.aa.

Description

Computes the position in the unaligned sequence of a character indicated by sel.aa.

Usage

unalignedAAforAlignedAAPos(gene, sel.aa, msa.fasta,
  gap.char = getOption("GeneFamilies.gap.char", "-"),
  gap.char.matching.fixed = getOption("GeneFamilies.gap.char.matching.fixed",
  TRUE))

Arguments

gene

The gene accession / ID as used in 'msa.fasta'

sel.aa

The index of the homologous amino acid subject to selection (integer coordinate)

msa.fasta

The result of seqinr::read.fasta(path_2_AAs_MSA.fasta, seqtype='AA', as.string=TRUE, strip.desc=TRUE).

gap.char

The character or regular expression used to identify non sequence characters in the aligned sequences. Default is getOption('GeneFamilies.gap.char', '-').

gap.char.matching.fixed

boolean indicating the value to pass to grepl and gsub argument fixed=. Set to TRUE if gap.char is literal and atomic. Default is getOption("GeneFamilies.gap.char.matching.fixed", TRUE).

Value

An integer; either NA if the position is a non sequence character, or the corresponding un-aligned position.


asishallab/GeneFamilies documentation built on May 22, 2023, 11:30 a.m.