Description Usage Arguments Value Author(s) See Also Examples
this function is wrapper around the functions
'read.alignment'
,
'fasta2DNAbin'
and 'as.DNAbin'
.
The goal of this function is to load different types of sequences alignments,
i.e. protein, DNA, RNA, in different formats, i.e. fasta, phylip, mase,
clustal or msf and to convert it in the best suitable object class for
generating a distance matrix either with the 'seqnir' or the 'ape' package
1 | load_alignment(file, format, type = "protein")
|
file |
a character string specifying the path to the file containing a sequences alignment to be loaded to the global environment |
format |
a character string specifying the format of the file, i.e. fasta, phylip, mase, clustal or msf (no default) |
type |
a character string specifying type of sequences, i.e. protein, DNA, RNA (default: protein) |
if the input type is DNA or RNA this function returns an object of class DNAbin, if the input type is protein or unspecified (default) this function returns an object of class alignment (seqinr package)
gerardo esteban antonicelli
'retrieve_seqs'
'print_alignment'
'clean_alignment'
'make_tree'
'max_parsimony'
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | fastaRNA_load <- load_alignment(system.file('extdata',
'spike_align.fasta',
package='firstPackage'),
'fasta', 'RNA')
phylipRNA_load <- load_alignment(system.file('extdata',
'spike_align.phy',
package='firstPackage'),
'phylip', 'RNA')
phylipProt_load <- load_alignment(system.file('extdata',
'spike_prot_align.phy',
package='firstPackage'),
'phylip', 'protein')
clustalRNA_load <- load_alignment(system.file('extdata',
'spike_align.aln',
package='firstPackage'),
'clustal')
msfRNA_load <- load_alignment(system.file('extdata',
'orf1ab_align.msf',
package='firstPackage'),
'msf', 'RNA')
maseProtein_load <- load_alignment(system.file('extdata',
'prot.mase',
package='firstPackage'),
'mase')
data(fastaRNA); stopifnot(identical(fastaRNA, fastaRNA_load))
data(phylipRNA); stopifnot(identical(phylipRNA, phylipRNA_load))
data(clustalRNA); stopifnot(identical(clustalRNA, clustalRNA_load))
data(msfRNA); stopifnot(identical(msfRNA, msfRNA_load))
data(maseProtein); stopifnot(identical(maseProtein, maseProtein_load))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.