View source: R/import_fasta_sparse_nt.R
import_fasta_sparse_nt | R Documentation |
Imports a fasta file to a sparse matrix representing SNPs from the consensus
import_fasta_sparse_nt(fasta, prior = "baps", check.fasta = TRUE)
fasta |
path to the fasta file or an ape DNAbin object |
prior |
the type of prior to use. Can be one of 'baps' and 'mean' (default=baps) |
check.fasta |
whether to check the fasta file for issue. Slows things down a little but may be avoided for very large fasta files. |
A sparse matrix representation of the SNPs (different to the consensus sequence)
fasta <- system.file("extdata", "seqs.fa", package = "fastbaps") sparse.data <- import_fasta_sparse_nt(fasta) fasta <- ape::read.FASTA(fasta) sparse.data.ape <- import_fasta_sparse_nt(fasta)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.