[BioC] obtaining a complete global alignment via pairwiseAlignment

Robert K.Bradley [guest] guest at bioconductor.org
Sat Jun 15 04:57:30 CEST 2013


I'm interested in using the pairwiseAlignment function in Biostrings to perform simple alignments of short sequences.  I noticed that even the global alignment mode returns an alignment with gapped ends trimmed off.  For example:

> s1 = DNAString ("AAGGAA")
> s2 = DNAString ("GG")
> pairwiseAlignment (s1, s2, type = "global")
Global PairwiseAlignmentsSingleSubject (1 of 1)
pattern: [3] GG 
subject: [1] GG 
score: -32.03649 

Is it possible to obtain the complete alignment including the (possibly) gapped ends?  In this case, that would be:
For my purposes, having the complete gapped alignment is important.

My question seems related to a previous post:

Thank you in advance.

Best wishes,

Robert K. Bradley, Assistant Member
Fred Hutchinson Cancer Research Center


 -- output of sessionInfo(): 

> sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

[1] C

attached base packages:
[1] parallel  grid      grDevices utils     datasets  stats     graphics  methods   base     

other attached packages:
 [1] BSgenome.Hsapiens.UCSC.hg19_1.3.19         BSgenome_1.28.0                            org.Hs.eg.db_2.9.0                         beanplot_1.1                              
 [5] IlluminaHumanMethylation450kmanifest_0.4.0 goseq_1.12.0                               geneLenDataBase_0.99.11                    BiasedUrn_1.05                            
 [9] GO.db_2.9.0                                RSQLite_0.11.4                             DBI_0.2-7                                  fastcluster_1.1.11                        
[13] minfi_1.6.0                                reshape_0.8.4                              plyr_1.8                                   lattice_0.20-15                           
[17] FDb.InfiniumMethylation.hg19_1.0.1         rtracklayer_1.20.2                         Biostrings_2.28.0                          GenomicFeatures_1.12.2                    
[21] AnnotationDbi_1.22.6                       Biobase_2.20.0                             GenomicRanges_1.12.4                       IRanges_1.18.1                            
[25] VennDiagram_1.6.0                          RColorBrewer_1.0-5                         BiocGenerics_0.6.0                         gplots_2.11.0.1                           
[29] MASS_7.3-26                                KernSmooth_2.23-10                         caTools_1.14                               gdata_2.12.0.2                            
[33] gtools_2.7.1                              

loaded via a namespace (and not attached):
 [1] Matrix_1.0-12         R.methodsS3_1.4.2     RCurl_1.95-4.1        Rsamtools_1.12.3      XML_3.95-0.2          biomaRt_2.16.0        bitops_1.0-5          illuminaio_0.2.0     
 [9] limma_3.16.5          matrixStats_0.8.1     mclust_4.1            mgcv_1.7-24           multtest_2.16.0       nlme_3.1-109          nor1mix_1.1-4         preprocessCore_1.22.0
[17] siggenes_1.34.0       splines_3.0.1         stats4_3.0.1          survival_2.37-4       tools_3.0.1           zlibbioc_1.6.0       

Sent via the guest posting facility at bioconductor.org.

More information about the Bioconductor mailing list