[Gmod-ajax] Jbrowse and headless browsers

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

[Gmod-ajax] Jbrowse and headless browsers

Keiran Raine
Hi,

Has anyone had any success using a headless browser to generate a screen grab?  I've attempted PhantomJS in the past with no success and there was brief discussion at the GMOD meeting earlier this year about this.

If anyone has managed this I'd be very interested to find out how.

Thanks,

Keiran Raine
Principal Bioinformatician
Cancer Genome Project
Wellcome Trust Sanger Institute

Tel:+44 (0)1223 834244 Ext: 7703
Office: H104


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: Jbrowse and headless browsers

Colin
I was getting blank screenshots on release versions of jbrowse using PhantomJS but when I switched to a debug version of JBrowse (the -dev or github branch) then it worked ok. Not sure why that is but maybe it can be fixed sometime.

Here's the script i used

var page = require('webpage').create();
page.viewportSize = {
  width: 1500,
  height: 700
};
page.open('http://myjbrowse/jbrowse/?tracks=yourtrackshere', function(status) {
    if(status=='success') {
        console.log('success');
        window.setTimeout(function () {
            page.render('jbrowse.png');
            phantom.exit();
        }, 1000);
    }  
});

-Colin


On Thu, Aug 28, 2014 at 10:35 AM, Keiran Raine <[hidden email]> wrote:
Hi,

Has anyone had any success using a headless browser to generate a screen grab?  I've attempted PhantomJS in the past with no success and there was brief discussion at the GMOD meeting earlier this year about this.

If anyone has managed this I'd be very interested to find out how.

Thanks,

Keiran Raine
Principal Bioinformatician
Cancer Genome Project
Wellcome Trust Sanger Institute

Tel:<a href="tel:%2B44%20%280%291223%20834244%C2%A0Ext%3A%207703" value="+441223834244" target="_blank">+44 (0)1223 834244 Ext: 7703
Office: H104


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.

------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax



------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: Jbrowse and headless browsers

Colin
Follow up: I found that if you make the following patch https://github.com/GMOD/jbrowse/issues/505 then you can use PhantomJS with the release version of jbrowse.

Interesting but not totally unexpected!

-Colin


On Thu, Aug 28, 2014 at 2:51 PM, Colin <[hidden email]> wrote:
I was getting blank screenshots on release versions of jbrowse using PhantomJS but when I switched to a debug version of JBrowse (the -dev or github branch) then it worked ok. Not sure why that is but maybe it can be fixed sometime.

Here's the script i used

var page = require('webpage').create();
page.viewportSize = {
  width: 1500,
  height: 700
};
page.open('http://myjbrowse/jbrowse/?tracks=yourtrackshere', function(status) {
    if(status=='success') {
        console.log('success');
        window.setTimeout(function () {
            page.render('jbrowse.png');
            phantom.exit();
        }, 1000);
    }  
});

-Colin


On Thu, Aug 28, 2014 at 10:35 AM, Keiran Raine <[hidden email]> wrote:
Hi,

Has anyone had any success using a headless browser to generate a screen grab?  I've attempted PhantomJS in the past with no success and there was brief discussion at the GMOD meeting earlier this year about this.

If anyone has managed this I'd be very interested to find out how.

Thanks,

Keiran Raine
Principal Bioinformatician
Cancer Genome Project
Wellcome Trust Sanger Institute

Tel:<a href="tel:%2B44%20%280%291223%20834244%C2%A0Ext%3A%207703" value="+441223834244" target="_blank">+44 (0)1223 834244 Ext: 7703
Office: H104


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.

------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax




------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: Jbrowse and headless browsers

Keiran Raine
Hi Colin,

That's great, I'd been trying PhantomJS with the same blank screen… our scientist will be very pleased with this :-)

Thanks,

Keiran Raine
Principal Bioinformatician
Cancer Genome Project
Wellcome Trust Sanger Institute

Tel:+44 (0)1223 834244 Ext: 7703
Office: H104

On 29 Aug 2014, at 08:48, Colin <[hidden email]> wrote:

Follow up: I found that if you make the following patch https://github.com/GMOD/jbrowse/issues/505 then you can use PhantomJS with the release version of jbrowse.

Interesting but not totally unexpected!

-Colin


On Thu, Aug 28, 2014 at 2:51 PM, Colin <[hidden email]> wrote:
I was getting blank screenshots on release versions of jbrowse using PhantomJS but when I switched to a debug version of JBrowse (the -dev or github branch) then it worked ok. Not sure why that is but maybe it can be fixed sometime.

Here's the script i used

var page = require('webpage').create();
page.viewportSize = {
  width: 1500,
  height: 700
};
page.open('http://myjbrowse/jbrowse/?tracks=yourtrackshere', function(status) {
    if(status=='success') {
        console.log('success');
        window.setTimeout(function () {
            page.render('jbrowse.png');
            phantom.exit();
        }, 1000);
    }  
});

-Colin


On Thu, Aug 28, 2014 at 10:35 AM, Keiran Raine <[hidden email]> wrote:
Hi,

Has anyone had any success using a headless browser to generate a screen grab?  I've attempted PhantomJS in the past with no success and there was brief discussion at the GMOD meeting earlier this year about this.

If anyone has managed this I'd be very interested to find out how.

Thanks,

Keiran Raine
Principal Bioinformatician
Cancer Genome Project
Wellcome Trust Sanger Institute

Tel:<a href="tel:%2B44%20%280%291223%20834244%C2%A0Ext%3A%207703" value="+441223834244" target="_blank">+44 (0)1223 834244 Ext: 7703
Office: H104


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.

------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax





-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax