Description Usage Arguments Value
Takes SNP informmation from multiple samples for a sequence fragment, and a reference sequence for that fragment. It produces and 'alignment' object that has one 'aligned' sequnece per sample where the SNPs have been replaced.
1 2 3 4 5 6 7 | gene_snv_aln(
snps,
seq,
missing_as = "major",
strand = "+",
keep_last_codon = TRUE
)
|
snps |
A tibble or data.frame. It must have columns 'site_id', 'sample', 'ref_pos', 'ref_allele', 'major_allele', and 'allele'. Column 'minor_allele' is not required at the moment but might be in the future. |
seq |
A character vector with the sequence of the fragment. |
missing_as |
How to treat sites in samples when there is no information in snps? Either 'N'(set all those sites to N), 'major' (use the major allele for that site), or 'ref' (use the reference allele). |
strand |
If strand is '-', then the sequence will be reverse complemented. |
keep_last_codon |
This is useful to remove stop codons when gene is a CDS. It will trim the last 3 sites from the alignment. |
An algnment object from seqinr
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.