[Gmod-ajax] restrict zoom level

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

[Gmod-ajax] restrict zoom level

pparsons
Hi,

I am trying to find a way to restrict the zoom level--e.g., user cannot zoom finer than 1000 base-pairs. The motivation is to restrict access to some sensitive data that exists at that level.

With GBrowse this was easy--the zoom level could simply be set as a parameter in the configuration file. With JBrowse, however, since the rendering is done on the client side, it may not be so simple. The server would have to make sure not to send that data.

Is there any reasonable way to accomplish this?

Thanks.

------------------------------------------------------------------------------

_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: restrict zoom level

Colin
I think you could maybe just remove the remove the reference sequence track from JBrowse. Also,, if you were going to be very complete about it, you would have to go into the code and delete the "View details" dialog from the "_defaultConfig" functions because otherwise a user could open a custom track that gives them the sequence in the "View details" box.

-Colin


On Tue, Apr 1, 2014 at 9:45 AM, Paul Parsons <[hidden email]> wrote:
Hi,

I am trying to find a way to restrict the zoom level--e.g., user cannot zoom finer than 1000 base-pairs. The motivation is to restrict access to some sensitive data that exists at that level.

With GBrowse this was easy--the zoom level could simply be set as a parameter in the configuration file. With JBrowse, however, since the rendering is done on the client side, it may not be so simple. The server would have to make sure not to send that data.

Is there any reasonable way to accomplish this?

Thanks.

------------------------------------------------------------------------------

_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax



------------------------------------------------------------------------------

_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: restrict zoom level

Colin
It also occurred to me that perhaps there could be an option to make JBrowse _not_ display the underlying sequence in the dialog boxes as well. That would make that second part of my previous post easier.

-Colin


On Tue, Apr 1, 2014 at 3:18 PM, Colin <[hidden email]> wrote:
I think you could maybe just remove the remove the reference sequence track from JBrowse. Also,, if you were going to be very complete about it, you would have to go into the code and delete the "View details" dialog from the "_defaultConfig" functions because otherwise a user could open a custom track that gives them the sequence in the "View details" box.

-Colin


On Tue, Apr 1, 2014 at 9:45 AM, Paul Parsons <[hidden email]> wrote:
Hi,

I am trying to find a way to restrict the zoom level--e.g., user cannot zoom finer than 1000 base-pairs. The motivation is to restrict access to some sensitive data that exists at that level.

With GBrowse this was easy--the zoom level could simply be set as a parameter in the configuration file. With JBrowse, however, since the rendering is done on the client side, it may not be so simple. The server would have to make sure not to send that data.

Is there any reasonable way to accomplish this?

Thanks.

------------------------------------------------------------------------------

_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax




------------------------------------------------------------------------------

_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: restrict zoom level

pparsons
Thanks for the suggestions. I ended up adding a conditional statement before the openDialog function is called on a track.


More info:

The code is in BlockBased.js, which is in /src/JBrowse/View/Track/. In the _makeClickHandler function, there is a line that says track._openDialog( spec, evt, ctx ); Simply put a conditional that checks the name of the track before this line. Thus, the code should look something like this:

if (track.key != "topSecretTrack")
   track._openDialog( spec, evt, ctx );

(This is not really for top secret information, of course, as someone who knows what they are doing can still get access to the sequence.)


There is a related issue of restricting the zoom level. I've started a separate thread for that here.


On Tue, Apr 1, 2014 at 4:32 PM, Colin <[hidden email]> wrote:
It also occurred to me that perhaps there could be an option to make JBrowse _not_ display the underlying sequence in the dialog boxes as well. That would make that second part of my previous post easier.

-Colin



On Tue, Apr 1, 2014 at 3:18 PM, Colin <[hidden email]> wrote:
I think you could maybe just remove the remove the reference sequence track from JBrowse. Also,, if you were going to be very complete about it, you would have to go into the code and delete the "View details" dialog from the "_defaultConfig" functions because otherwise a user could open a custom track that gives them the sequence in the "View details" box.

-Colin


On Tue, Apr 1, 2014 at 9:45 AM, Paul Parsons <[hidden email]> wrote:
Hi,

I am trying to find a way to restrict the zoom level--e.g., user cannot zoom finer than 1000 base-pairs. The motivation is to restrict access to some sensitive data that exists at that level.

With GBrowse this was easy--the zoom level could simply be set as a parameter in the configuration file. With JBrowse, however, since the rendering is done on the client side, it may not be so simple. The server would have to make sure not to send that data.

Is there any reasonable way to accomplish this?

Thanks.

------------------------------------------------------------------------------

_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax





------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: restrict zoom level

Colin
What is the goal of restricting zoom level? Just looking at the other thread, it could be fairly complicated, and I'm just wondering if there's another way to achieve a goal...

-Colin


On Wed, Apr 23, 2014 at 12:05 PM, Paul Parsons <[hidden email]> wrote:
Thanks for the suggestions. I ended up adding a conditional statement before the openDialog function is called on a track.


More info:

The code is in BlockBased.js, which is in /src/JBrowse/View/Track/. In the _makeClickHandler function, there is a line that says track._openDialog( spec, evt, ctx ); Simply put a conditional that checks the name of the track before this line. Thus, the code should look something like this:

if (track.key != "topSecretTrack")
   track._openDialog( spec, evt, ctx );

(This is not really for top secret information, of course, as someone who knows what they are doing can still get access to the sequence.)


There is a related issue of restricting the zoom level. I've started a separate thread for that here.


On Tue, Apr 1, 2014 at 4:32 PM, Colin <[hidden email]> wrote:
It also occurred to me that perhaps there could be an option to make JBrowse _not_ display the underlying sequence in the dialog boxes as well. That would make that second part of my previous post easier.

-Colin



On Tue, Apr 1, 2014 at 3:18 PM, Colin <[hidden email]> wrote:
I think you could maybe just remove the remove the reference sequence track from JBrowse. Also,, if you were going to be very complete about it, you would have to go into the code and delete the "View details" dialog from the "_defaultConfig" functions because otherwise a user could open a custom track that gives them the sequence in the "View details" box.

-Colin


On Tue, Apr 1, 2014 at 9:45 AM, Paul Parsons <[hidden email]> wrote:
Hi,

I am trying to find a way to restrict the zoom level--e.g., user cannot zoom finer than 1000 base-pairs. The motivation is to restrict access to some sensitive data that exists at that level.

With GBrowse this was easy--the zoom level could simply be set as a parameter in the configuration file. With JBrowse, however, since the rendering is done on the client side, it may not be so simple. The server would have to make sure not to send that data.

Is there any reasonable way to accomplish this?

Thanks.

------------------------------------------------------------------------------

_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax





------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax



------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: restrict zoom level

pparsons
The idea is to not allow users to see detailed track information at a fine level. Some of the tracks are based on recent research and we don't want people to easily get specific sequence and location information (hence also suppressing the popup that shows the sequence).

I've actually managed to do this by modifying the code. I still don't exactly what's going on in this function, but through trial-and-error I've adjusted some of the variables such that the goal can be reached. It may not be a perfect solution, but so far it seems to work.

I've actually run into another problem: After cloning the repository and making my changes, I'm trying to build a release package. It seems that the full version builds fine, but the min version returns errors. The gist of it seems to be here--something to do with dojo:

starting executing global optimizations...

starting writing resources...

warn(201) Cycle detected in layer dependencies. module: dojo/dojo

{ [Error: spawn EMFILE] code: 'EMFILE', errno: 'EMFILE', syscall: 'spawn' }

Error: spawn EMFILE

    at errnoException (child_process.js:980:11)

    at ChildProcess.spawn (child_process.js:927:11)

    at exports.spawn (child_process.js:715:9)

    at /Library/WebServer/Documents/jbrowse/src/util/build/node/process.js:25:16

    at Object.release (/Library/WebServer/Documents/jbrowse/src/util/build/fileHandleThrottle.js:9:20)

    at ChildProcess.finish (/Library/WebServer/Documents/jbrowse/src/util/build/node/process.js:30:12)

    at ChildProcess.EventEmitter.emit (events.js:98:17)

    at Process.ChildProcess._handle.onexit (child_process.js:789:12)

make: *** [release-min] Error 255



On Thu, Apr 24, 2014 at 3:33 PM, Colin <[hidden email]> wrote:
What is the goal of restricting zoom level? Just looking at the other thread, it could be fairly complicated, and I'm just wondering if there's another way to achieve a goal...

-Colin


On Wed, Apr 23, 2014 at 12:05 PM, Paul Parsons <[hidden email]> wrote:
Thanks for the suggestions. I ended up adding a conditional statement before the openDialog function is called on a track.


More info:

The code is in BlockBased.js, which is in /src/JBrowse/View/Track/. In the _makeClickHandler function, there is a line that says track._openDialog( spec, evt, ctx ); Simply put a conditional that checks the name of the track before this line. Thus, the code should look something like this:

if (track.key != "topSecretTrack")
   track._openDialog( spec, evt, ctx );

(This is not really for top secret information, of course, as someone who knows what they are doing can still get access to the sequence.)


There is a related issue of restricting the zoom level. I've started a separate thread for that here.


On Tue, Apr 1, 2014 at 4:32 PM, Colin <[hidden email]> wrote:
It also occurred to me that perhaps there could be an option to make JBrowse _not_ display the underlying sequence in the dialog boxes as well. That would make that second part of my previous post easier.

-Colin



On Tue, Apr 1, 2014 at 3:18 PM, Colin <[hidden email]> wrote:
I think you could maybe just remove the remove the reference sequence track from JBrowse. Also,, if you were going to be very complete about it, you would have to go into the code and delete the "View details" dialog from the "_defaultConfig" functions because otherwise a user could open a custom track that gives them the sequence in the "View details" box.

-Colin


On Tue, Apr 1, 2014 at 9:45 AM, Paul Parsons <[hidden email]> wrote:
Hi,

I am trying to find a way to restrict the zoom level--e.g., user cannot zoom finer than 1000 base-pairs. The motivation is to restrict access to some sensitive data that exists at that level.

With GBrowse this was easy--the zoom level could simply be set as a parameter in the configuration file. With JBrowse, however, since the rendering is done on the client side, it may not be so simple. The server would have to make sure not to send that data.

Is there any reasonable way to accomplish this?

Thanks.

------------------------------------------------------------------------------

_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax





------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform

_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax




------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: restrict zoom level

Colin
This is related to how many processes can be spawned. The dojo thing is just a warning. Try using the command

ulimit -n 10000

see http://stackoverflow.com/questions/19146194/node-js-spawn-emfile

-Colin


On Sat, Apr 26, 2014 at 10:38 PM, Paul Parsons <[hidden email]> wrote:
The idea is to not allow users to see detailed track information at a fine level. Some of the tracks are based on recent research and we don't want people to easily get specific sequence and location information (hence also suppressing the popup that shows the sequence).

I've actually managed to do this by modifying the code. I still don't exactly what's going on in this function, but through trial-and-error I've adjusted some of the variables such that the goal can be reached. It may not be a perfect solution, but so far it seems to work.

I've actually run into another problem: After cloning the repository and making my changes, I'm trying to build a release package. It seems that the full version builds fine, but the min version returns errors. The gist of it seems to be here--something to do with dojo:

starting executing global optimizations...

starting writing resources...

warn(201) Cycle detected in layer dependencies. module: dojo/dojo

{ [Error: spawn EMFILE] code: 'EMFILE', errno: 'EMFILE', syscall: 'spawn' }

Error: spawn EMFILE

    at errnoException (child_process.js:980:11)

    at ChildProcess.spawn (child_process.js:927:11)

    at exports.spawn (child_process.js:715:9)

    at /Library/WebServer/Documents/jbrowse/src/util/build/node/process.js:25:16

    at Object.release (/Library/WebServer/Documents/jbrowse/src/util/build/fileHandleThrottle.js:9:20)

    at ChildProcess.finish (/Library/WebServer/Documents/jbrowse/src/util/build/node/process.js:30:12)

    at ChildProcess.EventEmitter.emit (events.js:98:17)

    at Process.ChildProcess._handle.onexit (child_process.js:789:12)

make: *** [release-min] Error 255



On Thu, Apr 24, 2014 at 3:33 PM, Colin <[hidden email]> wrote:
What is the goal of restricting zoom level? Just looking at the other thread, it could be fairly complicated, and I'm just wondering if there's another way to achieve a goal...

-Colin


On Wed, Apr 23, 2014 at 12:05 PM, Paul Parsons <[hidden email]> wrote:
Thanks for the suggestions. I ended up adding a conditional statement before the openDialog function is called on a track.


More info:

The code is in BlockBased.js, which is in /src/JBrowse/View/Track/. In the _makeClickHandler function, there is a line that says track._openDialog( spec, evt, ctx ); Simply put a conditional that checks the name of the track before this line. Thus, the code should look something like this:

if (track.key != "topSecretTrack")
   track._openDialog( spec, evt, ctx );

(This is not really for top secret information, of course, as someone who knows what they are doing can still get access to the sequence.)


There is a related issue of restricting the zoom level. I've started a separate thread for that here.


On Tue, Apr 1, 2014 at 4:32 PM, Colin <[hidden email]> wrote:
It also occurred to me that perhaps there could be an option to make JBrowse _not_ display the underlying sequence in the dialog boxes as well. That would make that second part of my previous post easier.

-Colin



On Tue, Apr 1, 2014 at 3:18 PM, Colin <[hidden email]> wrote:
I think you could maybe just remove the remove the reference sequence track from JBrowse. Also,, if you were going to be very complete about it, you would have to go into the code and delete the "View details" dialog from the "_defaultConfig" functions because otherwise a user could open a custom track that gives them the sequence in the "View details" box.

-Colin


On Tue, Apr 1, 2014 at 9:45 AM, Paul Parsons <[hidden email]> wrote:
Hi,

I am trying to find a way to restrict the zoom level--e.g., user cannot zoom finer than 1000 base-pairs. The motivation is to restrict access to some sensitive data that exists at that level.

With GBrowse this was easy--the zoom level could simply be set as a parameter in the configuration file. With JBrowse, however, since the rendering is done on the client side, it may not be so simple. The server would have to make sure not to send that data.

Is there any reasonable way to accomplish this?

Thanks.

------------------------------------------------------------------------------

_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax





------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform

_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax





------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: restrict zoom level

pparsons
Ah, that fixed it. Thanks.


------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax