[Gmod-ajax] [jbrowse plugin] inserting tracks at a specific postion in the view

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

[Gmod-ajax] [jbrowse plugin] inserting tracks at a specific postion in the view

matthiasm
Hi guys,

Thanks again for the work made on JBrowse, I like this Genome Browser more and more, as well as Dojo :) . I am currently writing a plugin for dynamic track displaying (dynamically hide/show tracks considering precalculated point-source signal positions, allowing to hide empty tracks to the user).

In my routine, I have no difficulty showing tracks -- i.e. adding track to the Genome View using the browser.showTracks(trackNames); . However, I would like to add them at a specific position and I see no proper way to do so.

The thing is : I would not like the default position to be after the last track in the view, but after a specific track (for example).  Could I create something like an anchor somewhere ? Do I have to work on a modified showTracks() function...?

Thanks by advance for any answer, idea, suggestion... 

Regards,

--
Matthias Monfort.

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: [jbrowse plugin] inserting tracks at a specific postion in the view

Colin
Hi Matthias
Sorry I haven't gotten back to your thread(s) sooner.

Anyways, you can specify the order of tracks using the showTracks function (which takes an array of track labels) by sorting them however you want. You can also use browser.view.visibleTrackNames() to get the list current visible tracks and then insert a new one at the specified location, and pass that to showTracks. I tested out this just briefly but I hope that helps.

-Colin


On Tue, Jun 17, 2014 at 2:26 AM, Matthias Monfort <[hidden email]> wrote:
Hi guys,

Thanks again for the work made on JBrowse, I like this Genome Browser more and more, as well as Dojo :) . I am currently writing a plugin for dynamic track displaying (dynamically hide/show tracks considering precalculated point-source signal positions, allowing to hide empty tracks to the user).

In my routine, I have no difficulty showing tracks -- i.e. adding track to the Genome View using the browser.showTracks(trackNames); . However, I would like to add them at a specific position and I see no proper way to do so.

The thing is : I would not like the default position to be after the last track in the view, but after a specific track (for example).  Could I create something like an anchor somewhere ? Do I have to work on a modified showTracks() function...?

Thanks by advance for any answer, idea, suggestion... 

Regards,

--
Matthias Monfort.

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax



------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: [jbrowse plugin] inserting tracks at a specific postion in the view

matthiasm
Hi Colin, 

Thanks for your answer. So if I understand well, I get the visible tracknames then insert my track to show at my specific position in the visible tracks array and pass it to the show track function. 
It could work, hope it's not reloading tracks that are already shown ?! I didn't try yet. Give some feedback when I have. 

Regards


2014-06-26 20:51 GMT+02:00 Colin <[hidden email]>:
Hi Matthias
Sorry I haven't gotten back to your thread(s) sooner.

Anyways, you can specify the order of tracks using the showTracks function (which takes an array of track labels) by sorting them however you want. You can also use browser.view.visibleTrackNames() to get the list current visible tracks and then insert a new one at the specified location, and pass that to showTracks. I tested out this just briefly but I hope that helps.

-Colin


On Tue, Jun 17, 2014 at 2:26 AM, Matthias Monfort <[hidden email]> wrote:
Hi guys,

Thanks again for the work made on JBrowse, I like this Genome Browser more and more, as well as Dojo :) . I am currently writing a plugin for dynamic track displaying (dynamically hide/show tracks considering precalculated point-source signal positions, allowing to hide empty tracks to the user).

In my routine, I have no difficulty showing tracks -- i.e. adding track to the Genome View using the browser.showTracks(trackNames); . However, I would like to add them at a specific position and I see no proper way to do so.

The thing is : I would not like the default position to be after the last track in the view, but after a specific track (for example).  Could I create something like an anchor somewhere ? Do I have to work on a modified showTracks() function...?

Thanks by advance for any answer, idea, suggestion... 

Regards,

--
Matthias Monfort.

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax





--
Matthias Monfort.

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: [jbrowse plugin] inserting tracks at a specific postion in the view

matthiasm
Hi Colin,

I come back to you because I tried what you advised me and got aware that I probably not explained my problem chosing the best words.
So the thing is that:

When I want to insert a track in the view at a specific position (i.e. between two tracks already displyed), I do not want to hide, sort then show. Which I believe would look like :
var my_array = getVisibleTracks();
view.hideTracks(my_array);
> add my track_to_insert at the specific position in my_array <
view.showTracks(my_array);

This would of course work as we expect... However I do not want to proceed like this, because this option would carelessly use ressources to reload the whole batch of sorted tracks. 
I tried the same piece of code, without previously hiding the visibleTracks, and pass a sorted array, with my track_to_insert at the specific position in the array, however from what I saw from the code, and testing, it seems to ignore tracks that are already displayed in the view, and add the others at the end (down in the view).

(I try to be as clear as possible, english is not my mother tongue thought :p)
Let's say for example that I have the reference sequence at the top, and a few other tracks under it. What I need is all the tracks I programatically add to the view to be placed  just after this reference sequence, and not in the last position, as a user could do with a drag&drop !

Please, tell me if I'm not clear at all and need to explain in other words ( or draw it :D )  
 
Best regards,


Matthias.


2014-07-02 9:41 GMT+02:00 Matthias Monfort <[hidden email]>:
Hi Colin, 

Thanks for your answer. So if I understand well, I get the visible tracknames then insert my track to show at my specific position in the visible tracks array and pass it to the show track function. 
It could work, hope it's not reloading tracks that are already shown ?! I didn't try yet. Give some feedback when I have. 

Regards


2014-06-26 20:51 GMT+02:00 Colin <[hidden email]>:

Hi Matthias
Sorry I haven't gotten back to your thread(s) sooner.

Anyways, you can specify the order of tracks using the showTracks function (which takes an array of track labels) by sorting them however you want. You can also use browser.view.visibleTrackNames() to get the list current visible tracks and then insert a new one at the specified location, and pass that to showTracks. I tested out this just briefly but I hope that helps.

-Colin


On Tue, Jun 17, 2014 at 2:26 AM, Matthias Monfort <[hidden email]> wrote:
Hi guys,

Thanks again for the work made on JBrowse, I like this Genome Browser more and more, as well as Dojo :) . I am currently writing a plugin for dynamic track displaying (dynamically hide/show tracks considering precalculated point-source signal positions, allowing to hide empty tracks to the user).

In my routine, I have no difficulty showing tracks -- i.e. adding track to the Genome View using the browser.showTracks(trackNames); . However, I would like to add them at a specific position and I see no proper way to do so.

The thing is : I would not like the default position to be after the last track in the view, but after a specific track (for example).  Could I create something like an anchor somewhere ? Do I have to work on a modified showTracks() function...?

Thanks by advance for any answer, idea, suggestion... 

Regards,

--
Matthias Monfort.

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax





--
Matthias Monfort.



--
Matthias Monfort.

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax