GithubHelp home page GithubHelp logo

tripal / tripal_blast Goto Github PK

View Code? Open in Web Editor NEW
5.0 7.0 14.0 85.35 MB

Provides an user interface to BLAST on Tripal sites.

Home Page: https://tripal.github.io/tripal_blast/

PHP 82.13% CSS 5.32% JavaScript 1.74% Dockerfile 0.91% Twig 9.90%
tripal ncbi-blast integration hacktoberfest

tripal_blast's Introduction

alt tag

Tripal 4 (Drupal 10)

               _   _                 _____                 _                                  _
     /\       | | (_)               |  __ \               | |                                | |
    /  \   ___| |_ ___   _____      | |  | | _____   _____| | ___  _ __  _ __ ___   ___ _ __ | |_
   / /\ \ / __| __| \ \ / / _ \     | |  | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __|
  / ____ \ (__| |_| |\ V /  __/     | |__| |  __/\ V /  __/ | (_) | |_) | | | | | |  __/ | | | |_
 /_/    \_\___|\__|_| \_/ \___|     |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__|
                                                                  | |
                                                                  |_|

Compatibility

Target Drupal Version 10.2.x-dev

Tested on PostgreSQL 13 + PostgreSQL 16

Drupal 10.2.x 10.3.x
PHP 8.1 Grid81-102-Badge Grid81-103-Badge
PHP 8.2 Grid82-102-Badge Grid82-103-Badge
PHP 8.3 Grid83-102-Badge Grid83-103-Badge

Code Coverage

This project uses Code Climate to determine the quality of our codebase and the coverage of our test suite. Compatibility above is based on passing of this test suite.

Test Coverage

Maintainability

Current Timeline

Required for Tripal 4.alpha3 Release

  • Display suite / page work
  • Importers: Publications
  • Search (ElasticSearch + Views)

How to get involved!

This upgrade to Drupal 10 is a community effort. As such, we NEED YOUR HELP!

  • To get involved, please join our Tripal Slack and comment in the #core-dev channel.
    • Alternatively, feel free to contact Lacey-Anne Sanderson through Slack direct message.
    • We can use help both with programming, documentation, outreach and welcome all individuals from all backgrounds!
  • We prefer automated testing for all Pull Requests (PRs) and are happy to guide you through the process!
    • Just comment on the issue if you need help designing tests
    • If you need help implementing tests see our documentation
  • If more documentation would be helpful, please create an issue here and we'll add it.

Documentation

Documentation for Tripal 4 has begun on ReadtheDocs.

Tripal Docker

Tripal Docker is currently focused on Development and Automated Testing. There will be a production focused Tripal Docker soon and if you're interested in helping or providing tips -please join us on our Slack channel!

For more information about how to use our fully functional development docker, see our documentation on ReadtheDocs!

tripal_blast's People

Contributors

almasaeed2010 avatar bradfordcondon avatar btski avatar deepakbitragunta avatar ekcannon avatar laceysanderson avatar njbooher avatar prateekgta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

tripal_blast's Issues

Tripal Blast doesn't show up in the Extensions listing

When you go to Tripal Admin > Extensions, you get an "Access denied" if Tripal Blast is the only extension module installed. If other extension modules are installed then you may see a listing on this page but it will not include the Tripal Blast link.

This is due to tighter access permissions in Drupal 10.2 which ensures you do not see the listing page if you don't have access to any child pages. There is currently some issue with the permissions on the Tripal Blast administration pages that are causing this.

Current Work-around

The Tripal Blast configuration is still available despite this issue. You just need to access it using the URL directly SITE/admin/tripal/extension/tripal_blast. This is where you add your BLAST databases in order to have them show up in the UI drop-down for target database.

illegal blast configurations allowed to be submitted

blastn -max_target_seqs 50 -evalue 0.001 -word_size 11 -gapopen 5 -gapextend 2 -penalty -5 -reward 4 -culling_limit 0

the blast job will fail with

Error: Gap existence and extension values 5 and 2 are not supported for substitution scores 4 and -5
6 and 5 are supported existence and extension values
5 and 5 are supported existence and extension values
4 and 5 are supported existence and extension values
3 and 5 are supported existence and extension values
12 and 8 are supported existence and extension values
Any values more stringent than 12 and 8 are supported

on the server, but the user will not know that their job failed because of the options they chose.

I can make a PR that will prevent this configuration at validation

Trimming of input sequence

If you accidentally leave a carriage return after the sequence that gets cut-and-pasted into the form, you get an error message indicating that the sequence is not properly formatted. I'm sure it makes some people want to pull their hair out trying to figure out what's wrong with the sequence.

Path to local db

Hi,

which path should I provide to the local database? (currently it is a small database on localhost)
localhost/chado does not work, obviously. I want to be able to blast against this database.

I am getting error messages, guess they are connected to the wrong path:
Notice: Undefined variable: blastdb_with_suffix in blast_ui_per_blast_program_form_submit() (line 502 of /var/www/html/sites/all/modules/tripal_blast/includes/blast_ui.form_per_program.inc).
Notice: Undefined variable: db_file_id in blast_ui_per_blast_program_form() (line 254 of /var/www/html/sites/all/modules/tripal_blast/includes/blast_ui.form_per_program.inc).

WSOD for large XML file

There is a known problem that if a user has a large blast result XML file (exact size depends on your web server) they might end with a memory exhausted WSOD. This is due to the XML reader we use reading the entire file into memory.

We have mostly mitigated this issue by checking the number of hits using grep and then only reading the XML if it is below a static threshold (currently 500). However, there appear to be some edge-cases that this still happens in and of course, if your particular server has issues with even 500 hits then this will still be a problem.

Furthermore, since we simply just don't read the XML we can't even show you a subset of hits or a summary which would be more useful in the case of large resultsets then simply forcing the user to download TSV and go from there.

In the future I would like to move to a stream-based XML reader (http://php.net/manual/en/class.xmlreader.php) to completely remove this issue.

Upgrade to Tripal 4 + Drupal 9

Work on this has been begun by @reynoldtan on branch 9.x-2.x. We have a PR open #81 for testing of the current upgrade and would appreciate feedback on this issue or the PR if you are interested in using this module for Tripal 4.

THIS ISSUE SHOULD NOT BE CLOSED UNTIL

  • Tripal 4 stable is released
  • 9.x-2.x branch is made the default branch
  • all documentation has been upgraded to the Drupal 9 / Tripal 4 / Tripal BLAST 2.x

setting up blast functionality

hi there!
I'm trying to make the blast module work,
by now I've done:

  • making the database as specified in docs
  • configured the 'database' as a content added
  • configured the Tripal BLAST User Interface, via Tripal >> Extensions

apparently everything is fine. The thing is.. what to do next to see somewhere the BLAST tool page?
it must be biting me, but I cant find the way.

Thanks a lot

Make Tripal Gold-rated module.

Documentation

Description

We are applying for the Gold-level badge for Tripal Blast as we meet the following requirements. I have provided examples below to make review easier.

Repository: https://github.com/tripal/tripal_blast/

Bronze

Requirement Status
Has a public release. Yes
Should install on a Tripal site appropriate for the versions it supports. Yes
Defines any custom tables or materialized views in the install file (if applicable). Yes
Adds any needed controlled vocabulary terms in the install file (Tripal3). Not Applicable (No cvterms needed.)
Provides Installation and admin instructions README.md (or RTD). Yes
Has a license (distributed with module). Yes

Silver

Requirement Status
Follows basic Drupal Coding standards; specifically, code format and API documentation. Yes
Uses Tripal API functions. Specifically, it should use the Chado Query API for querying chado (if using chado as the storage system). Yes (e.g. chado.db for linkouts)
Tripal Jobs API for long running processes. Yes
TripalField class to add data to pages (Tripal3). Not Applicable
Provides ways to customize the module (e.g. drush options, field/formatter settings, admin UI). Yes (e.g. admin UI, custom linkouts hook)
Latest releases should follow Drupal naming best practices. e.g. first release for Drupal 7 should be: 7.x-1.x. Yes (e.g. 7.x-1.3)

Gold

Requirement Status
Extensive documentation for the module (similar to Tripal User’s Guide). Yes, RTD
Unit testing is implemented using PHPUnit with the TripalTestSuite or something similar. Yes, TripalTestSuite
Continuous integration is setup (e.g. such as with TravisCI). Yes, TravisCI
Imports data via Tripal’s importer class (Tripal3). Not Applicable (doesn't import data)
Tripal 3 fields are Fully compatible with web services. Not Applicable (no TripalFields)
The elementInfo function is fully implemented. Not Applicable (no TripalFields)
The query and queryOrder functions fully implemented. Not Applicable (no TripalFields)
Web Services uses Tripal’s Web Service Classes (Tripal3). Not Applicable (no WebServices)
Code sniffing and testing coverage reports (optional but encouraged). Yes
Drupal.org vetted release (optional but encouraged). Yes

NOTE: This PR was made using the following template

PHP8 Deprecation warnings

Pull request #94

I updated the version of this module to 7.x-1.3 and under PHP8 the following warnings are shown immediately after upgrade

Deprecated function: Required parameter $scores follows optional parameter $acc in require_once() (line 24 of .../sites/all/modules/tripal_blast/blast_ui.module).
Deprecated function: Required parameter $hits follows optional parameter $acc in require_once() (line 24 of .../sites/all/modules/tripal_blast/blast_ui.module). 
Deprecated function: Required parameter $tsize follows optional parameter $acc in require_once() (line 24 of .../sites/all/modules/tripal_blast/blast_ui.module). 
Deprecated function: Required parameter $qsize follows optional parameter $acc in require_once() (line 24 of .../sites/all/modules/tripal_blast/blast_ui.module). 
Deprecated function: Required parameter $name follows optional parameter $acc in require_once() (line 24 of .../sites/all/modules/tripal_blast/blast_ui.module).

This was not introduced in this version, so I am not exactly sure why it wasn't showing up before, but regardless the fix is simple.

Steps to reproduce

  1. Use PHP8.x
  2. Update to current version of module 7.x-1.3 (In my case this was a mistake, I overwrote the dev version 😱 )
  3. Go to /update.php?op=info to see these warnings.

Error - "File is not accessible"

Hi!
I've been having the following error when running BLAST jobs in the command line, and any help is much appreciated. Thanks in advance!

Executing tblastn

Query: /tmp/2019Sep17_125610_query.fasta
Database: /home/ubi/corkoak/corkoak_blastdb/corkoak_nucldb
Results File: sites/default/files/tripal/tripal_blast/2019Sep17_125610.blast.asn
Options:
    max_target_seqs: 500
    evalue: 0.001
    word_size: 3
    gapopen: 11
    gapextend: 1
    matrix: BLOSUM62

Executing the following BLAST command:
'/home/ubi/software/ncbi-blast-2.8.1+/bin/tblastn' -query '/tmp/2019Sep17_125610_query.fasta' -db '/home/ubi/corkoak/corkoak_blastdb/corkoak_nucldb' -out 'sites/default/files/tripal/tripal_blast/2019Sep17_125610.blast.asn' -outfmt=11 -'max_target_seqs' '500' -'evalue' '0.001' -'word_size' '3' -'gapopen' '11' -'gapextend' '1' -'matrix' 'BLOSUM62' -num_threads '1'
Command line argument error: Argument "query". File is not accessible:  `/tmp/2019Sep17_125610_query.fasta'

Generating additional download formats...
    XML
        Executing '/home/ubi/software/ncbi-blast-2.8.1+/bin/blast_formatter' -archive 'sites/default/files/tripal/tripal_blast/2019Sep17_125610.blast.asn' -outfmt 5 -out 'sites/default/files/tripal/tripal_blast/2019Sep17_125610.blast.xml'

Command line argument error: Argument "query". File is not accessible: `/tmp/2019Sep17_125610_query.fasta'
ERROR (BLAST_UI): Unable to convert BLAST ASN.1 archive to XML (sites/default/files/tripal/tripal_blast/2019Sep17_125610.blast.asn => sites/default/files/tripal/tripal_blast/2019Sep17_125610.blast.xml).
[site http://corkoakdb.org] [TRIPAL ERROR] [BLAST_UI] Unable to convert BLAST ASN.1 archive to XML (sites/default/files/tripal/tripal_blast/2019Sep17_125610.blast.asn => sites/default/files/tripal/tripal_blast/2019Sep17_125610.blast.xml).
    Tab-delimited
        Executing '/home/ubi/software/ncbi-blast-2.8.1+/bin/blast_formatter' -archive 'sites/default/files/tripal/tripal_blast/2019Sep17_125610.blast.asn' -outfmt 7 -out 'sites/default/files/tripal/tripal_blast/2019Sep17_125610.blast.tsv'

Command line argument error: Argument "query". File is not accessible: `/tmp/2019Sep17_125610_query.fasta'
WARNING (BLAST_UI): Unable to convert BLAST ASN.1 archive to Tabular Output (sites/default/files/tripal/tripal_blast/2019Sep17_125610.blast.asn => sites/default/files/tripal/tripal_blast/2019Sep17_125610.blast.tsv).
[site http://corkoakdb.org] [TRIPAL WARNING] [BLAST_UI] Unable to convert BLAST ASN.1 archive to Tabular Output (sites/default/files/tripal/tripal_blast/2019Sep17_125610.blast.asn => sites/default/files/tripal/tripal_blast/2019Sep17_125610.blast.tsv).
    GFF
fopen(sites/default/files/tripal/tripal_blast/2019Sep17_125610.blast.tsv): failed to open stream: No such file or directory blast_ui.api.inc:764                                            [warning]
Unable to open tsv file!Drush command terminated abnormally due to an unrecoverable error.

CViTjs warning on settings page.

We missed a warning when creating the CViTjs functionality. As reported by @oklonova:

A warning on top of Tripal BLAST UI settings page:

Warning: file_get_contents(/cvit.conf): failed to open stream: No such file or directory in blast_ui_get_cvit_conf_text() (line 891 of /var/www/html/sites/all/modules/tripal_blast/api/blast_ui.api.inc).

I do not need genome views, as it is so far a protein-only database. CViTjs is not enabled. I wonder why it is there.

This is likely due to https://github.com/tripal/tripal_blast/blob/7.x-1.x/includes/blast_ui.admin.inc#L189 when CViTjs is not in the libraries folder.

Unable to set regex for linkouts

I don't know how this used to work. It doesn't appear to be possible to turn on the "FASTA header format" section.

When a new BLAST database node is started, the default linkout type is 'none', so the "FASTA header format" section is turned off, since 'none' doesn't require a regex. Changing the linkout type to, for example, 'Generic', does not activate the "FASTA header format" section. Saving the linkout type 'Generic' without setting the FASTA header information results in an invalid blastdb record which then has to be repaired by hand.

This problem is recent. We last built BLAST database nodes about two-three months ago with no problems.

Issues with online docs

The online documentation for has outdated formatting instructions for the most recent blast++. Also, if you don't set aside enough memory for your site you get an error message when loading blast results that simply says the page can't be loaded, there is no meaningful message in the Drupal logs. I came across this looking in the server logs. We recommend 2GB of RAM for Tripal but if the user skipped that they will get this message. It might be good to just add a blurb about making sure you have enough memory configured for the site in the docs.

tblastn possible display coordinate error. Minus frame??

I need to look at this a bit more closely, but a user just reported this to me today.

This is using tblastn:

This is the display of two hsps:
screen shot 2018-02-26 at 2 22 01 pm

Here is the output in the html blast output:

 Score = 138 bits (308),  Expect(2) = 2e-58, Method: Compositional matrix adjust.
 Identities = 62/64 (97%), Positives = 62/64 (97%), Gaps = 0/64 (0%)
 Frame = -2

Query  47       FSAGPRVCLGENLARMELFLFFTSLLQRFQFYWPDPASKPNLEPKYQFTQAPQPYKMGVR  106
                 S GPRVCLGENLARMELFLFFTSLLQRFQFYWPDPASKPNLEPKYQFTQAPQPYKMGVR
Sbjct  1996088  LSPGPRVCLGENLARMELFLFFTSLLQRFQFYWPDPASKPNLEPKYQFTQAPQPYKMGVR  1995909

Query  107      PRNS  110
                PRNS
Sbjct  1995908  PRNS  1995897


 Score = 110 bits (244),  Expect(2) = 2e-58, Method: Compositional matrix adjust.
 Identities = 50/50 (100%), Positives = 50/50 (100%), Gaps = 0/50 (0%)
 Frame = -2

Query  1        PQGIIILPNFTSVLFDESQWESPHEFNPGHFLDSSGKFVKPDAFLVFSAG  50
                PQGIIILPNFTSVLFDESQWESPHEFNPGHFLDSSGKFVKPDAFLVFSAG
Sbjct  1996358  PQGIIILPNFTSVLFDESQWESPHEFNPGHFLDSSGKFVKPDAFLVFSAG  1996209```

The subject coordinates are not displayed the same on the results page as they are reported in the html output. It appears that the the correct start coordinate has been swapped with the displayed end coord, but I don't know what has happened to the correct end coord. Could this have something to do with the this being in the minus frame?

Sofia

Modify queue priority of BLAST jobs

Is it possible to add the ability to modify the queue priority of a BLAST job?

Perhaps it would be better if that is a system-wide functionality for all the Tripal queued processes?

Thank you!

Unable to install via Composer

Composer is the recommended method of installation of extension modules in Drupal 10.

We do not yet have a composer.json file in this module nor do we have a page on packagist to allow site admin to install this module via composer 🙈

The current docs show a work around to this:
image

And this issue is here to remind us to configure this module to work with composer and to update the docs once that is done.

error loading file and segmentation fault

Hi, here running tripal 3.1,
when running blastn, via daemon jobs, I get this error in the site,

image

and this message in the terminal..

segmentation fault (core dumped)

any help? Thx a lot!

FASTA not validated properly

Quoted from Drupal.org, Issue filed by Nate Henry

Problem/Motivation

The field that where the FASTA sequence is entered does not:

  • Check for a space after the ">" and the id
  • Wrong letters are acceptable (regex only checks first letter)
  • Does not require description line (not sure if this is required)

Proposed resolution

I rewrote the function validate_fasta_sequence with the following design constraints.

  • A description line must be included.
  • A single ">" will be accepted as a description line. The function header comment (in blast_ui.api.inc) states that both the identifier and description are optional
  • If an identifier is given, there must be no space between ">" and the identifier. Spaces after the identifier are acceptable until the end of the line.
  • The amino acid/ and nucleic acids sequences will be checked. Spaces are allowed. Numbers are not allowed.
  • A blank line is not allowed (as stated in by NCBI).
  • The validation should work on more than one description/sequence pair
<?php
function validate_fasta_sequence($type, $sequence) {
  $fastaVerRegEx = '';
  if ($type == 'nucleotide') {
    $fastaVerRegEx = '/^[acgntuACGNTU\n\r\s]*$/';
  } elseif ($type == 'protein') {
    $fastaVerRegEx = '/^[acgturykmswbdhvnxACGTURYKMSWBDHVNX\*\-\n\r\s]*$/';
  }
  $fastaSeqMatch = array();
  $fastaIdRegEx = '/^[\s\n\r\t]*>((?!\s)(.+?)*|)[\n\r]/';
  $fastaSeqRegExSingle = '/[\n\r].*/s';
  $fastaSeqRegEx = '/[\n\r](.*?|[\n\r])>/s';
  $seqPart = $sequence;

  while(TRUE) {
    // Check for valid description line and make sure there are no blank lines
    if(preg_match($fastaIdRegEx,$seqPart,$temp) && !(preg_match('/[\n]\s*[\n]/',$seqPart))) {
      // One sequence to process
      if (!(preg_match($fastaSeqRegEx,$seqPart,$fastaSeqMatch))) {
        preg_match($fastaSeqRegExSingle,$seqPart,$fastaSeqMatch);
        $fastaSeqMatch = implode("", $fastaSeqMatch);
        if(preg_match($fastaVerRegEx,$fastaSeqMatch)) {
          return FALSE;
        } else {
          return TRUE;
        }
      }
      // Multiple sequences to process
      if (preg_match($fastaSeqRegEx,$seqPart,$fastaSeqMatch)) {
        if(preg_match($fastaVerRegEx,$fastaSeqMatch[1])) {
          // Remove top description line and sequence
          $firstNewLine = strpos($seqPart,'>',1);
          $seqPart = substr($seqPart,$firstNewLine);
        } else {
          return TRUE;
        }
      }
    } else {
      return TRUE;
    }
  }
}

Remaining tasks

The regex expression used to check for a blank line /[\n]\s*[\n]/ does not include the line escape character. For some reason, /[\n\r]\s*[\n\r]/ did not work. Since this function is not called to parse an uploaded FASTA file, this may not matter.

Included is a patch that can be run from the tripal_blast directory.

Option to download hit sequence

Sometimes it's helpful to get the hit sequence rather than just the hit locations. This might be doable via blast_formatter by creating a custom table output which includes qseq (aligned part of query sequence) and sseq (aligned part of subject sequence) in the table download.

can't access blast settings

Trying to access admin/tripal/extension/tripal_blast_analysis/configuration

otice: Undefined index: tripal_analysis_blast_settings_form in drupal_retrieve_form() (line 807 of /Users/chet/UTK/tripal/includes/form.inc).
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'tripal_analysis_blast_settings_form' not found or invalid function name in drupal_retrieve_form() (line 842 of /Users/chet/UTK/tripal/includes/form.inc)
```

Progressive Display Controls

I feel that the blast output controls are not clear, they are inconsistent with a lot of current conventions. Currently,
▼ means can be expanded
▲ means has been expanded (can be closed)
example below at "Before"

I propose changing them to those used by Windows 10+, and in fact used at their design site https://learn.microsoft.com/en-us/windows/apps/design/ on the left side.
windows10

˃ means can be expanded
˅ means has been expanded (can be closed)

Before
blast-before

After
blast-new

Current Documentation

We NEED current documentation for the upgraded version of this module!

I started this with PR #103 and am now creating this issue to document the process.

That PR adds a skeleton of documentation for this module (more a plan then actual documentation at this point) using mkdocs and the Material Theme.

How to develop these docs:

cd docs
docker build --tag trpblast:docs ./
docker run --rm --volume=$(pwd):/tripal_blast trpblast:docs mkdocs build
open site/index.html

To see something like the following:
image

And the current navigation is:

  • Home
  • Installation
    • Adding to an existing site
    • Demonstration via Docker
  • Guiding your Users
    • Submitting a BLAST request
    • Finding previous requests
    • BLAST result page
  • Site Administration
    • Configuring BLAST
    • Managing BLAST databases
    • Running jobs automatically

Undefined variable

I commented out the following line of code after noticing the following error:
Notice: Undefined variable: db_file_id in blast_ui_per_blast_program_form() (line 254 of /var/www/html/sites/all/modules/tripal_blast/includes/blast_ui.form_per_program.inc).

obnoxious behavior if > 500 results

A user was confused because their blast results had over 500 results, and therefore no results were displayed.

statonlab/hardwoods_site#199

After some fiddling I discovered that you can set the max target sequences in the advanced options to return 500 or fewer sequences (see below).

Rather than return no results, why not return the first 500 results and display a warning that there are more results?

default blast parameters: error, 500+ sequences

screen shot 2018-02-27 at 11 58 01 am

max target = 50

screen shot 2018-02-27 at 12 00 07 pm

edit:
Also, the error message reads

We have provided the result files for Download at the top of this page; however, we suggest you re-submit your query using a more stringent e-value (i.e. a smaller number).

However, no download link is provided. Note that the link is provided if < 500 entries

Trimming database path

Hello!

We recently encountered an issue where the blast database won't be found if the path contained a space at the beginning or the end.

For exmple, the path "/var/www/html/sites/default/files/bdb/quercus_robur/Qrob_PM1N_CDS_aa_20161004.fa" is treated differently that "/var/www/html/sites/default/files/bdb/quercus_robur/Qrob_PM1N_CDS_aa_20161004.fa "

Where the second one has a space at the end.

A simple trim($path) should fix this.

Thanks!

Undefined array key "cvitjs_location" in blast_ui

When I try to enable "CViTjs" via Home -> Admin -> Tripal -> Extensions. I am getting the following message

Warning: Undefined array key "cvitjs_location" in blast_ui_admin_form_submit() (line 329 of /var/www/html/teak-wood-genes-drupal7/sites/all/modules/tripal_blast/includes/blast_ui.admin.inc).

My cvitjs folder and the data folder exist as follows
Screenshot from 2024-04-10 16-16-05

I am also adding the file
blast_ui.admin.inc.txt

Blast UI jobs do not start

Hi,

Blast UI jobs do not start automatically, I have to do it manually in the job list or via the command line.
"Results list" appears, but there is only the message "Your BLAST has been registered and will be started shortly. This page will automatically refresh". The page refreshes without any results.

For installation, I followed the instructions on the project page. Everything worked perfectly until now (I was away for a month).
Do you have a hint where to look?

Drupal 7.61
Drush Daemon API 7-2.3
Tripal 2
Tripal Jobs Daemon 7-1

Best regards,
Olga

Errors with Core_Plugin_ProcessManager

Hi.
Yesterday Blast module was working great. This morning, no blast jobs will run, trpjob-daemon dies, and I get these errors

PHP Notice: Undefined property: Core_Plugin_ProcessManager::$daemon in /var/www/html/sites/all/libraries/PHP-Daemon/Core/Plugin/ProcessManager.php on line 60 pid 31698
PHP Fatal error:  Call to a member function is() on a non-object in /var/www/html/sites/all/libraries/PHP-Daemon/Core/Plugin/ProcessManager.php on line 60

Not unexpectedly, I also get a bunch of other errors also due to the asn file not being created.

I can run the same requested blast job on the command line, so I know the input fasta is okay and the database is okay, and that blast can still make the asn files. I still have lots of free space on the server.

I did not make any changes between yesterday and today. I have not made any changes in over a week.

Thank you,
Sofia

Tripal blast not run smoothly when using 'drush trp-run-jobs' command line

I have built a database platform based on tripal.
I created a test user
In the test user front-end, you can upload the query and target file of blast, so that the task submission is successful.

1 When I am in the management interface login an administrator
image

Click execute to execute the task, and the user will also see the results of the blast.

image

2 But when using Linux command line, I typed :

drush trp-run-jobs --username=nd343 --root=/var/www/drupal_2023_1011/web --parallel=1

When executing this command, it will be displayed

Executing the following BLAST command:
'/usr/bin/blastn' -query '/tmp/Garlic.chloroplast.genome.fasta' -db '/tmp/Garlic.chloroplast.genome_0.fasta' -out 'sites/default/files/tripal/tripal_blast/2023Oct31_112218.blast.asn' -outfmt=11 -'max_target_seqs' '500' -'evalue' '0.001' -'word_size' '11' -'gapopen' '5' -'gapextend' '2' -'penalty' '-2' -'reward' '1' -num_threads '12'
Command line argument error: Argument "query". File is not accessible: `/tmp/Garlic.chloroplast.genome.fasta'........

3 when using Linux command line, I typed
trpjob-daemon start
to automatically execute the blast job and display the same error.

Executing the following BLAST command:
'/usr/bin/blastn' -query '/tmp/Garlic.chloroplast.genome.fasta' -db '/tmp/Garlic.chloroplast.genome_0.fasta' -out 'sites/default/files/tripal/tripal_blast/2023Oct31_112218.blast.asn' -outfmt=11 -'max_target_seqs' '500' -'evalue' '0.001' -'word_size' '11' -'gapopen' '5' -'gapextend' '2' -'penalty' '-2' -'reward' '1' -num_threads '12'
Command line argument error: Argument "query". File is not accessible: `/tmp/Garlic.chloroplast.genome.fasta'........

I think it's an issue with file permissions.
perhaps I need Change PrivateTmp=true to PrivateTmp=false, But I don't know which file I need to modify.

Overly aggressive regex to remove database extension in api/blast_ui.api.inc

At line 202 of api/blast_ui.api.inc there is an overly aggressive regex

  // Strip the extension off the BLAST target
  $database = preg_replace("/(.*)\.[pn]\w\w$/", '$1', $database);

which I think should be removed. It caused my database with a name of the format xxxxxx.pep
(i.e. xxxxxx.pep.psq, xxxxxx.pep.pin, etc.) to have the .pep stripped off and tripal_blast died ungracefully. It seems to also fail if the extension is included in the admin page, so I am not sure that this regex is doing what was obviously intended. Workaround is to not name databases with a pattern that matches this regex. e.g. "xxxxxx.peptide"

Blast Overview Javascript issues

There are javascript issues on the Tripal Blast UI overview.

In the following screenshot,

  • the orange rectangle shows that the hidden/expandable information links are broken and stuck in open state
  • the orange oval shows that the Olivero theme is broken by issues on this page.
    BlastOverviewJSIssues

Specifically, the following issues are shown in the developer console:
DeveloperConsole

max_target_seqs parameter

I wanted to draw attention to the fact that the max_target_seqs parameter is poorly documented by NCBI, leading to misuse. Here are some relevant articles:

https://academic.oup.com/bioinformatics/article/35/9/1613/5106166, https://blastedbio.blogspot.com/2018/11/blast-max-alignment-limits-repartee-one.html

Would it be worthwhile to add additional information regarding the parameter's functionality, similar to the e-Value field? Or perhaps change the hover over text displayed?

query range/culling limit

This advanced option was removed ( see PR #33), but we might want it back some day.
For example:



  /*eksc: remove this as it is either the same as max_target_seqs, or miss-implemented
         as culling_limit, which is something else entirely
    $form['ALG']['GParam']['qRange'] = array(
      '#type' => 'textfield',
      '#title' => t('Max matches in a query range'),
      '#default_value' => $defaults['qRange'],
      '#size' => 12,
      '#maxlength' => 20,
      '#description' => t('Limit the number of matches to a query range. This option is useful if many strong matches to one part of a query may prevent BLAST from presenting weaker matches to another part of the query.'),
    );
  */

Its available as an advanced option on ncbi's blast instance as follows:

screen shot 2018-05-01 at 1 36 19 pm

Automated Testing

With #35 I have begun creating PHPUnit tests for this module using the TripalTestSuite. 🎉

This issue is a place to discuss where to start and any other philosophy related to tests :-)

First up, I asked for guidance in #35: specifically,

I would love input on where to go from here! :-) Should I

  1. continue on with more complete testing of the blastdb node (used as the template in the blast form)
  2. test each API function (api/blast_ui.api.inc) independently
  3. focus on the blast form everyone uses ;-p

@bradfordcondon replied with

What would be cool is if you installed blast on the travis environment and somehow thought of a smart way to loop through all the option combos presented in the blastn form and submitted a blast job with them, ensuring no errors. That has some tricky things though (some options are AJAX-dependent).

Otherwise try to focus on the "end points" of the module. So API functions that are true API functions (we expect them to be called by anything else) are great places to start.

Any other input? @ekcannon? I'm tempted to go with the ambitious suggestion by @bradfordcondon since I feel this would be the most useful testing but I also don't want to bite off more then I can chew ;-p

tblastn error running in knowpulse

I ran the amino acid translation of https://www.ncbi.nlm.nih.gov/nuccore/XM_003602825.2 in a tblastn against Glycine Max: DFCI indicies version 16 through knowpulse and got the following error:

"We encountered an error and are unable to load your BLAST results."

The blast command was:

tblastn -max_target_seqs 20000 -evalue 0.001 -word_size 3 -gapopen 7 -gapextend 2 -culling_limit 0 -matrix PAM30

I'm wondering if space inclusion in the sequence lines is causing an error after the sequence is passed to the backend. This could also be related to culling_limit 0 depending on blast version.

Thank you, knowpulse looks really neat

configure BLAST linkout to allow arrows tracks

Hello,

I was wondering if there's a way to change the styling of the generated Jbrowse blast track.

./includes/blast_ui.linkouts.inc:  $jbrowse_query['addTracks'] = 'addTracks=[{"label":"blast","key":"BLAST Result","type":"JBrowse/View/Track/HTMLFeatures","store":"url"}]';

We've added arrows for orientation of our JBrowse tracks (for our features), and want to do the same for the blast result. We've done it for our tracks by setting the type to "Canvas Feature" and setting the style properties from there.

Does the module already provide a way to do this?

Cheers

B

PHP8 catches mismatched parameter names

Pull #96

Under PHP8, a parameter passed to a function with a different name than expected causes an error

Calling: run_BLAST_tripal_job(blastp, /tmp/2023Feb11_094532_query.fasta, .../filename.peptide, sites/default/files/tripal_blast/2023Feb11_094532.blast, Array)
WD php: Error: Unknown named parameter $output_filename in TripalJob->run() (line 341 of                                         [error]
/var/www/2020-02-18/drupal-7.69/sites/all/modules/tripal/tripal/includes/TripalJob.inc).

Expected parameters in the function definition:
function run_BLAST_tripal_job($program, $query, $database, $output_filestub, $options, $job_id = NULL)

but in file includes/blast_ui.form_per_program.inc line 551
'output_filename' => $output_filestub,

A simple fix

Tripal BLAST UI undefined variable db_file_id

Original Issue by @oklonova posted here: tripal/tripal#414

  • Tripal Version: 7-2.1
  • Drupal Version: 7.59
  • Tripal BLAST UI 7-1.3

Hi,

I have installed BLAST UI module and followed the instructions in the README file: installed NCBI BLAST+, downloaded a database from NCBI using update_blastdb.pl script, and added it as a node to blast against, proving the path.
The path to the ncbi-blast+/bin is added in the settings.

The NCBI BLAST+ is at /home/user/ncbi-blast-2.7.1+ (I am having a test Tripal web site running locally).
The database is in sites/default/files/blastdb.

Whenever I want to use this module, I get the following message:

"Notice: Undefined variable: db_file_id in blast_ui_per_blast_program_form() (line 254 of /var/www/html/sites/all/modules/tripal_blast/includes/blast_ui.form_per_program.inc)",
even if I am just checking the box to show an example sequence and upload a fasta file to blast against (without using any database).

Does this have anything to do with the placement of the NCBI and the database files?

I also wonder how I can blast against my local Tripal/Chado database (provide this option in the list of databases that appear under "Select a Dataset" button).

Any help or hint would be very much appreciated.

view permission for blast database node?

Hi all,
dont know if this issue will stay relevant for Tripal 3 version.

We have a problem where the blast databases are being indexed by elasticsearch. Tripal ES indexes all nodes that an anonymous user would have access to. These nodes arent really fit for end user consumption (http://160.36.205.61:8095/node/1976613).

Is it possible to change the view permissions for these nodes? It seems like permissions are only defined for CRUD

formatdb or makeblastdb?

Hi, I am interested in making a database from fasta files (one with proteins, other with nucleotides -mRNAs). I'm reading the docs, and its adviced to do with formatdb command. My question is.. which is the difference between doing it with formatdb and makeblastdb for this purpose? will this affect in the functioning of the module somehow?
Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.