Entering edit mode
I am exploring genomic sequences in interactive mode and I align them pairwise using the pairwiseAlignment
function from _Biostrings_, fed with sequences extracted by getSeq
from _BSgenome_. Here is a toy example below (no biological relevance).
Is there an easy way to display the original coordinates in the output ?
> pairwiseAlignment(
+ getSeq(Scerevisiae, GRanges("chrI:100-120")),
+ getSeq(Scerevisiae, GRanges("chrI:250-270"))
+ ) |> writePairwiseAlignments()
########################################
# Program: Biostrings (version 2.62.0), a Bioconductor package
# Rundate: Mon Feb 7 01:49:32 2022
########################################
#=======================================
#
# Aligned_sequences: 2
# 1: P1
# 2: S1
# Matrix: NA
# Gap_penalty: 14.0
# Extend_penalty: 4.0
#
# Length: 24
# Identity: 11/24 (45.8%)
# Similarity: NA/24 (NA%)
# Gaps: 6/24 (25.0%)
# Score: -73.49569
#
#
#=======================================
P1 1 GGCCA---ACCTGTCTCTCAACTT 21
| ||| ||| | | | |
S1 1 G-CCACTTACCCTACCATTACC-- 21
#---------------------------------------
#---------------------------------------
Instead of the above, I wish I had:
chrI 100 GGCCA---ACCTGTCTCTCAACTT 120
| ||| ||| | | | |
chrI 250 G-CCACTTACCCTACCATTACC-- 270
That would help my brain a lot !