AdjustAlignment(myXStringSet, perfectMatch = 5, misMatch = 0, gapLetter = -3, gapOpening = -0.1, gapExtension = 0, substitutionMatrix = NULL, shiftPenalty = -0.2, threshold = 0.1, weight = 1, processors = 1)AAStringSet, DNAStringSet, or RNAStringSet object of aligned sequences.
DNAStringSet or RNAStringSet inputs.
DNAStringSet or RNAStringSet inputs.
perfectMatch and misMatch penalties for DNA/RNA or ``MIQS'' for AA.  (See examples section below.)
NULL to automatically detect and use all available processors.
XStringSet of aligned sequences.
AdjustAlignment refines an existing alignment in a process similar to that which might be applied manually, but in a repeatable and must faster fashion.  This function shifts all of the gaps in an alignment to the left and right to find their optimal positioning.  The optimal position is defined as the position that maximizes the alignment ``score'', which is determined by the input parameters.  The resulting alignment will be similar to the input alignment but with many imperfections eliminated.  Note that the affine gap penalties here are different from the more flexible penalties used in AlignProfiles, and have been optimized independently.
AlignSeqs, AlignTranslation, StaggerAlignment
# a trivial example
aa <- AAStringSet(c("ARN-PK", "ARRP-K"))
aa
AdjustAlignment(aa)
# a real example
fas <- system.file("extdata", "Streptomyces_ITS_aligned.fas", package="DECIPHER")
dna <- readDNAStringSet(fas)
adjustedDNA <- AdjustAlignment(dna)
BrowseSeqs(adjustedDNA, highlight=1)
adjustedDNA==dna # most sequences were adjusted
Run the code above in your browser using DataLab