pairwiseAlignment Improvements

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

pairwiseAlignment Improvements

Dario Strbenac-2
Good day,

The location of indels can be retrieved from a PairwiseAlignmentsSingleSubject object by using indel. Determining any difference between the two sequences, including substitutions, is not quick nor easy. I suppose that summary displays details of the mismatches, but the variable is of class PairwiseAlignmentsSingleSubjectSummary which has no documented accessors. So, the code to access the information looks bad.

summaryAlign@mismatchSummary[["subject"]]

    SubjectPosition Subject Pattern Count Probability
1               2       T       A     1           1
2               3       T       A     1           1

This could be improved with accessors for end users.

Also, instead of being a data.frame, this would be better stored as IRanges with associated metadata columns, accessible with mcols, so that methods like reduce could easily be used to look for contiguous blocks of differences.

Is there a reason why the show method for the summary only shows mismatches, even if there are indels contained in it? This seems arbitrary and also misleading, because it always gives a false impression that there are no indels.

Could the return data types consistently be made to be IRanges ? Sometimes it's IntegerList, sometimes it's IRanges. For example,

> A
  11-letter "DNAString" instance
seq: GAACGAGGACC
> B
  8-letter "DNAString" instance
seq: GGACGAGC
> alignment <- pairwiseAlignment(A, B, gapOpening = 0, gapExtension = 1, substitutionMatrix = substitutions)
> alignment@subject@mismatch
IntegerList of length 1
[[1]] 2
> alignment@subject@indel
IRangesList of length 1
[[1]]
IRanges of length 1
    start end width
[1]     8   9     2

Lastly, why are functions like insertion, deletion, and indel documented in Numeric Summary Methods? Unlike nchar and score, they are not numerical summaries of the data.

It'd be nice to see this part of Biostrings thoroughly refactored with more focus on UX.

--------------------------------------
Dario Strbenac
University of Sydney
Camperdown NSW 2050
Australia

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: pairwiseAlignment Improvements

Dario Strbenac-2
This has been re-sent to the Bioconductor Development mailing list and may be deleted from the archive if it is possible.
______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel