Most likely these functions just needs to be implemented for both
classes, at least that is what I suspect Patrick will answer.

So far you have listed
  as.character
  bi-directional conversion between the two classes (whihc may or may
not make sense)

You seem to be alluding to other methods not being implemented.  If
that is the case, you should just list all of them, that will make it
much easier to fix.

Kasper

On Wed, Aug 4, 2010 at 11:04 AM, Stefan Bentink
<[email protected]> wrote:
> Dear List Members,
> I'm using the function pairwiseAlignment from the Biostrings package.
> Depending on the
> input, the function returns either a PairwiseAlignedFixedSubject (if you
> align a single pattern
> with a single subject) or a PairwiseAlignedXStringSet (if you align multiple
> patterns with one
> or more subjects). There are some accessors which work on
> PairwiseAlignedFixedSubject
> objects but not on PairwiseAlignedXStringSet objects. To use those accessors
> on a single
> element from a PairwiseAlignedXStringSet, one would have to make it a
> PairwiseAlignedFixedSubject.
> Is there any way to do that? Subsetting doesn't work since it still returns
> a PairwiseAlignedXStringSet.
> Thanks,
> Stefan
>
>
> Code example:
> library(Biostrings)
> pattern1 <- c("ACGT")
> pattern2 <- c("CAGT")
> subject1 <- c("CAACGTGGAT")
> subject2 <- c("GAACAGTAAT")
>
> mat <- nucleotideSubstitutionMatrix(match = 1, mismatch = 0, baseOnly =
> FALSE)
> pwAligned <-
> pairwiseAlignment(c(pattern1,pattern2),c(subject1,subject2),substitutionMatrix=mat,type="local")
>
> ##This throws an error message:
> ##as.character(pwAligned[1])
> ##how to make pwAligned[1] a PairwiseAlignedFixedSubject?
>
>
>> sessionInfo()
> R version 2.12.0 Under development (unstable) (2010-04-07 r51635)
> x86_64-unknown-linux-gnu
>
> 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=C              LC_MESSAGES=en_US.UTF-8
> [7] LC_PAPER=en_US.UTF-8       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] BSgenome.Hsapiens.UCSC.hg19_1.3.16 BSgenome_1.17.6
> [3] Biostrings_2.17.26                 GenomicRanges_1.1.19
> [5] IRanges_1.7.15
>
> loaded via a namespace (and not attached):
> [1] Biobase_2.9.0 tools_2.12.0
>
>
>
>
> --
> Stefan Bentink
> Research Fellow
> Department of Biostatistics and
> Computational Biology
> Dana-Farber Cancer Institute
> 44 Binney St.
> Boston, MA 02115
>
> Tel: (+1) 617-582-7604
> Fax: (+1) 617-582-7760
>
> [email protected]
> http://www.hsph.harvard.edu/research/stefan-bentink/
>
> _______________________________________________
> Bioc-sig-sequencing mailing list
> [email protected]
> https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing
>

_______________________________________________
Bioc-sig-sequencing mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing

Reply via email to