Running dgenies from the command line - genotoul-bioinfo/dgenies GitHub Wiki

How to produce a plot from the command line

d-genies graphics are rendered by your WEB browser. One way to produce graphics from the command line is to us a tool automating GUI tests such as Robot Framework. In this example we will use pre-computed alignment and index files and only render the graphic from the online dgenies server. You can also adapt the scenario file to run the alignment on the server from online or locally stored files.

Install Robot Framework

You will need Robot Framework and Selenium Library.

pip install robotframework
pip install --upgrade robotframework-seleniumlibrary

You can test that Robot Framework is installed by checking the 'robot' executable presence in your path. If it is not, run rehash or open a new terminal.

You will also have to install the gecko driver is you use firefox as in the below presented example. To do this in Ubuntu.

apt install firefox-geckodriver

Running an alignment plot

Hereunder is an example file to run an alignment plot. To use it you will have to replace the email address and the three file locations.

*** Settings ***
Library           SeleniumLibrary

*** Test Cases ***
Demo
    Open Browser  http://dgenies.toulouse.inra.fr/run  firefox
    Input Text  email  [email protected]
    Click Element  tab2
    Select From List By Value  xpath=//select[@class="select-type-input alignfile"]  1
    Select From List By Value  xpath=//select[@class="select-type-input targetidx"]  1
    Select From List By Value  xpath=//select[@class="select-type-input queryidx"]  1
    Input Text  alignfile  http://genoweb.toulouse.inra.fr/~klopp/D-GENIES/HiC_scaffold_10.fasta.paf
    Input Text  targetidx  http://genoweb.toulouse.inra.fr/~klopp/D-GENIES/HiC_scaffold_10.idx
    Input Text  queryidx  http://genoweb.toulouse.inra.fr/~klopp/D-GENIES/HiC_scaffold_10.idx
    Click Button  submit
    sleep  5s
    Set Selenium Implicit Wait  5s
    Close Browser 

We will name the file example.rfw. You can now launch the process using

robot example.rfw
⚠️ **GitHub.com Fallback** ⚠️