Janet Young | 6 Oct 00:31 2012

issue with Views on PairwiseAlignmentsSingleSubject?

Hi there,

I've been using Biostrings' pairwiseAlignment for various things.  I just saw the Views feature described
in  help("PairwiseAlignments-class") and thought I'd give it a try, but it's not behaving as I'd expect in
cases where my subject sequence is one sequence selected from a DNAStringSet (rather than starting with a DNAString).

I think I found a bug (?) although I could also be misunderstanding what Views is supposed to do.  I updated to
the new Bioc devel and new R today, but had the same issue before updating.

I think the code chunk below will explain - does it make sense?

thanks very much,

Janet

library(Biostrings)

## example seqs (taken from ?pairwiseAlignment)
s1 <- DNAString("ACTTCACCAGCTCCCTGGCGGTAAGTTGATCAAAGGAAACGCAAAGTTTTCAAG")
s2 <- DNAString("GTTTCACTACTTCCTTTCGGGTAAGTAAATATATAAATATATAAAAATATAATTTTCATC")

### make some sequence sets
s1a <- DNAStringSet(c(as.character(s1),as.character(s1)))
s2a <- DNAStringSet(c(as.character(s2),as.character(s2)))

### align
myAln <- pairwiseAlignment ( s1a[1], s2a[1])

### I think the next line of code should give me a Views on s1a[1], but instead it gives me Views on all the seqs
of s1a concatenated together
Views(myAln)

##### and, an aside, it would seem intuitive to me that the code below should work to make a stringset of two
sequences, but instead it concetenates them to one sequence
s1b <- DNAStringSet(c(s1,s1))

#########
sessionInfo()

R Under development (unstable) (2012-10-03 r60868)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=C                 LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] Biostrings_2.27.1  IRanges_1.17.0     BiocGenerics_0.5.0

loaded via a namespace (and not attached):
[1] parallel_2.16.0 stats4_2.16.0  

_______________________________________________
Bioconductor mailing list
Bioconductor@...
https://stat.ethz.ch/mailman/listinfo/bioconductor
Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor


Gmane