fasta2pim | R Documentation |
This function first aligns a DNA fasta file with multiple sequences
using MUSCLE using msa::msaMuscle()
, where you can pass additional parameters thanks to ...
.
Then the pairwise sequence indentity is calculated using seqinr::dist.alignment()
.
Gaps in the alignment will be counted in the identity measure. The output
matrix is always ordered as the input fasta sequences.
fasta2pim(input_path, percentage_identity = TRUE, ...)
input_path |
A path to a DNA fasta file for which you want the pairwise sequence identity |
percentage_identity |
Logical, return the percentage of sequence identity.
Default |
... |
Other parameters passed to |
By default this function returns the percentage of sequence identity
from 0 to 100. By setting percentage_identity = FALSE
, the sqrt(1 - identity)
is returned. So if the identity between 2 sequences is 19% the squared root
of (1.0 - 0.19) i.e. 0.9.
A matrix with aligned DNA sequence identity
If you want to inspect the multiple sequence alignment used to calculate
the percentage of sequence identity you can write it to a fasta file
with align_DNA_fasta()
using the same MUSCLE parameters.
pim <- fasta2pim(input_path = dna_fasta_path)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.