Skip to content

Commit

Permalink
Add a chr alias for upper & lower case versions of chromosome names t…
Browse files Browse the repository at this point in the history
…o make search case insensitive, to an extent. Mixed case search terms must still be an exact match to the reference. Fixes #1904
  • Loading branch information
jrobinso committed Oct 25, 2024
1 parent aadf3cd commit f9a6c5a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/genome/chromAliasDefaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ class ChromAliasDefaults {
this.aliasRecordCache.set(a, rec)
}
}
this.aliasRecordCache.set(name.toLowerCase(), rec)
this.aliasRecordCache.set(name.toUpperCase(), rec)

}
}

Expand Down
3 changes: 3 additions & 0 deletions js/genome/chromAliasFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ class ChromAliasFile {
aliasRecord[key] = tokens[i]
this.aliasRecordCache.set(tokens[i], aliasRecord)
}

this.aliasRecordCache.set(chr.toLowerCase(), aliasRecord)
this.aliasRecordCache.set(chr.toUpperCase(), aliasRecord)
}
}
}
Expand Down

0 comments on commit f9a6c5a

Please sign in to comment.