This repository was archived by the owner on Aug 19, 2023. It is now read-only.

Repository files navigation

A flexible bioinformatics search tool.

Quorum is a Rails 3.1 mountable engine that supports the following bioinformatics search tools.

Dependencies:

See the gem in action.

medplants.ncgr.org/quorum/jobs/new

Use the latest stable Rails release with Quorum.

geminstallquorum

After you install Quorum and add it to your Gemfile, run the generator.

railsgeneratequorum:install

The generator will create a directory in your application’s root path

quorum/

as well as the necessary config files to run and customize Quorum. You MUST customize “config/quorum_settings.yml” before using Quorum. See Remote Machine Setup below if you choose to execute Quorum remotely.

Migrate the database.

rake quorum:install:migrations
rake db:migrate

Follow these steps to safely upgrade Quorum.

  • Make a copy of “config/quorum_settings.yml”.

    cp config/quorum_settings.yml config/quorum_settings.yml.old

  • If you overrode Quorum’s styles and / or views, make a copy of the existing directories before upgrading.

    cp -R app/assets/stylesheets/quorum app/assets/stylesheets/quorum_oldcp -R app/views/quorum/jobs app/views/quorum/jobs_old

  • Run the install generator and answer “Yes” to all conflicts.

    rails generate quorum:install

  • Copy the old Search Database(s) to the newly generated “config/quorum_settings.yml” file.

  • Update the database migrations.

    rake quorum:install:migrations rake db:migrate

  • If applicable, override Quorum’s views, styles and images.

  • Update the remote machine(s).

Build your NCBI Blast+ database(s) using the rake task below.

rake quorum:blastdb:build

Arguments:

  • DIR= - path to {.tgz, .tar.gz, .tbz, .tar.bz2} files containing raw data. Separate multiple directories with a colon (:).

    DIR=/path/to/dir:/path/to/another/dir

  • TYPE= - type of Blast database to build {both, prot, nucl}. Defaults to both.

  • PROT_FILE_NAME= - name of the file containing protein data. Defaults to peptides.fa.

  • NUCL_FILE_NAME= - name of the file containing nucleotide data. Defaults to contigs.fa.

  • REBUILD_DB= - removes existing blast database(s) before building {true or false}. Defaults to false.

  • EMPTY= - skip makeblastdb and create necessary directories {true or false}. Defaults to false. Set this argument to true if you wish to create your own Blast database(s).

Example:

rake quorum:blastdb:build DIR=/path/to/dir:/path/to/another/dir TYPE=nucl \
NUCL_FILE_NAME=my_contigs.fa REBUILD_DB=true

Empty example:

rake quorum:blastdb:build EMPTY=true

For a full list of supported arguments.

rake-D

Don’t forget to update “config/quorum_settings.yml” with your newly created database(s).

Quorum provides a link to download a Blast hit sequence in the detailed report. For this process to work smoothly, the sequence identifier MUST be unique across ALL Blast databases.

Example: “example_blast_database/contigs.fa”

>my_unique_sequence_identifier_201201201327077953
ATGC...

“another_example_blast_database/contigs.fa”

>my_unique_sequence_identifier_201201201327078017
CGTA...

If the sequence identifiers are not unique across all Blast databases and you wish to remove the link to download a Blast hit sequence, follow the steps below.

  • Override Quorum’s views (see Customize Quorum below)

  • Comment out or remove the lines below in “app/views/quorum/jobs/templates/_blast_detailed_report_template.html.erb”

    <p class="small">
    <a id="download_sequence_{{= id }}"
    onclick="downloadSequence(<%= @jobs.id %>, {{= id }}, '{{= algo }}', this)">
    Download Sequence
    </a>
    </p>

Follow the steps below to execute Quorum remotely via Net::SSH.

  • Ensure your ActiveRecord Database adapter in “config/database.yml” is set to any supported adapter other than sqlite3.

  • Ensure your database host is set and accessible via the remote machine(s).

  • Ensure you have supplied the necessary information in “config/quorum_settings.yml” to execute Quorum remotely.

    blast:

    remote: true
    ssh_host: remote.machine.org
    ssh_user: remote_user

Net::SSH.start() optional params (net-ssh.github.com/ssh/v2/api/index.html)

ssh_options:
password: "secret"
port: 8888
  • Tar and compress quorum.

    tar -czvf quorum.tar.gz quorum/

  • Copy the newly created tarball to the remote machine.

    scp quorum.tar.gz <username>@<host>:/path/to/install

  • Expand the tarball on the remote machine.

    ssh <username>@<host>

    tar -xzvf quorum.tar.gz

  • Ensure Quorum script dependencies are added to the remote machine’s PATH. If the remote machine doesn’t have a .bashrc file, create one.

    touch /path/to/.bashrc

and add script dependencies to PATH.

echo "export PATH=/path/to/dependencies:$PATH" >> /path/to/.bashrc

To override Quorum’s default views, run the generator.

railsgeneratequorum:views

A copy of Quorum’s layouts and views can be found in your application under “app/views/layouts/quorum/” “app/views/quorum/”.

To override Quorum’s default styles, run the generator.

railsgeneratequorum:styles

A copy of Quorum’s styles can be found in your application under “app/assets/stylesheets/quorum/”. If your application has existing styles, it’s a good idea to remove

*= require_tree .

in “app/assets/stylesheets/application.css” and require your stylesheets individually.

To override Quorum’s default images, run the generator.

railsgeneratequorum:images

A copy of Quorum’s images can be found in your application under “app/assets/images/quorum/”.

Don’t like Quorum’s jQuery UI theme? Override it!

  • Override Quorum’s styles and images.

  • Roll your own jQuery UI theme. jqueryui.com/themeroller

  • Replace Quorum’s theme in “app/assets/{stylesheets:images}/quorum” with your own.

Override Quorum’s views and comment out any unwanted algorithms in “app/views/quorum/jobs/new.html.erb” and “app/views/quorum/jobs/show.html.erb”.

For example:

Remove Blastp in “app/views/quorum/jobs/new.html.erb”

<%# Search Algorithms %>
<%# Comment out an algorithm below to remove it from the form. %>
<%# blastn %>
<%= render :partial => "quorum/jobs/form/blastn_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# blastx %>
<%= render :partial => "quorum/jobs/form/blastx_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# tblastn %>
<%= render :partial => "quorum/jobs/form/tblastn_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# blastp %>
<% render :partial => "quorum/jobs/form/blastp_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# End Search Algorithms %>

Remove Blastp in “app/views/quorum/jobs/show.html.erb”

<div id="tabs">
<ul>
<li><a href="#tabs-1">Blastn</a></li>
<li><a href="#tabs-2">Blastx</a></li>
<li><a href="#tabs-3">Tblastn</a></li>
<%#
<li><a href="#tabs-4">Blastp</a></li>
%>
</ul>
<%# Search results per algorithm %>
<div id="tabs-1">
<h2>Blastn</h2>
<div id="blastn-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
<div id="tabs-2">
<h2>Blastx</h2>
<div id="blastx-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
<div id="tabs-3">
<h2>Tblastn</h2>
<div id="tblastn-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
<!--
<div id="tabs-4">
<h2>Blastp</h2>
<div id="blastp-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
-->
</div>

Override Quorum’s views and specify your own JavaScript callback function!

See “app/views/quorum/show.html.erb” for more details.

For an example using d3.js (github.com/mbostock/d3) see: github.com/ncgr/lis_sequence_search

For detailed Redis installation instructions, follow the links below.

Quorum provides a simple Rails environment rake task for spawning Resque workers. To customize Resque workers by adding monitoring etc., follow the link below.

Quorum mounts Resque’s web interface by default via

mountResque::Server.new, :at=>"/quorum/resque"

in “config/routes.rb”. The line above is fine for development, however, in production it’s best to grant authenticated users access to “/quorum/resque”.

HTTP Basic Example: “config/initializers/resque_http_auth.rb”

Resque::Server.use(Rack::Auth::Basic) do|user, password|user=="resque"password=="secret"end

Devise Example: “config/routes.rb”

authenticate:userdomountResque::Server.new, :at=>"/quorum/resque"end

Devise plus Declarative Authorization Example: “config/routes.rb”

# Only superusers can access Resque's web interface.resque_constraint = lambdado|request|request.env["warden"].authenticate?&&request.env["warden"].user.role_symbols.include?(:superuser)
endconstraintsresque_constraintdomountResque::Server.new, :at=>"/quorum/resque"end

To customize Quorum flash messages, edit “config/locales/quorum.en.yml”.

github.com/ncgr/quorum/issues

  • Fork Quorum

  • Create a topic branch git checkout -b my_branch

  • Push to your branch git push origin my_branch

  • Create a pull request from your branch

  • Find your name added to the README under Contributors

  • Add GFF3 annotations to detailed Blast reports

  • Add link to download multiple Blast hit sequences in detailed report

  • Support Hmmer3

MIT License. Copyright NCGR ncgr.org

About

A flexible bioinformatics search tool.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content
This repository was archived by the owner on Aug 19, 2023. It is now read-only.

Repository files navigation

A flexible bioinformatics search tool.

Quorum is a Rails 3.1 mountable engine that supports the following bioinformatics search tools.

Dependencies:

See the gem in action.

medplants.ncgr.org/quorum/jobs/new

Use the latest stable Rails release with Quorum.

geminstallquorum

After you install Quorum and add it to your Gemfile, run the generator.

railsgeneratequorum:install

The generator will create a directory in your application’s root path

quorum/

as well as the necessary config files to run and customize Quorum. You MUST customize “config/quorum_settings.yml” before using Quorum. See Remote Machine Setup below if you choose to execute Quorum remotely.

Migrate the database.

rake quorum:install:migrations
rake db:migrate

Follow these steps to safely upgrade Quorum.

  • Make a copy of “config/quorum_settings.yml”.

    cp config/quorum_settings.yml config/quorum_settings.yml.old

  • If you overrode Quorum’s styles and / or views, make a copy of the existing directories before upgrading.

    cp -R app/assets/stylesheets/quorum app/assets/stylesheets/quorum_oldcp -R app/views/quorum/jobs app/views/quorum/jobs_old

  • Run the install generator and answer “Yes” to all conflicts.

    rails generate quorum:install

  • Copy the old Search Database(s) to the newly generated “config/quorum_settings.yml” file.

  • Update the database migrations.

    rake quorum:install:migrations rake db:migrate

  • If applicable, override Quorum’s views, styles and images.

  • Update the remote machine(s).

Build your NCBI Blast+ database(s) using the rake task below.

rake quorum:blastdb:build

Arguments:

  • DIR= - path to {.tgz, .tar.gz, .tbz, .tar.bz2} files containing raw data. Separate multiple directories with a colon (:).

    DIR=/path/to/dir:/path/to/another/dir

  • TYPE= - type of Blast database to build {both, prot, nucl}. Defaults to both.

  • PROT_FILE_NAME= - name of the file containing protein data. Defaults to peptides.fa.

  • NUCL_FILE_NAME= - name of the file containing nucleotide data. Defaults to contigs.fa.

  • REBUILD_DB= - removes existing blast database(s) before building {true or false}. Defaults to false.

  • EMPTY= - skip makeblastdb and create necessary directories {true or false}. Defaults to false. Set this argument to true if you wish to create your own Blast database(s).

Example:

rake quorum:blastdb:build DIR=/path/to/dir:/path/to/another/dir TYPE=nucl \
NUCL_FILE_NAME=my_contigs.fa REBUILD_DB=true

Empty example:

rake quorum:blastdb:build EMPTY=true

For a full list of supported arguments.

rake-D

Don’t forget to update “config/quorum_settings.yml” with your newly created database(s).

Quorum provides a link to download a Blast hit sequence in the detailed report. For this process to work smoothly, the sequence identifier MUST be unique across ALL Blast databases.

Example: “example_blast_database/contigs.fa”

>my_unique_sequence_identifier_201201201327077953
ATGC...

“another_example_blast_database/contigs.fa”

>my_unique_sequence_identifier_201201201327078017
CGTA...

If the sequence identifiers are not unique across all Blast databases and you wish to remove the link to download a Blast hit sequence, follow the steps below.

  • Override Quorum’s views (see Customize Quorum below)

  • Comment out or remove the lines below in “app/views/quorum/jobs/templates/_blast_detailed_report_template.html.erb”

    <p class="small">
    <a id="download_sequence_{{= id }}"
    onclick="downloadSequence(<%= @jobs.id %>, {{= id }}, '{{= algo }}', this)">
    Download Sequence
    </a>
    </p>

Follow the steps below to execute Quorum remotely via Net::SSH.

  • Ensure your ActiveRecord Database adapter in “config/database.yml” is set to any supported adapter other than sqlite3.

  • Ensure your database host is set and accessible via the remote machine(s).

  • Ensure you have supplied the necessary information in “config/quorum_settings.yml” to execute Quorum remotely.

    blast:

    remote: true
    ssh_host: remote.machine.org
    ssh_user: remote_user

Net::SSH.start() optional params (net-ssh.github.com/ssh/v2/api/index.html)

ssh_options:
password: "secret"
port: 8888
  • Tar and compress quorum.

    tar -czvf quorum.tar.gz quorum/

  • Copy the newly created tarball to the remote machine.

    scp quorum.tar.gz <username>@<host>:/path/to/install

  • Expand the tarball on the remote machine.

    ssh <username>@<host>

    tar -xzvf quorum.tar.gz

  • Ensure Quorum script dependencies are added to the remote machine’s PATH. If the remote machine doesn’t have a .bashrc file, create one.

    touch /path/to/.bashrc

and add script dependencies to PATH.

echo "export PATH=/path/to/dependencies:$PATH" >> /path/to/.bashrc

To override Quorum’s default views, run the generator.

railsgeneratequorum:views

A copy of Quorum’s layouts and views can be found in your application under “app/views/layouts/quorum/” “app/views/quorum/”.

To override Quorum’s default styles, run the generator.

railsgeneratequorum:styles

A copy of Quorum’s styles can be found in your application under “app/assets/stylesheets/quorum/”. If your application has existing styles, it’s a good idea to remove

*= require_tree .

in “app/assets/stylesheets/application.css” and require your stylesheets individually.

To override Quorum’s default images, run the generator.

railsgeneratequorum:images

A copy of Quorum’s images can be found in your application under “app/assets/images/quorum/”.

Don’t like Quorum’s jQuery UI theme? Override it!

  • Override Quorum’s styles and images.

  • Roll your own jQuery UI theme. jqueryui.com/themeroller

  • Replace Quorum’s theme in “app/assets/{stylesheets:images}/quorum” with your own.

Override Quorum’s views and comment out any unwanted algorithms in “app/views/quorum/jobs/new.html.erb” and “app/views/quorum/jobs/show.html.erb”.

For example:

Remove Blastp in “app/views/quorum/jobs/new.html.erb”

<%# Search Algorithms %>
<%# Comment out an algorithm below to remove it from the form. %>
<%# blastn %>
<%= render :partial => "quorum/jobs/form/blastn_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# blastx %>
<%= render :partial => "quorum/jobs/form/blastx_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# tblastn %>
<%= render :partial => "quorum/jobs/form/tblastn_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# blastp %>
<% render :partial => "quorum/jobs/form/blastp_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# End Search Algorithms %>

Remove Blastp in “app/views/quorum/jobs/show.html.erb”

<div id="tabs">
<ul>
<li><a href="#tabs-1">Blastn</a></li>
<li><a href="#tabs-2">Blastx</a></li>
<li><a href="#tabs-3">Tblastn</a></li>
<%#
<li><a href="#tabs-4">Blastp</a></li>
%>
</ul>
<%# Search results per algorithm %>
<div id="tabs-1">
<h2>Blastn</h2>
<div id="blastn-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
<div id="tabs-2">
<h2>Blastx</h2>
<div id="blastx-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
<div id="tabs-3">
<h2>Tblastn</h2>
<div id="tblastn-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
<!--
<div id="tabs-4">
<h2>Blastp</h2>
<div id="blastp-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
-->
</div>

Override Quorum’s views and specify your own JavaScript callback function!

See “app/views/quorum/show.html.erb” for more details.

For an example using d3.js (github.com/mbostock/d3) see: github.com/ncgr/lis_sequence_search

For detailed Redis installation instructions, follow the links below.

Quorum provides a simple Rails environment rake task for spawning Resque workers. To customize Resque workers by adding monitoring etc., follow the link below.

Quorum mounts Resque’s web interface by default via

mountResque::Server.new, :at=>"/quorum/resque"

in “config/routes.rb”. The line above is fine for development, however, in production it’s best to grant authenticated users access to “/quorum/resque”.

HTTP Basic Example: “config/initializers/resque_http_auth.rb”

Resque::Server.use(Rack::Auth::Basic) do|user, password|user=="resque"password=="secret"end

Devise Example: “config/routes.rb”

authenticate:userdomountResque::Server.new, :at=>"/quorum/resque"end

Devise plus Declarative Authorization Example: “config/routes.rb”

# Only superusers can access Resque's web interface.resque_constraint = lambdado|request|request.env["warden"].authenticate?&&request.env["warden"].user.role_symbols.include?(:superuser)
endconstraintsresque_constraintdomountResque::Server.new, :at=>"/quorum/resque"end

To customize Quorum flash messages, edit “config/locales/quorum.en.yml”.

github.com/ncgr/quorum/issues

  • Fork Quorum

  • Create a topic branch git checkout -b my_branch

  • Push to your branch git push origin my_branch

  • Create a pull request from your branch

  • Find your name added to the README under Contributors

  • Add GFF3 annotations to detailed Blast reports

  • Add link to download multiple Blast hit sequences in detailed report

  • Support Hmmer3

MIT License. Copyright NCGR ncgr.org

About

A flexible bioinformatics search tool.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
This repository was archived by the owner on Aug 19, 2023. It is now read-only.

Repository files navigation

A flexible bioinformatics search tool.

Quorum is a Rails 3.1 mountable engine that supports the following bioinformatics search tools.

Dependencies:

See the gem in action.

medplants.ncgr.org/quorum/jobs/new

Use the latest stable Rails release with Quorum.

geminstallquorum

After you install Quorum and add it to your Gemfile, run the generator.

railsgeneratequorum:install

The generator will create a directory in your application’s root path

quorum/

as well as the necessary config files to run and customize Quorum. You MUST customize “config/quorum_settings.yml” before using Quorum. See Remote Machine Setup below if you choose to execute Quorum remotely.

Migrate the database.

rake quorum:install:migrations
rake db:migrate

Follow these steps to safely upgrade Quorum.

  • Make a copy of “config/quorum_settings.yml”.

    cp config/quorum_settings.yml config/quorum_settings.yml.old

  • If you overrode Quorum’s styles and / or views, make a copy of the existing directories before upgrading.

    cp -R app/assets/stylesheets/quorum app/assets/stylesheets/quorum_oldcp -R app/views/quorum/jobs app/views/quorum/jobs_old

  • Run the install generator and answer “Yes” to all conflicts.

    rails generate quorum:install

  • Copy the old Search Database(s) to the newly generated “config/quorum_settings.yml” file.

  • Update the database migrations.

    rake quorum:install:migrations rake db:migrate

  • If applicable, override Quorum’s views, styles and images.

  • Update the remote machine(s).

Build your NCBI Blast+ database(s) using the rake task below.

rake quorum:blastdb:build

Arguments:

  • DIR= - path to {.tgz, .tar.gz, .tbz, .tar.bz2} files containing raw data. Separate multiple directories with a colon (:).

    DIR=/path/to/dir:/path/to/another/dir

  • TYPE= - type of Blast database to build {both, prot, nucl}. Defaults to both.

  • PROT_FILE_NAME= - name of the file containing protein data. Defaults to peptides.fa.

  • NUCL_FILE_NAME= - name of the file containing nucleotide data. Defaults to contigs.fa.

  • REBUILD_DB= - removes existing blast database(s) before building {true or false}. Defaults to false.

  • EMPTY= - skip makeblastdb and create necessary directories {true or false}. Defaults to false. Set this argument to true if you wish to create your own Blast database(s).

Example:

rake quorum:blastdb:build DIR=/path/to/dir:/path/to/another/dir TYPE=nucl \
NUCL_FILE_NAME=my_contigs.fa REBUILD_DB=true

Empty example:

rake quorum:blastdb:build EMPTY=true

For a full list of supported arguments.

rake-D

Don’t forget to update “config/quorum_settings.yml” with your newly created database(s).

Quorum provides a link to download a Blast hit sequence in the detailed report. For this process to work smoothly, the sequence identifier MUST be unique across ALL Blast databases.

Example: “example_blast_database/contigs.fa”

>my_unique_sequence_identifier_201201201327077953
ATGC...

“another_example_blast_database/contigs.fa”

>my_unique_sequence_identifier_201201201327078017
CGTA...

If the sequence identifiers are not unique across all Blast databases and you wish to remove the link to download a Blast hit sequence, follow the steps below.

  • Override Quorum’s views (see Customize Quorum below)

  • Comment out or remove the lines below in “app/views/quorum/jobs/templates/_blast_detailed_report_template.html.erb”

    <p class="small">
    <a id="download_sequence_{{= id }}"
    onclick="downloadSequence(<%= @jobs.id %>, {{= id }}, '{{= algo }}', this)">
    Download Sequence
    </a>
    </p>

Follow the steps below to execute Quorum remotely via Net::SSH.

  • Ensure your ActiveRecord Database adapter in “config/database.yml” is set to any supported adapter other than sqlite3.

  • Ensure your database host is set and accessible via the remote machine(s).

  • Ensure you have supplied the necessary information in “config/quorum_settings.yml” to execute Quorum remotely.

    blast:

    remote: true
    ssh_host: remote.machine.org
    ssh_user: remote_user

Net::SSH.start() optional params (net-ssh.github.com/ssh/v2/api/index.html)

ssh_options:
password: "secret"
port: 8888
  • Tar and compress quorum.

    tar -czvf quorum.tar.gz quorum/

  • Copy the newly created tarball to the remote machine.

    scp quorum.tar.gz <username>@<host>:/path/to/install

  • Expand the tarball on the remote machine.

    ssh <username>@<host>

    tar -xzvf quorum.tar.gz

  • Ensure Quorum script dependencies are added to the remote machine’s PATH. If the remote machine doesn’t have a .bashrc file, create one.

    touch /path/to/.bashrc

and add script dependencies to PATH.

echo "export PATH=/path/to/dependencies:$PATH" >> /path/to/.bashrc

To override Quorum’s default views, run the generator.

railsgeneratequorum:views

A copy of Quorum’s layouts and views can be found in your application under “app/views/layouts/quorum/” “app/views/quorum/”.

To override Quorum’s default styles, run the generator.

railsgeneratequorum:styles

A copy of Quorum’s styles can be found in your application under “app/assets/stylesheets/quorum/”. If your application has existing styles, it’s a good idea to remove

*= require_tree .

in “app/assets/stylesheets/application.css” and require your stylesheets individually.

To override Quorum’s default images, run the generator.

railsgeneratequorum:images

A copy of Quorum’s images can be found in your application under “app/assets/images/quorum/”.

Don’t like Quorum’s jQuery UI theme? Override it!

  • Override Quorum’s styles and images.

  • Roll your own jQuery UI theme. jqueryui.com/themeroller

  • Replace Quorum’s theme in “app/assets/{stylesheets:images}/quorum” with your own.

Override Quorum’s views and comment out any unwanted algorithms in “app/views/quorum/jobs/new.html.erb” and “app/views/quorum/jobs/show.html.erb”.

For example:

Remove Blastp in “app/views/quorum/jobs/new.html.erb”

<%# Search Algorithms %>
<%# Comment out an algorithm below to remove it from the form. %>
<%# blastn %>
<%= render :partial => "quorum/jobs/form/blastn_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# blastx %>
<%= render :partial => "quorum/jobs/form/blastx_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# tblastn %>
<%= render :partial => "quorum/jobs/form/tblastn_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# blastp %>
<% render :partial => "quorum/jobs/form/blastp_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# End Search Algorithms %>

Remove Blastp in “app/views/quorum/jobs/show.html.erb”

<div id="tabs">
<ul>
<li><a href="#tabs-1">Blastn</a></li>
<li><a href="#tabs-2">Blastx</a></li>
<li><a href="#tabs-3">Tblastn</a></li>
<%#
<li><a href="#tabs-4">Blastp</a></li>
%>
</ul>
<%# Search results per algorithm %>
<div id="tabs-1">
<h2>Blastn</h2>
<div id="blastn-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
<div id="tabs-2">
<h2>Blastx</h2>
<div id="blastx-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
<div id="tabs-3">
<h2>Tblastn</h2>
<div id="tblastn-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
<!--
<div id="tabs-4">
<h2>Blastp</h2>
<div id="blastp-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
-->
</div>

Override Quorum’s views and specify your own JavaScript callback function!

See “app/views/quorum/show.html.erb” for more details.

For an example using d3.js (github.com/mbostock/d3) see: github.com/ncgr/lis_sequence_search

For detailed Redis installation instructions, follow the links below.

Quorum provides a simple Rails environment rake task for spawning Resque workers. To customize Resque workers by adding monitoring etc., follow the link below.

Quorum mounts Resque’s web interface by default via

mountResque::Server.new, :at=>"/quorum/resque"

in “config/routes.rb”. The line above is fine for development, however, in production it’s best to grant authenticated users access to “/quorum/resque”.

HTTP Basic Example: “config/initializers/resque_http_auth.rb”

Resque::Server.use(Rack::Auth::Basic) do|user, password|user=="resque"password=="secret"end

Devise Example: “config/routes.rb”

authenticate:userdomountResque::Server.new, :at=>"/quorum/resque"end

Devise plus Declarative Authorization Example: “config/routes.rb”

# Only superusers can access Resque's web interface.resque_constraint = lambdado|request|request.env["warden"].authenticate?&&request.env["warden"].user.role_symbols.include?(:superuser)
endconstraintsresque_constraintdomountResque::Server.new, :at=>"/quorum/resque"end

To customize Quorum flash messages, edit “config/locales/quorum.en.yml”.

github.com/ncgr/quorum/issues

  • Fork Quorum

  • Create a topic branch git checkout -b my_branch

  • Push to your branch git push origin my_branch

  • Create a pull request from your branch

  • Find your name added to the README under Contributors

  • Add GFF3 annotations to detailed Blast reports

  • Add link to download multiple Blast hit sequences in detailed report

  • Support Hmmer3

MIT License. Copyright NCGR ncgr.org

About

A flexible bioinformatics search tool.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
This repository was archived by the owner on Aug 19, 2023. It is now read-only.

Repository files navigation

A flexible bioinformatics search tool.

Quorum is a Rails 3.1 mountable engine that supports the following bioinformatics search tools.

Dependencies:

See the gem in action.

medplants.ncgr.org/quorum/jobs/new

Use the latest stable Rails release with Quorum.

geminstallquorum

After you install Quorum and add it to your Gemfile, run the generator.

railsgeneratequorum:install

The generator will create a directory in your application’s root path

quorum/

as well as the necessary config files to run and customize Quorum. You MUST customize “config/quorum_settings.yml” before using Quorum. See Remote Machine Setup below if you choose to execute Quorum remotely.

Migrate the database.

rake quorum:install:migrations
rake db:migrate

Follow these steps to safely upgrade Quorum.

  • Make a copy of “config/quorum_settings.yml”.

    cp config/quorum_settings.yml config/quorum_settings.yml.old

  • If you overrode Quorum’s styles and / or views, make a copy of the existing directories before upgrading.

    cp -R app/assets/stylesheets/quorum app/assets/stylesheets/quorum_oldcp -R app/views/quorum/jobs app/views/quorum/jobs_old

  • Run the install generator and answer “Yes” to all conflicts.

    rails generate quorum:install

  • Copy the old Search Database(s) to the newly generated “config/quorum_settings.yml” file.

  • Update the database migrations.

    rake quorum:install:migrations rake db:migrate

  • If applicable, override Quorum’s views, styles and images.

  • Update the remote machine(s).

Build your NCBI Blast+ database(s) using the rake task below.

rake quorum:blastdb:build

Arguments:

  • DIR= - path to {.tgz, .tar.gz, .tbz, .tar.bz2} files containing raw data. Separate multiple directories with a colon (:).

    DIR=/path/to/dir:/path/to/another/dir

  • TYPE= - type of Blast database to build {both, prot, nucl}. Defaults to both.

  • PROT_FILE_NAME= - name of the file containing protein data. Defaults to peptides.fa.

  • NUCL_FILE_NAME= - name of the file containing nucleotide data. Defaults to contigs.fa.

  • REBUILD_DB= - removes existing blast database(s) before building {true or false}. Defaults to false.

  • EMPTY= - skip makeblastdb and create necessary directories {true or false}. Defaults to false. Set this argument to true if you wish to create your own Blast database(s).

Example:

rake quorum:blastdb:build DIR=/path/to/dir:/path/to/another/dir TYPE=nucl \
NUCL_FILE_NAME=my_contigs.fa REBUILD_DB=true

Empty example:

rake quorum:blastdb:build EMPTY=true

For a full list of supported arguments.

rake-D

Don’t forget to update “config/quorum_settings.yml” with your newly created database(s).

Quorum provides a link to download a Blast hit sequence in the detailed report. For this process to work smoothly, the sequence identifier MUST be unique across ALL Blast databases.

Example: “example_blast_database/contigs.fa”

>my_unique_sequence_identifier_201201201327077953
ATGC...

“another_example_blast_database/contigs.fa”

>my_unique_sequence_identifier_201201201327078017
CGTA...

If the sequence identifiers are not unique across all Blast databases and you wish to remove the link to download a Blast hit sequence, follow the steps below.

  • Override Quorum’s views (see Customize Quorum below)

  • Comment out or remove the lines below in “app/views/quorum/jobs/templates/_blast_detailed_report_template.html.erb”

    <p class="small">
    <a id="download_sequence_{{= id }}"
    onclick="downloadSequence(<%= @jobs.id %>, {{= id }}, '{{= algo }}', this)">
    Download Sequence
    </a>
    </p>

Follow the steps below to execute Quorum remotely via Net::SSH.

  • Ensure your ActiveRecord Database adapter in “config/database.yml” is set to any supported adapter other than sqlite3.

  • Ensure your database host is set and accessible via the remote machine(s).

  • Ensure you have supplied the necessary information in “config/quorum_settings.yml” to execute Quorum remotely.

    blast:

    remote: true
    ssh_host: remote.machine.org
    ssh_user: remote_user

Net::SSH.start() optional params (net-ssh.github.com/ssh/v2/api/index.html)

ssh_options:
password: "secret"
port: 8888
  • Tar and compress quorum.

    tar -czvf quorum.tar.gz quorum/

  • Copy the newly created tarball to the remote machine.

    scp quorum.tar.gz <username>@<host>:/path/to/install

  • Expand the tarball on the remote machine.

    ssh <username>@<host>

    tar -xzvf quorum.tar.gz

  • Ensure Quorum script dependencies are added to the remote machine’s PATH. If the remote machine doesn’t have a .bashrc file, create one.

    touch /path/to/.bashrc

and add script dependencies to PATH.

echo "export PATH=/path/to/dependencies:$PATH" >> /path/to/.bashrc

To override Quorum’s default views, run the generator.

railsgeneratequorum:views

A copy of Quorum’s layouts and views can be found in your application under “app/views/layouts/quorum/” “app/views/quorum/”.

To override Quorum’s default styles, run the generator.

railsgeneratequorum:styles

A copy of Quorum’s styles can be found in your application under “app/assets/stylesheets/quorum/”. If your application has existing styles, it’s a good idea to remove

*= require_tree .

in “app/assets/stylesheets/application.css” and require your stylesheets individually.

To override Quorum’s default images, run the generator.

railsgeneratequorum:images

A copy of Quorum’s images can be found in your application under “app/assets/images/quorum/”.

Don’t like Quorum’s jQuery UI theme? Override it!

  • Override Quorum’s styles and images.

  • Roll your own jQuery UI theme. jqueryui.com/themeroller

  • Replace Quorum’s theme in “app/assets/{stylesheets:images}/quorum” with your own.

Override Quorum’s views and comment out any unwanted algorithms in “app/views/quorum/jobs/new.html.erb” and “app/views/quorum/jobs/show.html.erb”.

For example:

Remove Blastp in “app/views/quorum/jobs/new.html.erb”

<%# Search Algorithms %>
<%# Comment out an algorithm below to remove it from the form. %>
<%# blastn %>
<%= render :partial => "quorum/jobs/form/blastn_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# blastx %>
<%= render :partial => "quorum/jobs/form/blastx_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# tblastn %>
<%= render :partial => "quorum/jobs/form/tblastn_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# blastp %>
<% render :partial => "quorum/jobs/form/blastp_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# End Search Algorithms %>

Remove Blastp in “app/views/quorum/jobs/show.html.erb”

<div id="tabs">
<ul>
<li><a href="#tabs-1">Blastn</a></li>
<li><a href="#tabs-2">Blastx</a></li>
<li><a href="#tabs-3">Tblastn</a></li>
<%#
<li><a href="#tabs-4">Blastp</a></li>
%>
</ul>
<%# Search results per algorithm %>
<div id="tabs-1">
<h2>Blastn</h2>
<div id="blastn-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
<div id="tabs-2">
<h2>Blastx</h2>
<div id="blastx-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
<div id="tabs-3">
<h2>Tblastn</h2>
<div id="tblastn-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
<!--
<div id="tabs-4">
<h2>Blastp</h2>
<div id="blastp-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
-->
</div>

Override Quorum’s views and specify your own JavaScript callback function!

See “app/views/quorum/show.html.erb” for more details.

For an example using d3.js (github.com/mbostock/d3) see: github.com/ncgr/lis_sequence_search

For detailed Redis installation instructions, follow the links below.

Quorum provides a simple Rails environment rake task for spawning Resque workers. To customize Resque workers by adding monitoring etc., follow the link below.

Quorum mounts Resque’s web interface by default via

mountResque::Server.new, :at=>"/quorum/resque"

in “config/routes.rb”. The line above is fine for development, however, in production it’s best to grant authenticated users access to “/quorum/resque”.

HTTP Basic Example: “config/initializers/resque_http_auth.rb”

Resque::Server.use(Rack::Auth::Basic) do|user, password|user=="resque"password=="secret"end

Devise Example: “config/routes.rb”

authenticate:userdomountResque::Server.new, :at=>"/quorum/resque"end

Devise plus Declarative Authorization Example: “config/routes.rb”

# Only superusers can access Resque's web interface.resque_constraint = lambdado|request|request.env["warden"].authenticate?&&request.env["warden"].user.role_symbols.include?(:superuser)
endconstraintsresque_constraintdomountResque::Server.new, :at=>"/quorum/resque"end

To customize Quorum flash messages, edit “config/locales/quorum.en.yml”.

github.com/ncgr/quorum/issues

  • Fork Quorum

  • Create a topic branch git checkout -b my_branch

  • Push to your branch git push origin my_branch

  • Create a pull request from your branch

  • Find your name added to the README under Contributors

  • Add GFF3 annotations to detailed Blast reports

  • Add link to download multiple Blast hit sequences in detailed report

  • Support Hmmer3

MIT License. Copyright NCGR ncgr.org

About

A flexible bioinformatics search tool.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content
This repository was archived by the owner on Aug 19, 2023. It is now read-only.

Repository files navigation

A flexible bioinformatics search tool.

Quorum is a Rails 3.1 mountable engine that supports the following bioinformatics search tools.

Dependencies:

See the gem in action.

medplants.ncgr.org/quorum/jobs/new

Use the latest stable Rails release with Quorum.

geminstallquorum

After you install Quorum and add it to your Gemfile, run the generator.

railsgeneratequorum:install

The generator will create a directory in your application’s root path

quorum/

as well as the necessary config files to run and customize Quorum. You MUST customize “config/quorum_settings.yml” before using Quorum. See Remote Machine Setup below if you choose to execute Quorum remotely.

Migrate the database.

rake quorum:install:migrations
rake db:migrate

Follow these steps to safely upgrade Quorum.

  • Make a copy of “config/quorum_settings.yml”.

    cp config/quorum_settings.yml config/quorum_settings.yml.old

  • If you overrode Quorum’s styles and / or views, make a copy of the existing directories before upgrading.

    cp -R app/assets/stylesheets/quorum app/assets/stylesheets/quorum_oldcp -R app/views/quorum/jobs app/views/quorum/jobs_old

  • Run the install generator and answer “Yes” to all conflicts.

    rails generate quorum:install

  • Copy the old Search Database(s) to the newly generated “config/quorum_settings.yml” file.

  • Update the database migrations.

    rake quorum:install:migrations rake db:migrate

  • If applicable, override Quorum’s views, styles and images.

  • Update the remote machine(s).

Build your NCBI Blast+ database(s) using the rake task below.

rake quorum:blastdb:build

Arguments:

  • DIR= - path to {.tgz, .tar.gz, .tbz, .tar.bz2} files containing raw data. Separate multiple directories with a colon (:).

    DIR=/path/to/dir:/path/to/another/dir

  • TYPE= - type of Blast database to build {both, prot, nucl}. Defaults to both.

  • PROT_FILE_NAME= - name of the file containing protein data. Defaults to peptides.fa.

  • NUCL_FILE_NAME= - name of the file containing nucleotide data. Defaults to contigs.fa.

  • REBUILD_DB= - removes existing blast database(s) before building {true or false}. Defaults to false.

  • EMPTY= - skip makeblastdb and create necessary directories {true or false}. Defaults to false. Set this argument to true if you wish to create your own Blast database(s).

Example:

rake quorum:blastdb:build DIR=/path/to/dir:/path/to/another/dir TYPE=nucl \
NUCL_FILE_NAME=my_contigs.fa REBUILD_DB=true

Empty example:

rake quorum:blastdb:build EMPTY=true

For a full list of supported arguments.

rake-D

Don’t forget to update “config/quorum_settings.yml” with your newly created database(s).

Quorum provides a link to download a Blast hit sequence in the detailed report. For this process to work smoothly, the sequence identifier MUST be unique across ALL Blast databases.

Example: “example_blast_database/contigs.fa”

>my_unique_sequence_identifier_201201201327077953
ATGC...

“another_example_blast_database/contigs.fa”

>my_unique_sequence_identifier_201201201327078017
CGTA...

If the sequence identifiers are not unique across all Blast databases and you wish to remove the link to download a Blast hit sequence, follow the steps below.

  • Override Quorum’s views (see Customize Quorum below)

  • Comment out or remove the lines below in “app/views/quorum/jobs/templates/_blast_detailed_report_template.html.erb”

    <p class="small">
    <a id="download_sequence_{{= id }}"
    onclick="downloadSequence(<%= @jobs.id %>, {{= id }}, '{{= algo }}', this)">
    Download Sequence
    </a>
    </p>

Follow the steps below to execute Quorum remotely via Net::SSH.

  • Ensure your ActiveRecord Database adapter in “config/database.yml” is set to any supported adapter other than sqlite3.

  • Ensure your database host is set and accessible via the remote machine(s).

  • Ensure you have supplied the necessary information in “config/quorum_settings.yml” to execute Quorum remotely.

    blast:

    remote: true
    ssh_host: remote.machine.org
    ssh_user: remote_user

Net::SSH.start() optional params (net-ssh.github.com/ssh/v2/api/index.html)

ssh_options:
password: "secret"
port: 8888
  • Tar and compress quorum.

    tar -czvf quorum.tar.gz quorum/

  • Copy the newly created tarball to the remote machine.

    scp quorum.tar.gz <username>@<host>:/path/to/install

  • Expand the tarball on the remote machine.

    ssh <username>@<host>

    tar -xzvf quorum.tar.gz

  • Ensure Quorum script dependencies are added to the remote machine’s PATH. If the remote machine doesn’t have a .bashrc file, create one.

    touch /path/to/.bashrc

and add script dependencies to PATH.

echo "export PATH=/path/to/dependencies:$PATH" >> /path/to/.bashrc

To override Quorum’s default views, run the generator.

railsgeneratequorum:views

A copy of Quorum’s layouts and views can be found in your application under “app/views/layouts/quorum/” “app/views/quorum/”.

To override Quorum’s default styles, run the generator.

railsgeneratequorum:styles

A copy of Quorum’s styles can be found in your application under “app/assets/stylesheets/quorum/”. If your application has existing styles, it’s a good idea to remove

*= require_tree .

in “app/assets/stylesheets/application.css” and require your stylesheets individually.

To override Quorum’s default images, run the generator.

railsgeneratequorum:images

A copy of Quorum’s images can be found in your application under “app/assets/images/quorum/”.

Don’t like Quorum’s jQuery UI theme? Override it!

  • Override Quorum’s styles and images.

  • Roll your own jQuery UI theme. jqueryui.com/themeroller

  • Replace Quorum’s theme in “app/assets/{stylesheets:images}/quorum” with your own.

Override Quorum’s views and comment out any unwanted algorithms in “app/views/quorum/jobs/new.html.erb” and “app/views/quorum/jobs/show.html.erb”.

For example:

Remove Blastp in “app/views/quorum/jobs/new.html.erb”

<%# Search Algorithms %>
<%# Comment out an algorithm below to remove it from the form. %>
<%# blastn %>
<%= render :partial => "quorum/jobs/form/blastn_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# blastx %>
<%= render :partial => "quorum/jobs/form/blastx_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# tblastn %>
<%= render :partial => "quorum/jobs/form/tblastn_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# blastp %>
<% render :partial => "quorum/jobs/form/blastp_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# End Search Algorithms %>

Remove Blastp in “app/views/quorum/jobs/show.html.erb”

<div id="tabs">
<ul>
<li><a href="#tabs-1">Blastn</a></li>
<li><a href="#tabs-2">Blastx</a></li>
<li><a href="#tabs-3">Tblastn</a></li>
<%#
<li><a href="#tabs-4">Blastp</a></li>
%>
</ul>
<%# Search results per algorithm %>
<div id="tabs-1">
<h2>Blastn</h2>
<div id="blastn-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
<div id="tabs-2">
<h2>Blastx</h2>
<div id="blastx-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
<div id="tabs-3">
<h2>Tblastn</h2>
<div id="tblastn-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
<!--
<div id="tabs-4">
<h2>Blastp</h2>
<div id="blastp-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
-->
</div>

Override Quorum’s views and specify your own JavaScript callback function!

See “app/views/quorum/show.html.erb” for more details.

For an example using d3.js (github.com/mbostock/d3) see: github.com/ncgr/lis_sequence_search

For detailed Redis installation instructions, follow the links below.

Quorum provides a simple Rails environment rake task for spawning Resque workers. To customize Resque workers by adding monitoring etc., follow the link below.

Quorum mounts Resque’s web interface by default via

mountResque::Server.new, :at=>"/quorum/resque"

in “config/routes.rb”. The line above is fine for development, however, in production it’s best to grant authenticated users access to “/quorum/resque”.

HTTP Basic Example: “config/initializers/resque_http_auth.rb”

Resque::Server.use(Rack::Auth::Basic) do|user, password|user=="resque"password=="secret"end

Devise Example: “config/routes.rb”

authenticate:userdomountResque::Server.new, :at=>"/quorum/resque"end

Devise plus Declarative Authorization Example: “config/routes.rb”

# Only superusers can access Resque's web interface.resque_constraint = lambdado|request|request.env["warden"].authenticate?&&request.env["warden"].user.role_symbols.include?(:superuser)
endconstraintsresque_constraintdomountResque::Server.new, :at=>"/quorum/resque"end

To customize Quorum flash messages, edit “config/locales/quorum.en.yml”.

github.com/ncgr/quorum/issues

  • Fork Quorum

  • Create a topic branch git checkout -b my_branch

  • Push to your branch git push origin my_branch

  • Create a pull request from your branch

  • Find your name added to the README under Contributors

  • Add GFF3 annotations to detailed Blast reports

  • Add link to download multiple Blast hit sequences in detailed report

  • Support Hmmer3

MIT License. Copyright NCGR ncgr.org

About

A flexible bioinformatics search tool.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
This repository was archived by the owner on Aug 19, 2023. It is now read-only.

Repository files navigation

A flexible bioinformatics search tool.

Quorum is a Rails 3.1 mountable engine that supports the following bioinformatics search tools.

Dependencies:

See the gem in action.

medplants.ncgr.org/quorum/jobs/new

Use the latest stable Rails release with Quorum.

geminstallquorum

After you install Quorum and add it to your Gemfile, run the generator.

railsgeneratequorum:install

The generator will create a directory in your application’s root path

quorum/

as well as the necessary config files to run and customize Quorum. You MUST customize “config/quorum_settings.yml” before using Quorum. See Remote Machine Setup below if you choose to execute Quorum remotely.

Migrate the database.

rake quorum:install:migrations
rake db:migrate

Follow these steps to safely upgrade Quorum.

  • Make a copy of “config/quorum_settings.yml”.

    cp config/quorum_settings.yml config/quorum_settings.yml.old

  • If you overrode Quorum’s styles and / or views, make a copy of the existing directories before upgrading.

    cp -R app/assets/stylesheets/quorum app/assets/stylesheets/quorum_oldcp -R app/views/quorum/jobs app/views/quorum/jobs_old

  • Run the install generator and answer “Yes” to all conflicts.

    rails generate quorum:install

  • Copy the old Search Database(s) to the newly generated “config/quorum_settings.yml” file.

  • Update the database migrations.

    rake quorum:install:migrations rake db:migrate

  • If applicable, override Quorum’s views, styles and images.

  • Update the remote machine(s).

Build your NCBI Blast+ database(s) using the rake task below.

rake quorum:blastdb:build

Arguments:

  • DIR= - path to {.tgz, .tar.gz, .tbz, .tar.bz2} files containing raw data. Separate multiple directories with a colon (:).

    DIR=/path/to/dir:/path/to/another/dir

  • TYPE= - type of Blast database to build {both, prot, nucl}. Defaults to both.

  • PROT_FILE_NAME= - name of the file containing protein data. Defaults to peptides.fa.

  • NUCL_FILE_NAME= - name of the file containing nucleotide data. Defaults to contigs.fa.

  • REBUILD_DB= - removes existing blast database(s) before building {true or false}. Defaults to false.

  • EMPTY= - skip makeblastdb and create necessary directories {true or false}. Defaults to false. Set this argument to true if you wish to create your own Blast database(s).

Example:

rake quorum:blastdb:build DIR=/path/to/dir:/path/to/another/dir TYPE=nucl \
NUCL_FILE_NAME=my_contigs.fa REBUILD_DB=true

Empty example:

rake quorum:blastdb:build EMPTY=true

For a full list of supported arguments.

rake-D

Don’t forget to update “config/quorum_settings.yml” with your newly created database(s).

Quorum provides a link to download a Blast hit sequence in the detailed report. For this process to work smoothly, the sequence identifier MUST be unique across ALL Blast databases.

Example: “example_blast_database/contigs.fa”

>my_unique_sequence_identifier_201201201327077953
ATGC...

“another_example_blast_database/contigs.fa”

>my_unique_sequence_identifier_201201201327078017
CGTA...

If the sequence identifiers are not unique across all Blast databases and you wish to remove the link to download a Blast hit sequence, follow the steps below.

  • Override Quorum’s views (see Customize Quorum below)

  • Comment out or remove the lines below in “app/views/quorum/jobs/templates/_blast_detailed_report_template.html.erb”

    <p class="small">
    <a id="download_sequence_{{= id }}"
    onclick="downloadSequence(<%= @jobs.id %>, {{= id }}, '{{= algo }}', this)">
    Download Sequence
    </a>
    </p>

Follow the steps below to execute Quorum remotely via Net::SSH.

  • Ensure your ActiveRecord Database adapter in “config/database.yml” is set to any supported adapter other than sqlite3.

  • Ensure your database host is set and accessible via the remote machine(s).

  • Ensure you have supplied the necessary information in “config/quorum_settings.yml” to execute Quorum remotely.

    blast:

    remote: true
    ssh_host: remote.machine.org
    ssh_user: remote_user

Net::SSH.start() optional params (net-ssh.github.com/ssh/v2/api/index.html)

ssh_options:
password: "secret"
port: 8888
  • Tar and compress quorum.

    tar -czvf quorum.tar.gz quorum/

  • Copy the newly created tarball to the remote machine.

    scp quorum.tar.gz <username>@<host>:/path/to/install

  • Expand the tarball on the remote machine.

    ssh <username>@<host>

    tar -xzvf quorum.tar.gz

  • Ensure Quorum script dependencies are added to the remote machine’s PATH. If the remote machine doesn’t have a .bashrc file, create one.

    touch /path/to/.bashrc

and add script dependencies to PATH.

echo "export PATH=/path/to/dependencies:$PATH" >> /path/to/.bashrc

To override Quorum’s default views, run the generator.

railsgeneratequorum:views

A copy of Quorum’s layouts and views can be found in your application under “app/views/layouts/quorum/” “app/views/quorum/”.

To override Quorum’s default styles, run the generator.

railsgeneratequorum:styles

A copy of Quorum’s styles can be found in your application under “app/assets/stylesheets/quorum/”. If your application has existing styles, it’s a good idea to remove

*= require_tree .

in “app/assets/stylesheets/application.css” and require your stylesheets individually.

To override Quorum’s default images, run the generator.

railsgeneratequorum:images

A copy of Quorum’s images can be found in your application under “app/assets/images/quorum/”.

Don’t like Quorum’s jQuery UI theme? Override it!

  • Override Quorum’s styles and images.

  • Roll your own jQuery UI theme. jqueryui.com/themeroller

  • Replace Quorum’s theme in “app/assets/{stylesheets:images}/quorum” with your own.

Override Quorum’s views and comment out any unwanted algorithms in “app/views/quorum/jobs/new.html.erb” and “app/views/quorum/jobs/show.html.erb”.

For example:

Remove Blastp in “app/views/quorum/jobs/new.html.erb”

<%# Search Algorithms %>
<%# Comment out an algorithm below to remove it from the form. %>
<%# blastn %>
<%= render :partial => "quorum/jobs/form/blastn_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# blastx %>
<%= render :partial => "quorum/jobs/form/blastx_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# tblastn %>
<%= render :partial => "quorum/jobs/form/tblastn_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# blastp %>
<% render :partial => "quorum/jobs/form/blastp_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# End Search Algorithms %>

Remove Blastp in “app/views/quorum/jobs/show.html.erb”

<div id="tabs">
<ul>
<li><a href="#tabs-1">Blastn</a></li>
<li><a href="#tabs-2">Blastx</a></li>
<li><a href="#tabs-3">Tblastn</a></li>
<%#
<li><a href="#tabs-4">Blastp</a></li>
%>
</ul>
<%# Search results per algorithm %>
<div id="tabs-1">
<h2>Blastn</h2>
<div id="blastn-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
<div id="tabs-2">
<h2>Blastx</h2>
<div id="blastx-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
<div id="tabs-3">
<h2>Tblastn</h2>
<div id="tblastn-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
<!--
<div id="tabs-4">
<h2>Blastp</h2>
<div id="blastp-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
-->
</div>

Override Quorum’s views and specify your own JavaScript callback function!

See “app/views/quorum/show.html.erb” for more details.

For an example using d3.js (github.com/mbostock/d3) see: github.com/ncgr/lis_sequence_search

For detailed Redis installation instructions, follow the links below.

Quorum provides a simple Rails environment rake task for spawning Resque workers. To customize Resque workers by adding monitoring etc., follow the link below.

Quorum mounts Resque’s web interface by default via

mountResque::Server.new, :at=>"/quorum/resque"

in “config/routes.rb”. The line above is fine for development, however, in production it’s best to grant authenticated users access to “/quorum/resque”.

HTTP Basic Example: “config/initializers/resque_http_auth.rb”

Resque::Server.use(Rack::Auth::Basic) do|user, password|user=="resque"password=="secret"end

Devise Example: “config/routes.rb”

authenticate:userdomountResque::Server.new, :at=>"/quorum/resque"end

Devise plus Declarative Authorization Example: “config/routes.rb”

# Only superusers can access Resque's web interface.resque_constraint = lambdado|request|request.env["warden"].authenticate?&&request.env["warden"].user.role_symbols.include?(:superuser)
endconstraintsresque_constraintdomountResque::Server.new, :at=>"/quorum/resque"end

To customize Quorum flash messages, edit “config/locales/quorum.en.yml”.

github.com/ncgr/quorum/issues

  • Fork Quorum

  • Create a topic branch git checkout -b my_branch

  • Push to your branch git push origin my_branch

  • Create a pull request from your branch

  • Find your name added to the README under Contributors

  • Add GFF3 annotations to detailed Blast reports

  • Add link to download multiple Blast hit sequences in detailed report

  • Support Hmmer3

MIT License. Copyright NCGR ncgr.org

About

A flexible bioinformatics search tool.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
This repository was archived by the owner on Aug 19, 2023. It is now read-only.

Repository files navigation

A flexible bioinformatics search tool.

Quorum is a Rails 3.1 mountable engine that supports the following bioinformatics search tools.

Dependencies:

See the gem in action.

medplants.ncgr.org/quorum/jobs/new

Use the latest stable Rails release with Quorum.

geminstallquorum

After you install Quorum and add it to your Gemfile, run the generator.

railsgeneratequorum:install

The generator will create a directory in your application’s root path

quorum/

as well as the necessary config files to run and customize Quorum. You MUST customize “config/quorum_settings.yml” before using Quorum. See Remote Machine Setup below if you choose to execute Quorum remotely.

Migrate the database.

rake quorum:install:migrations
rake db:migrate

Follow these steps to safely upgrade Quorum.

  • Make a copy of “config/quorum_settings.yml”.

    cp config/quorum_settings.yml config/quorum_settings.yml.old

  • If you overrode Quorum’s styles and / or views, make a copy of the existing directories before upgrading.

    cp -R app/assets/stylesheets/quorum app/assets/stylesheets/quorum_oldcp -R app/views/quorum/jobs app/views/quorum/jobs_old

  • Run the install generator and answer “Yes” to all conflicts.

    rails generate quorum:install

  • Copy the old Search Database(s) to the newly generated “config/quorum_settings.yml” file.

  • Update the database migrations.

    rake quorum:install:migrations rake db:migrate

  • If applicable, override Quorum’s views, styles and images.

  • Update the remote machine(s).

Build your NCBI Blast+ database(s) using the rake task below.

rake quorum:blastdb:build

Arguments:

  • DIR= - path to {.tgz, .tar.gz, .tbz, .tar.bz2} files containing raw data. Separate multiple directories with a colon (:).

    DIR=/path/to/dir:/path/to/another/dir

  • TYPE= - type of Blast database to build {both, prot, nucl}. Defaults to both.

  • PROT_FILE_NAME= - name of the file containing protein data. Defaults to peptides.fa.

  • NUCL_FILE_NAME= - name of the file containing nucleotide data. Defaults to contigs.fa.

  • REBUILD_DB= - removes existing blast database(s) before building {true or false}. Defaults to false.

  • EMPTY= - skip makeblastdb and create necessary directories {true or false}. Defaults to false. Set this argument to true if you wish to create your own Blast database(s).

Example:

rake quorum:blastdb:build DIR=/path/to/dir:/path/to/another/dir TYPE=nucl \
NUCL_FILE_NAME=my_contigs.fa REBUILD_DB=true

Empty example:

rake quorum:blastdb:build EMPTY=true

For a full list of supported arguments.

rake-D

Don’t forget to update “config/quorum_settings.yml” with your newly created database(s).

Quorum provides a link to download a Blast hit sequence in the detailed report. For this process to work smoothly, the sequence identifier MUST be unique across ALL Blast databases.

Example: “example_blast_database/contigs.fa”

>my_unique_sequence_identifier_201201201327077953
ATGC...

“another_example_blast_database/contigs.fa”

>my_unique_sequence_identifier_201201201327078017
CGTA...

If the sequence identifiers are not unique across all Blast databases and you wish to remove the link to download a Blast hit sequence, follow the steps below.

  • Override Quorum’s views (see Customize Quorum below)

  • Comment out or remove the lines below in “app/views/quorum/jobs/templates/_blast_detailed_report_template.html.erb”

    <p class="small">
    <a id="download_sequence_{{= id }}"
    onclick="downloadSequence(<%= @jobs.id %>, {{= id }}, '{{= algo }}', this)">
    Download Sequence
    </a>
    </p>

Follow the steps below to execute Quorum remotely via Net::SSH.

  • Ensure your ActiveRecord Database adapter in “config/database.yml” is set to any supported adapter other than sqlite3.

  • Ensure your database host is set and accessible via the remote machine(s).

  • Ensure you have supplied the necessary information in “config/quorum_settings.yml” to execute Quorum remotely.

    blast:

    remote: true
    ssh_host: remote.machine.org
    ssh_user: remote_user

Net::SSH.start() optional params (net-ssh.github.com/ssh/v2/api/index.html)

ssh_options:
password: "secret"
port: 8888
  • Tar and compress quorum.

    tar -czvf quorum.tar.gz quorum/

  • Copy the newly created tarball to the remote machine.

    scp quorum.tar.gz <username>@<host>:/path/to/install

  • Expand the tarball on the remote machine.

    ssh <username>@<host>

    tar -xzvf quorum.tar.gz

  • Ensure Quorum script dependencies are added to the remote machine’s PATH. If the remote machine doesn’t have a .bashrc file, create one.

    touch /path/to/.bashrc

and add script dependencies to PATH.

echo "export PATH=/path/to/dependencies:$PATH" >> /path/to/.bashrc

To override Quorum’s default views, run the generator.

railsgeneratequorum:views

A copy of Quorum’s layouts and views can be found in your application under “app/views/layouts/quorum/” “app/views/quorum/”.

To override Quorum’s default styles, run the generator.

railsgeneratequorum:styles

A copy of Quorum’s styles can be found in your application under “app/assets/stylesheets/quorum/”. If your application has existing styles, it’s a good idea to remove

*= require_tree .

in “app/assets/stylesheets/application.css” and require your stylesheets individually.

To override Quorum’s default images, run the generator.

railsgeneratequorum:images

A copy of Quorum’s images can be found in your application under “app/assets/images/quorum/”.

Don’t like Quorum’s jQuery UI theme? Override it!

  • Override Quorum’s styles and images.

  • Roll your own jQuery UI theme. jqueryui.com/themeroller

  • Replace Quorum’s theme in “app/assets/{stylesheets:images}/quorum” with your own.

Override Quorum’s views and comment out any unwanted algorithms in “app/views/quorum/jobs/new.html.erb” and “app/views/quorum/jobs/show.html.erb”.

For example:

Remove Blastp in “app/views/quorum/jobs/new.html.erb”

<%# Search Algorithms %>
<%# Comment out an algorithm below to remove it from the form. %>
<%# blastn %>
<%= render :partial => "quorum/jobs/form/blastn_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# blastx %>
<%= render :partial => "quorum/jobs/form/blastx_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# tblastn %>
<%= render :partial => "quorum/jobs/form/tblastn_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# blastp %>
<% render :partial => "quorum/jobs/form/blastp_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# End Search Algorithms %>

Remove Blastp in “app/views/quorum/jobs/show.html.erb”

<div id="tabs">
<ul>
<li><a href="#tabs-1">Blastn</a></li>
<li><a href="#tabs-2">Blastx</a></li>
<li><a href="#tabs-3">Tblastn</a></li>
<%#
<li><a href="#tabs-4">Blastp</a></li>
%>
</ul>
<%# Search results per algorithm %>
<div id="tabs-1">
<h2>Blastn</h2>
<div id="blastn-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
<div id="tabs-2">
<h2>Blastx</h2>
<div id="blastx-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
<div id="tabs-3">
<h2>Tblastn</h2>
<div id="tblastn-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
<!--
<div id="tabs-4">
<h2>Blastp</h2>
<div id="blastp-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
-->
</div>

Override Quorum’s views and specify your own JavaScript callback function!

See “app/views/quorum/show.html.erb” for more details.

For an example using d3.js (github.com/mbostock/d3) see: github.com/ncgr/lis_sequence_search

For detailed Redis installation instructions, follow the links below.

Quorum provides a simple Rails environment rake task for spawning Resque workers. To customize Resque workers by adding monitoring etc., follow the link below.

Quorum mounts Resque’s web interface by default via

mountResque::Server.new, :at=>"/quorum/resque"

in “config/routes.rb”. The line above is fine for development, however, in production it’s best to grant authenticated users access to “/quorum/resque”.

HTTP Basic Example: “config/initializers/resque_http_auth.rb”

Resque::Server.use(Rack::Auth::Basic) do|user, password|user=="resque"password=="secret"end

Devise Example: “config/routes.rb”

authenticate:userdomountResque::Server.new, :at=>"/quorum/resque"end

Devise plus Declarative Authorization Example: “config/routes.rb”

# Only superusers can access Resque's web interface.resque_constraint = lambdado|request|request.env["warden"].authenticate?&&request.env["warden"].user.role_symbols.include?(:superuser)
endconstraintsresque_constraintdomountResque::Server.new, :at=>"/quorum/resque"end

To customize Quorum flash messages, edit “config/locales/quorum.en.yml”.

github.com/ncgr/quorum/issues

  • Fork Quorum

  • Create a topic branch git checkout -b my_branch

  • Push to your branch git push origin my_branch

  • Create a pull request from your branch

  • Find your name added to the README under Contributors

  • Add GFF3 annotations to detailed Blast reports

  • Add link to download multiple Blast hit sequences in detailed report

  • Support Hmmer3

MIT License. Copyright NCGR ncgr.org

About

A flexible bioinformatics search tool.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content
This repository was archived by the owner on Aug 19, 2023. It is now read-only.

Repository files navigation

A flexible bioinformatics search tool.

Quorum is a Rails 3.1 mountable engine that supports the following bioinformatics search tools.

Dependencies:

See the gem in action.

medplants.ncgr.org/quorum/jobs/new

Use the latest stable Rails release with Quorum.

geminstallquorum

After you install Quorum and add it to your Gemfile, run the generator.

railsgeneratequorum:install

The generator will create a directory in your application’s root path

quorum/

as well as the necessary config files to run and customize Quorum. You MUST customize “config/quorum_settings.yml” before using Quorum. See Remote Machine Setup below if you choose to execute Quorum remotely.

Migrate the database.

rake quorum:install:migrations
rake db:migrate

Follow these steps to safely upgrade Quorum.

  • Make a copy of “config/quorum_settings.yml”.

    cp config/quorum_settings.yml config/quorum_settings.yml.old

  • If you overrode Quorum’s styles and / or views, make a copy of the existing directories before upgrading.

    cp -R app/assets/stylesheets/quorum app/assets/stylesheets/quorum_oldcp -R app/views/quorum/jobs app/views/quorum/jobs_old

  • Run the install generator and answer “Yes” to all conflicts.

    rails generate quorum:install

  • Copy the old Search Database(s) to the newly generated “config/quorum_settings.yml” file.

  • Update the database migrations.

    rake quorum:install:migrations rake db:migrate

  • If applicable, override Quorum’s views, styles and images.

  • Update the remote machine(s).

Build your NCBI Blast+ database(s) using the rake task below.

rake quorum:blastdb:build

Arguments:

  • DIR= - path to {.tgz, .tar.gz, .tbz, .tar.bz2} files containing raw data. Separate multiple directories with a colon (:).

    DIR=/path/to/dir:/path/to/another/dir

  • TYPE= - type of Blast database to build {both, prot, nucl}. Defaults to both.

  • PROT_FILE_NAME= - name of the file containing protein data. Defaults to peptides.fa.

  • NUCL_FILE_NAME= - name of the file containing nucleotide data. Defaults to contigs.fa.

  • REBUILD_DB= - removes existing blast database(s) before building {true or false}. Defaults to false.

  • EMPTY= - skip makeblastdb and create necessary directories {true or false}. Defaults to false. Set this argument to true if you wish to create your own Blast database(s).

Example:

rake quorum:blastdb:build DIR=/path/to/dir:/path/to/another/dir TYPE=nucl \
NUCL_FILE_NAME=my_contigs.fa REBUILD_DB=true

Empty example:

rake quorum:blastdb:build EMPTY=true

For a full list of supported arguments.

rake-D

Don’t forget to update “config/quorum_settings.yml” with your newly created database(s).

Quorum provides a link to download a Blast hit sequence in the detailed report. For this process to work smoothly, the sequence identifier MUST be unique across ALL Blast databases.

Example: “example_blast_database/contigs.fa”

>my_unique_sequence_identifier_201201201327077953
ATGC...

“another_example_blast_database/contigs.fa”

>my_unique_sequence_identifier_201201201327078017
CGTA...

If the sequence identifiers are not unique across all Blast databases and you wish to remove the link to download a Blast hit sequence, follow the steps below.

  • Override Quorum’s views (see Customize Quorum below)

  • Comment out or remove the lines below in “app/views/quorum/jobs/templates/_blast_detailed_report_template.html.erb”

    <p class="small">
    <a id="download_sequence_{{= id }}"
    onclick="downloadSequence(<%= @jobs.id %>, {{= id }}, '{{= algo }}', this)">
    Download Sequence
    </a>
    </p>

Follow the steps below to execute Quorum remotely via Net::SSH.

  • Ensure your ActiveRecord Database adapter in “config/database.yml” is set to any supported adapter other than sqlite3.

  • Ensure your database host is set and accessible via the remote machine(s).

  • Ensure you have supplied the necessary information in “config/quorum_settings.yml” to execute Quorum remotely.

    blast:

    remote: true
    ssh_host: remote.machine.org
    ssh_user: remote_user

Net::SSH.start() optional params (net-ssh.github.com/ssh/v2/api/index.html)

ssh_options:
password: "secret"
port: 8888
  • Tar and compress quorum.

    tar -czvf quorum.tar.gz quorum/

  • Copy the newly created tarball to the remote machine.

    scp quorum.tar.gz <username>@<host>:/path/to/install

  • Expand the tarball on the remote machine.

    ssh <username>@<host>

    tar -xzvf quorum.tar.gz

  • Ensure Quorum script dependencies are added to the remote machine’s PATH. If the remote machine doesn’t have a .bashrc file, create one.

    touch /path/to/.bashrc

and add script dependencies to PATH.

echo "export PATH=/path/to/dependencies:$PATH" >> /path/to/.bashrc

To override Quorum’s default views, run the generator.

railsgeneratequorum:views

A copy of Quorum’s layouts and views can be found in your application under “app/views/layouts/quorum/” “app/views/quorum/”.

To override Quorum’s default styles, run the generator.

railsgeneratequorum:styles

A copy of Quorum’s styles can be found in your application under “app/assets/stylesheets/quorum/”. If your application has existing styles, it’s a good idea to remove

*= require_tree .

in “app/assets/stylesheets/application.css” and require your stylesheets individually.

To override Quorum’s default images, run the generator.

railsgeneratequorum:images

A copy of Quorum’s images can be found in your application under “app/assets/images/quorum/”.

Don’t like Quorum’s jQuery UI theme? Override it!

  • Override Quorum’s styles and images.

  • Roll your own jQuery UI theme. jqueryui.com/themeroller

  • Replace Quorum’s theme in “app/assets/{stylesheets:images}/quorum” with your own.

Override Quorum’s views and comment out any unwanted algorithms in “app/views/quorum/jobs/new.html.erb” and “app/views/quorum/jobs/show.html.erb”.

For example:

Remove Blastp in “app/views/quorum/jobs/new.html.erb”

<%# Search Algorithms %>
<%# Comment out an algorithm below to remove it from the form. %>
<%# blastn %>
<%= render :partial => "quorum/jobs/form/blastn_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# blastx %>
<%= render :partial => "quorum/jobs/form/blastx_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# tblastn %>
<%= render :partial => "quorum/jobs/form/tblastn_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# blastp %>
<% render :partial => "quorum/jobs/form/blastp_form", :locals => {
:f => f, :blast_dbs => @blast_dbs } %>
<%# End Search Algorithms %>

Remove Blastp in “app/views/quorum/jobs/show.html.erb”

<div id="tabs">
<ul>
<li><a href="#tabs-1">Blastn</a></li>
<li><a href="#tabs-2">Blastx</a></li>
<li><a href="#tabs-3">Tblastn</a></li>
<%#
<li><a href="#tabs-4">Blastp</a></li>
%>
</ul>
<%# Search results per algorithm %>
<div id="tabs-1">
<h2>Blastn</h2>
<div id="blastn-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
<div id="tabs-2">
<h2>Blastx</h2>
<div id="blastx-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
<div id="tabs-3">
<h2>Tblastn</h2>
<div id="tblastn-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
<!--
<div id="tabs-4">
<h2>Blastp</h2>
<div id="blastp-results">
Searching... <%= image_tag "quorum/loading.gif" %>
</div>
</div>
-->
</div>

Override Quorum’s views and specify your own JavaScript callback function!

See “app/views/quorum/show.html.erb” for more details.

For an example using d3.js (github.com/mbostock/d3) see: github.com/ncgr/lis_sequence_search

For detailed Redis installation instructions, follow the links below.

Quorum provides a simple Rails environment rake task for spawning Resque workers. To customize Resque workers by adding monitoring etc., follow the link below.

Quorum mounts Resque’s web interface by default via

mountResque::Server.new, :at=>"/quorum/resque"

in “config/routes.rb”. The line above is fine for development, however, in production it’s best to grant authenticated users access to “/quorum/resque”.

HTTP Basic Example: “config/initializers/resque_http_auth.rb”

Resque::Server.use(Rack::Auth::Basic) do|user, password|user=="resque"password=="secret"end

Devise Example: “config/routes.rb”

authenticate:userdomountResque::Server.new, :at=>"/quorum/resque"end

Devise plus Declarative Authorization Example: “config/routes.rb”

# Only superusers can access Resque's web interface.resque_constraint = lambdado|request|request.env["warden"].authenticate?&&request.env["warden"].user.role_symbols.include?(:superuser)
endconstraintsresque_constraintdomountResque::Server.new, :at=>"/quorum/resque"end

To customize Quorum flash messages, edit “config/locales/quorum.en.yml”.

github.com/ncgr/quorum/issues

  • Fork Quorum

  • Create a topic branch git checkout -b my_branch

  • Push to your branch git push origin my_branch

  • Create a pull request from your branch

  • Find your name added to the README under Contributors

  • Add GFF3 annotations to detailed Blast reports

  • Add link to download multiple Blast hit sequences in detailed report

  • Support Hmmer3

MIT License. Copyright NCGR ncgr.org

About

A flexible bioinformatics search tool.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages