Re: chado question BLAST

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

Re: chado question BLAST

Krzysztof Lubieniecki
Hi Scott,
As you suggested I start to use gmod-schema mailing list.
The data were loaded as GFF3 according "chado best practice - results from BLAST" , we do not use Tripal.
I was able to display blast results on Gbrowse but the problem I still have is the label - I can display only uniquenames. I can pull out appropriate name related to the uniquename using mysql query (table joining) but it does not work if I do it as a subroutine in Gbrowse.conf file.

Thanks

Krzysztof






Hi Krzysztof,

First let me suggest that we take this conversation to the Chado mailing list, [hidden email] . Subsequent replies can trim Lincoln off the cc list and and add the schema mailing list.

Do you knowhow the data were loaded? A typical way to load the data would be via GFF (where the blast reports were converted to GFF3). Another way would be via Tripal, but it doesn't like ASalBase uses Tripal. If you used GFF, the cigar string typically isn't saved, so the exact alignment generally can't be recovered, only information about the individual HSPs can; it depends on what was originally stored from the GFF.

Another question is, how do you want to display it? If it's in the context of GBrowse, the Chado GBrowse adaptor should recreate the alignments in the gbrowse_details page (it doesn't use the alignment from blast but rather does an on the fly local alignment between the match feature and the contig).

Scott




------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema
Reply | Threaded
Open this post in threaded view
|

Re: chado question BLAST

Scott Cain
Hi Krzysztof,

What are you trying to set the name to?  What callback have you tried in the configuration file that hasn't worked?

Scott



On Tue, May 14, 2013 at 1:24 AM, Krzysztof Lubieniecki <[hidden email]> wrote:
Hi Scott,
As you suggested I start to use gmod-schema mailing list.
The data were loaded as GFF3 according "chado best practice - results from BLAST" , we do not use Tripal.
I was able to display blast results on Gbrowse but the problem I still have is the label - I can display only uniquenames. I can pull out appropriate name related to the uniquename using mysql query (table joining) but it does not work if I do it as a subroutine in Gbrowse.conf file.

Thanks

Krzysztof






Hi Krzysztof,

First let me suggest that we take this conversation to the Chado mailing list, [hidden email] . Subsequent replies can trim Lincoln off the cc list and and add the schema mailing list.

Do you knowhow the data were loaded? A typical way to load the data would be via GFF (where the blast reports were converted to GFF3). Another way would be via Tripal, but it doesn't like ASalBase uses Tripal. If you used GFF, the cigar string typically isn't saved, so the exact alignment generally can't be recovered, only information about the individual HSPs can; it depends on what was originally stored from the GFF.

Another question is, how do you want to display it? If it's in the context of GBrowse, the Chado GBrowse adaptor should recreate the alignments in the gbrowse_details page (it doesn't use the alignment from blast but rather does an on the fly local alignment between the match feature and the contig).

Scott




------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema



--
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   scott at scottcain dot net
GMOD Coordinator (http://gmod.org/)                     216-392-3087
Ontario Institute for Cancer Research

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema
Reply | Threaded
Open this post in threaded view
|

Re: chado question BLAST

Krzysztof Lubieniecki
Hi Scott,
Our "name" column for the blast results in the feature table does not have any values and needs to be referenced to another feature_id through featureloc table to retrieve actual name.
To resolve the problem we tried to use the following subroutine in *.conf file:

[BAC ends]
feature        = match:blastn
glyph          = segments
no_arrows      = 1
base           = 0
label          = sub {

                      my $feature = shift;
                      my $feature_id = $feature;
                      my $dbh = DBI->connect('DBI:Pg:dbname=asalbasev0.7');
                      my $sql = qq(SELECT f.name from feature f JOIN featureloc floc ON (f.feature_id=floc.srcfeature_id) JOIN cvterm t on (f.type_id=t.cvterm_id) JOIN feature f2 ON (floc.feature_id=f2.feature_id) WHERE floc.feature_id=? AND t.name='BAC_end';);
                      my $sqlQuery = $dbh->prepare($sql);
               
                      my $rv = $sqlQuery->execute($feature);
                      my @bacNames = $rv->fetchrow_array();
                      my $bacName = $bacNames[0];
                      return $bacName;
                }


but did not work

Thanks

Krzysztof



----- Original Message -----
From: "Scott Cain" <[hidden email]>
To: "Krzysztof Lubieniecki" <[hidden email]>
Cc: "GMOD Schema/Chado List" <[hidden email]>
Sent: Wednesday, May 15, 2013 7:12:56 AM
Subject: Re: [Gmod-schema] chado question BLAST





Hi Krzysztof,

What are you trying to set the name to? What callback have you tried in the configuration file that hasn't worked?


Scott





On Tue, May 14, 2013 at 1:24 AM, Krzysztof Lubieniecki < [hidden email] > wrote:


Hi Scott,
As you suggested I start to use gmod-schema mailing list.
The data were loaded as GFF3 according "chado best practice - results from BLAST" , we do not use Tripal.
I was able to display blast results on Gbrowse but the problem I still have is the label - I can display only uniquenames. I can pull out appropriate name related to the uniquename using mysql query (table joining) but it does not work if I do it as a subroutine in Gbrowse.conf file.

Thanks

Krzysztof






Hi Krzysztof,

First let me suggest that we take this conversation to the Chado mailing list, [hidden email] . Subsequent replies can trim Lincoln off the cc list and and add the schema mailing list.

Do you knowhow the data were loaded? A typical way to load the data would be via GFF (where the blast reports were converted to GFF3). Another way would be via Tripal, but it doesn't like ASalBase uses Tripal. If you used GFF, the cigar string typically isn't saved, so the exact alignment generally can't be recovered, only information about the individual HSPs can; it depends on what was originally stored from the GFF.

Another question is, how do you want to display it? If it's in the context of GBrowse, the Chado GBrowse adaptor should recreate the alignments in the gbrowse_details page (it doesn't use the alignment from blast but rather does an on the fly local alignment between the match feature and the contig).

Scott




------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d 
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema 



--
------------------------------------------------------------------------
Scott Cain, Ph. D. scott at scottcain dot net
GMOD Coordinator ( http://gmod.org/ ) 216-392-3087
Ontario Institute for Cancer Research

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema
Reply | Threaded
Open this post in threaded view
|

Re: chado question BLAST

Scott Cain
Hi Krzysztof,

There is something about security and how callbacks are evaluated that I can only hazily remember, but I think if you add

  require DBI;
  DBI->import;

Your callback might work.  I don't know about the structure of your data, but I also wonder if the Feature target method might help, as in:

  $name = $feature->target->display_name;

I feel like that should work.

Scott



On Wed, May 15, 2013 at 7:13 PM, Krzysztof Lubieniecki <[hidden email]> wrote:
Hi Scott,
Our "name" column for the blast results in the feature table does not have any values and needs to be referenced to another feature_id through featureloc table to retrieve actual name.
To resolve the problem we tried to use the following subroutine in *.conf file:

[BAC ends]
feature        = match:blastn
glyph          = segments
no_arrows      = 1
base           = 0
label          = sub {

                      my $feature = shift;
                      my $feature_id = $feature;
                      my $dbh = DBI->connect('DBI:Pg:dbname=asalbasev0.7');
                      my $sql = qq(SELECT f.name from feature f JOIN featureloc floc ON (f.feature_id=floc.srcfeature_id) JOIN cvterm t on (f.type_id=t.cvterm_id) JOIN feature f2 ON (floc.feature_id=f2.feature_id) WHERE floc.feature_id=? AND t.name='BAC_end';);
                      my $sqlQuery = $dbh->prepare($sql);

                      my $rv = $sqlQuery->execute($feature);
                      my @bacNames = $rv->fetchrow_array();
                      my $bacName = $bacNames[0];
                      return $bacName;
                }


but did not work

Thanks

Krzysztof



----- Original Message -----
From: "Scott Cain" <[hidden email]>
To: "Krzysztof Lubieniecki" <[hidden email]>
Cc: "GMOD Schema/Chado List" <[hidden email]>
Sent: Wednesday, May 15, 2013 7:12:56 AM
Subject: Re: [Gmod-schema] chado question BLAST





Hi Krzysztof,

What are you trying to set the name to? What callback have you tried in the configuration file that hasn't worked?


Scott





On Tue, May 14, 2013 at 1:24 AM, Krzysztof Lubieniecki < [hidden email] > wrote:


Hi Scott,
As you suggested I start to use gmod-schema mailing list.
The data were loaded as GFF3 according "chado best practice - results from BLAST" , we do not use Tripal.
I was able to display blast results on Gbrowse but the problem I still have is the label - I can display only uniquenames. I can pull out appropriate name related to the uniquename using mysql query (table joining) but it does not work if I do it as a subroutine in Gbrowse.conf file.

Thanks

Krzysztof






Hi Krzysztof,

First let me suggest that we take this conversation to the Chado mailing list, [hidden email] . Subsequent replies can trim Lincoln off the cc list and and add the schema mailing list.

Do you knowhow the data were loaded? A typical way to load the data would be via GFF (where the blast reports were converted to GFF3). Another way would be via Tripal, but it doesn't like ASalBase uses Tripal. If you used GFF, the cigar string typically isn't saved, so the exact alignment generally can't be recovered, only information about the individual HSPs can; it depends on what was originally stored from the GFF.

Another question is, how do you want to display it? If it's in the context of GBrowse, the Chado GBrowse adaptor should recreate the alignments in the gbrowse_details page (it doesn't use the alignment from blast but rather does an on the fly local alignment between the match feature and the contig).

Scott




------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema



--
------------------------------------------------------------------------
Scott Cain, Ph. D. scott at scottcain dot net
GMOD Coordinator ( http://gmod.org/ ) <a href="tel:216-392-3087" value="+12163923087">216-392-3087
Ontario Institute for Cancer Research



--
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   scott at scottcain dot net
GMOD Coordinator (http://gmod.org/)                     216-392-3087
Ontario Institute for Cancer Research

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema
Reply | Threaded
Open this post in threaded view
|

Re: chado question BLAST

Krzysztof Lubieniecki
Hi Scott,

Thanks a lot.
I tried both of your suggestion and unfortunately they did not work.
I have no idea what else I can do.

Krzysztof


----- Original Message -----
From: "Scott Cain" <[hidden email]>
To: "Krzysztof Lubieniecki" <[hidden email]>
Cc: "GMOD Schema/Chado List" <[hidden email]>
Sent: Thursday, May 16, 2013 11:01:36 AM
Subject: Re: [Gmod-schema] chado question BLAST









Hi Krzysztof,

There is something about security and how callbacks are evaluated that I can only hazily remember, but I think if you add

require DBI;
DBI->import;

Your callback might work. I don't know about the structure of your data, but I also wonder if the Feature target method might help, as in:

$name = $feature->target->display_name;

I feel like that should work.

Scott





On Wed, May 15, 2013 at 7:13 PM, Krzysztof Lubieniecki < [hidden email] > wrote:


Hi Scott,
Our "name" column for the blast results in the feature table does not have any values and needs to be referenced to another feature_id through featureloc table to retrieve actual name.
To resolve the problem we tried to use the following subroutine in *.conf file:

[BAC ends]
feature = match:blastn
glyph = segments
no_arrows = 1
base = 0
label = sub {

my $feature = shift;
my $feature_id = $feature;
my $dbh = DBI->connect('DBI:Pg:dbname=asalbasev0.7');
my $sql = qq(SELECT f.name from feature f JOIN featureloc floc ON (f.feature_id=floc.srcfeature_id) JOIN cvterm t on (f.type_id=t.cvterm_id) JOIN feature f2 ON (floc.feature_id=f2.feature_id) WHERE floc.feature_id=? AND t.name ='BAC_end';);
my $sqlQuery = $dbh->prepare($sql);

my $rv = $sqlQuery->execute($feature);
my @bacNames = $rv->fetchrow_array();
my $bacName = $bacNames[0];
return $bacName;
}


but did not work

Thanks

Krzysztof





----- Original Message -----
From: "Scott Cain" < [hidden email] >
To: "Krzysztof Lubieniecki" < [hidden email] >
Cc: "GMOD Schema/Chado List" < [hidden email] >
Sent: Wednesday, May 15, 2013 7:12:56 AM
Subject: Re: [Gmod-schema] chado question BLAST





Hi Krzysztof,

What are you trying to set the name to? What callback have you tried in the configuration file that hasn't worked?


Scott





On Tue, May 14, 2013 at 1:24 AM, Krzysztof Lubieniecki < [hidden email] > wrote:


Hi Scott,
As you suggested I start to use gmod-schema mailing list.
The data were loaded as GFF3 according "chado best practice - results from BLAST" , we do not use Tripal.
I was able to display blast results on Gbrowse but the problem I still have is the label - I can display only uniquenames. I can pull out appropriate name related to the uniquename using mysql query (table joining) but it does not work if I do it as a subroutine in Gbrowse.conf file.

Thanks

Krzysztof






Hi Krzysztof,

First let me suggest that we take this conversation to the Chado mailing list, [hidden email] . Subsequent replies can trim Lincoln off the cc list and and add the schema mailing list.

Do you knowhow the data were loaded? A typical way to load the data would be via GFF (where the blast reports were converted to GFF3). Another way would be via Tripal, but it doesn't like ASalBase uses Tripal. If you used GFF, the cigar string typically isn't saved, so the exact alignment generally can't be recovered, only information about the individual HSPs can; it depends on what was originally stored from the GFF.

Another question is, how do you want to display it? If it's in the context of GBrowse, the Chado GBrowse adaptor should recreate the alignments in the gbrowse_details page (it doesn't use the alignment from blast but rather does an on the fly local alignment between the match feature and the contig).

Scott




------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d 
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema 



--
------------------------------------------------------------------------
Scott Cain, Ph. D. scott at scottcain dot net
GMOD Coordinator ( http://gmod.org/ ) 216-392-3087


Ontario Institute for Cancer Research



--
------------------------------------------------------------------------
Scott Cain, Ph. D. scott at scottcain dot net
GMOD Coordinator ( http://gmod.org/ ) 216-392-3087
Ontario Institute for Cancer Research

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema
Reply | Threaded
Open this post in threaded view
|

Re: chado question BLAST

Scott Cain
Hi Krzysztof,

I should have looked at your callback a little closer; first there's this line:

  my $feature_id = $feature;

Since you want the feature_id in your query, this should use the Feature object's feature method, so the line should be

  my $feature_id = $feature->feature_id;

Also, about the using the target method: that should really work; can you tell us more about how the features were loaded (ie, did you convert blast results to GFF and load it)?  If you did use GFF, can you show us a sample?

Scott



On Tue, May 21, 2013 at 1:38 PM, Krzysztof Lubieniecki <[hidden email]> wrote:
Hi Scott,

Thanks a lot.
I tried both of your suggestion and unfortunately they did not work.
I have no idea what else I can do.

Krzysztof


----- Original Message -----
From: "Scott Cain" <[hidden email]>
To: "Krzysztof Lubieniecki" <[hidden email]>
Cc: "GMOD Schema/Chado List" <[hidden email]>
Sent: Thursday, May 16, 2013 11:01:36 AM
Subject: Re: [Gmod-schema] chado question BLAST









Hi Krzysztof,

There is something about security and how callbacks are evaluated that I can only hazily remember, but I think if you add

require DBI;
DBI->import;

Your callback might work. I don't know about the structure of your data, but I also wonder if the Feature target method might help, as in:

$name = $feature->target->display_name;

I feel like that should work.

Scott





On Wed, May 15, 2013 at 7:13 PM, Krzysztof Lubieniecki < [hidden email] > wrote:


Hi Scott,
Our "name" column for the blast results in the feature table does not have any values and needs to be referenced to another feature_id through featureloc table to retrieve actual name.
To resolve the problem we tried to use the following subroutine in *.conf file:

[BAC ends]
feature = match:blastn
glyph = segments
no_arrows = 1
base = 0
label = sub {

my $feature = shift;
my $feature_id = $feature;
my $dbh = DBI->connect('DBI:Pg:dbname=asalbasev0.7');
my $sql = qq(SELECT f.name from feature f JOIN featureloc floc ON (f.feature_id=floc.srcfeature_id) JOIN cvterm t on (f.type_id=t.cvterm_id) JOIN feature f2 ON (floc.feature_id=f2.feature_id) WHERE floc.feature_id=? AND t.name ='BAC_end';);
my $sqlQuery = $dbh->prepare($sql);

my $rv = $sqlQuery->execute($feature);
my @bacNames = $rv->fetchrow_array();
my $bacName = $bacNames[0];
return $bacName;
}


but did not work

Thanks

Krzysztof





----- Original Message -----
From: "Scott Cain" < [hidden email] >
To: "Krzysztof Lubieniecki" < [hidden email] >
Cc: "GMOD Schema/Chado List" < [hidden email] >
Sent: Wednesday, May 15, 2013 7:12:56 AM
Subject: Re: [Gmod-schema] chado question BLAST





Hi Krzysztof,

What are you trying to set the name to? What callback have you tried in the configuration file that hasn't worked?


Scott





On Tue, May 14, 2013 at 1:24 AM, Krzysztof Lubieniecki < [hidden email] > wrote:


Hi Scott,
As you suggested I start to use gmod-schema mailing list.
The data were loaded as GFF3 according "chado best practice - results from BLAST" , we do not use Tripal.
I was able to display blast results on Gbrowse but the problem I still have is the label - I can display only uniquenames. I can pull out appropriate name related to the uniquename using mysql query (table joining) but it does not work if I do it as a subroutine in Gbrowse.conf file.

Thanks

Krzysztof






Hi Krzysztof,

First let me suggest that we take this conversation to the Chado mailing list, [hidden email] . Subsequent replies can trim Lincoln off the cc list and and add the schema mailing list.

Do you knowhow the data were loaded? A typical way to load the data would be via GFF (where the blast reports were converted to GFF3). Another way would be via Tripal, but it doesn't like ASalBase uses Tripal. If you used GFF, the cigar string typically isn't saved, so the exact alignment generally can't be recovered, only information about the individual HSPs can; it depends on what was originally stored from the GFF.

Another question is, how do you want to display it? If it's in the context of GBrowse, the Chado GBrowse adaptor should recreate the alignments in the gbrowse_details page (it doesn't use the alignment from blast but rather does an on the fly local alignment between the match feature and the contig).

Scott




------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema



--
------------------------------------------------------------------------
Scott Cain, Ph. D. scott at scottcain dot net
GMOD Coordinator ( http://gmod.org/ ) <a href="tel:216-392-3087" value="+12163923087">216-392-3087


Ontario Institute for Cancer Research



--
------------------------------------------------------------------------
Scott Cain, Ph. D. scott at scottcain dot net
GMOD Coordinator ( http://gmod.org/ ) <a href="tel:216-392-3087" value="+12163923087">216-392-3087
Ontario Institute for Cancer Research



--
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   scott at scottcain dot net
GMOD Coordinator (http://gmod.org/)                     216-392-3087
Ontario Institute for Cancer Research

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema