-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added setReadsToHighlight() method to AlignmentTrack #1660
Conversation
Hi, sorry for bothering, since it has been a month, is there any problem with the changes? |
Thanks for this, sorry for the delay. I've been swamped with other urgent issues, I'll get to this when I can. |
OK looks good, but let's shorten the names a bit. Maybe just
I am going to independently rename the existing highlighted read variable to "selectedRead" or "clickedRead". |
I will merge and do the renaming. |
OK, thank you! |
* bug fix -- "view mate in split screen" did not account for chr name aliasing
OK I did some minor refactoring, including a subtle change for session saving. The shortened names are as suggested above. Also, I added a Updated example
Modified example config
|
That's great! Thank you so much! |
* bug fix -- "view mate in split screen" did not account for chr name aliasing
added setReadsToHighlight() method to AlignmentTrack
which can take an array of read names, then highlight the reads
for example :
const bamTracks = browser.findTracks('type', 'alignment')
bamTracks[0].alignmentTrack.setReadsToHighlight(["readName1", "readName2"])
bamTracks[0].updateViews()
also added
"highlightedReadsOutlineColor" (optional)
"readsToHighlight" (optional)
in Alignment Track options,
which allow configuration of the color of the highlighted reads,
and the configuration of the reads to highlight
for example:
{
type: "alignment",
format: "bam",
name: "NA12889",
url: "gs://genomics-public-data/platinum-genomes/bam/NA12878_S1.bam",
indexURL: "gs://genomics-public-data/platinum-genomes/bam/NA12878_S1.bam.bai",
sort: {
chr: "chr1",
position: 155155358
option": "BASE",
direction: "ASC"
},
highlightedReadsOutlineColor: "#0000ff",
readsToHighlight: ["readName1", "readName2"]
}