Learn R Programming

orthGS (version 0.1.6)

gapless_msa: Remove Gaps in a MSA

Description

Removes gaps in a given msa.

Usage

gapless_msa(msa, seqtype = 'AA', df = TRUE, sfile = FALSE)

Value

an alignment without gaps in form of matrix or a file containing such an alignment in fasta format.

Arguments

msa

input alignment.

seqtype

the nature of the sequences: 'DNA' or 'AA'.

df

logical. When TRUE msa should be a matrix, when FALSE msa should be a string giving the path to a fasta file containing the alignment.

sfile

if different to FALSE, then it should be a string indicating the path to save a fasta alignment file.

Details

It should be noted that this function does not carry out the alignment itself.

See Also

msa

Examples

Run this code
# Example 1:
aln <- matrix(c("A",  "P",  "G",  "W",  "-",  "-",
                "-",  "A",  "G",  "W",  "C",  "-",
                "-",  "-",  "C",  "W",  "G",  "A" ), nrow = 3, byrow =TRUE)
gapless_msa(aln)
# Example 2:
if (FALSE) gapless_msa(msa(sequences = c("APGW", "AGWC", "CWGA"),
                     ids = c("a", "b", "c"))$ali)

Run the code above in your browser using DataLab