setAllelePhase | R Documentation |
Parses the Primary and Secondary Sequences into Reference and Alternate Alleles
setAllelePhase(obj, refseq, trim5 = 0, trim3 = 0)
## S4 method for signature 'sangerseq'
setAllelePhase(obj, refseq, trim5 = 0, trim3 = 0)
obj |
|
refseq |
DNAString for character string of reference allele sequence. |
trim5 |
Number of bases to trim from the beginning of the sequence. |
trim3 |
Number of bases to trim from the end of the sequence. |
When multiple heterozygous basecalls are made, it is generally unclear which calls are in phase with each other. This function takes a reference sequence for one of the alleles to match the primary and secondary basecalls as reference or alternate allele.
A sangerseq
object with the Reference Allele in the
primarySeq slot and the Alternate Allele in the secondarySeq slot.
makeBaseCalls
, chromatogram
,
sangerseq
#Load Sequences
hetsangerseq <- readsangerseq(system.file("extdata",
"heterozygous.ab1",
package = "sangerseqR"))
homosangerseq <- readsangerseq(system.file("extdata",
"homozygous.scf",
package = "sangerseqR"))
#Make calls on heterozygous sequence to be parsed
hetcalls <- makeBaseCalls(hetsangerseq, ratio = 0.33)
#Need a reference sequence to set phase. Can get from annotation
#(e.g. Refseq) or another sanger sequencing file
ref <- subseq(primarySeq(homosangerseq, string = TRUE),
start = 30,
width = 500)
#Set the phase
hetseqalleles <- setAllelePhase(hetcalls, ref, trim5 = 50, trim3 = 100)
#Align to compare alleles
pa <- pairwiseAlignment(primarySeq(hetseqalleles),
secondarySeq(hetseqalleles),
type = "global-local")
writePairwiseAlignments(pa)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.