Skip to content

Commit

Permalink
Fix chr name aliasing for genome.getSequence(). See issue #1475
Browse files Browse the repository at this point in the history
  • Loading branch information
jrobinso committed Mar 18, 2022
1 parent 526df2d commit 3ff7cfc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion js/feature/featureTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,14 +370,14 @@ class FeatureTrack extends TrackBase {
const f = features[0] // The shortest clicked feature

if ((f.end - f.start) <= 1000000) {

const list = [{
label: 'View feature sequence',
click: async () => {
let seq = await this.browser.genome.getSequence(f.chr, f.start, f.end)
if (f.strand === '-') {
seq = reverseComplementSequence(seq)
}
if (!seq) seq = "Unknown sequence"
Alert.presentAlert(seq)

}
Expand Down
1 change: 1 addition & 0 deletions js/genome/genome.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ class Genome {
}

async getSequence(chr, start, end) {
chr = this.getChromosomeName(chr)
return this.sequence.getSequence(chr, start, end)
}
}
Expand Down

0 comments on commit 3ff7cfc

Please sign in to comment.