View source: R/SaveHaplotypes.R
SaveHaplotypes | R Documentation |
Sorts and renames haplotypes by the number of mutations with respect to the dominant haplotype, and by abundance, and saves their sequences in a FASTA file.
SaveHaplotypes(flnm = "./SavedHaplotypes.fna", bseqs, nr, max.difs = 250)
flnm |
File path of the FASTA file that will be generated with haplotype sequences. |
bseqs |
Character object with the haplotype alignment. |
nr |
Vector with the haplotype counts. |
max.difs |
Maximum number of mismatches allowed with respect to the dominant one |
This function is similar to SortByMutations
function from QSutils
package but has new features. For example, in this case haplotypes with a huge number
of mutations (defined by max.difs
) with respect to the dominant one are discarted, and columns with all gaps
are eliminated. Also, the final sequences are saved in a FASTA file.
A list containing the following:
bseqs |
DNAStringSet or AAStringSet with the haplotype sequences. |
nr |
Vector of the haplotype counts. |
nm |
Vector of the number of differences of each haplotype with respect to the dominant haplotype. |
After execution, a FASTA file named as flnm
with the bseqs
element will be generated.
Alicia Aranda
SortByMutations
, ConsHaplotypes
, IntersectStrandHpls
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.