How to use custom ontologies e.g. as node references?

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

How to use custom ontologies e.g. as node references?

Michael Dondrup
Hi,

I have made a custom ontology with the developmental stages of my organism in an OBO file and uploaded it
into tripal; I am able to see my 'Sea Lice Developmental Ontology' in the CV terms listing in Tripal Administration.

Now, I would like to use this ontology somehow, but I was unable to figure out how to. Eg. optimally I would like to use it
as a Drupal 'Taxonomy' or via the content construction kit as a Node reference. As an example I have created
a custom content type "RNAi" for annotation of experiments, and added (among others) node reference  fields:
- Organism
-  Feature
where these are textfields using autocompletion using the drupal database content.

I was unable though to use any CV/Ontology though. Is it at all possible, and where are the imported CV terms (e.g. GO) used otherwise?

My apologies if I have missed some documentation; on the other hand, if this functionality is lacking
I would be glad (and hopefully able) to help and
implement it. Just give me a pointer where to start, please. I appreciate your input.

Kind regards

Michael Dondrup
Postdoctoral fellow
The Sea Lice Research Centre
Department of Informatics
University of Bergen
Thormøhlensgate 55, N-5008 Bergen,
Norway

Michael Dondrup
Postdoctoral researcher
The Sea Lice Research Centre
Department of Informatics
University of Bergen
Thormøhlensgate 55, N-5008 Bergen,
Norway


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gmod-tripal mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal
Reply | Threaded
Open this post in threaded view
|

Re: How to use custom ontologies e.g. as node references?

Stephen Ficklin-2
Hi Michael,

Just a few questions for you before I can give a proper answer. Are you
trying to create RNAi feature pages (e.g. miRNA, siRNA) with details of
the developmental stage where the feature is active?   If so, how are
you loading the RNAi features into the database? in the feature table of
Chado?  You mention that you created an RNAi content type.  What fields
do you have in that content type?

Thanks,
Stephen



On 8/24/2012 7:41 AM, Michael Dondrup wrote:

> Hi,
>
> I have made a custom ontology with the developmental stages of my organism in an OBO file and uploaded it
> into tripal; I am able to see my 'Sea Lice Developmental Ontology' in the CV terms listing in Tripal Administration.
>
> Now, I would like to use this ontology somehow, but I was unable to figure out how to. Eg. optimally I would like to use it
> as a Drupal 'Taxonomy' or via the content construction kit as a Node reference. As an example I have created
> a custom content type "RNAi" for annotation of experiments, and added (among others) node reference  fields:
> - Organism
> -  Feature
> where these are textfields using autocompletion using the drupal database content.
>
> I was unable though to use any CV/Ontology though. Is it at all possible, and where are the imported CV terms (e.g. GO) used otherwise?
>
> My apologies if I have missed some documentation; on the other hand, if this functionality is lacking
> I would be glad (and hopefully able) to help and
> implement it. Just give me a pointer where to start, please. I appreciate your input.
>
> Kind regards
>
> Michael Dondrup
> Postdoctoral fellow
> The Sea Lice Research Centre
> Department of Informatics
> University of Bergen
> Thormøhlensgate 55, N-5008 Bergen,
> Norway
>
> Michael Dondrup
> Postdoctoral researcher
> The Sea Lice Research Centre
> Department of Informatics
> University of Bergen
> Thormøhlensgate 55, N-5008 Bergen,
> Norway
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gmod-tripal mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gmod-tripal


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gmod-tripal mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal
Reply | Threaded
Open this post in threaded view
|

Re: How to use custom ontologies e.g. as node references?

Michael Dondrup
Hi Stephen,

thank you very much for your response. I will try to describe our use-case with a bit more details then, sorry
for the lengthy post.

We are working with the newly sequenced genome of the atlantic Salmon Louse (Lepeophtheirus salmonis).
I have loaded the genome sequence and draft annotation from GFF files into a local tripal (which will become a public "LiceBase" in the future).
The biologists are now performing RNAi experiments to study gene knockdown, and the idea is that our
system should support them with archiving the resulting data and linking it to the genomic features in the database.

The data consist of (mostly microscope) images which are used to study the phenotype. Currently, I am in the process of
prototyping RNAi and image support, and therefore the fields are not carved in stone yet, there might be more in the future;
we have created a custom data type with the following fields:

- Image file (TIFF)
- Preview Image (web image)
- Phenotype CV (a drupal taxonomy, with autocomplete text field, for phenotype annotation, not a phenotype ontology yet)
- Gene symbol (text)
- Gene id (node reference to chado 'feature' page, autocomplete text)
- Organism (node reference to chado 'organism' page, autocomplete text)
- phenotype description (free text)
- external dbref (Title and URL)

We should also add
- forward primer sequence
- reverse primer sequence

Further, I have made a 'View' in drupal for this data type, which allows for queries.

At this point, the developmental stage ontology comes into play, your assumption was correct, I wish to describe the stage of the
individual in the image, providing a text field with auto-completion, backed by the ontology. And that is the point where I require some help.

It might well be the case that this prototype is good enough for our purpose; I found tripal very convenient, and up to now
we didn't need to code anything. We could also share our experience, if anybody is interested, and we like to hear about any
related projects.  However, I would also be willing to code a module to be integrated into tripal, if required.
I am new to php but decent perl programmer, so I believe it's feasible to switch.


Michael


On Aug 24, 2012, at 2:57 PM, Stephen Ficklin wrote:

> Hi Michael,
>
> Just a few questions for you before I can give a proper answer. Are you
> trying to create RNAi feature pages (e.g. miRNA, siRNA) with details of
> the developmental stage where the feature is active?   If so, how are
> you loading the RNAi features into the database? in the feature table of
> Chado?  You mention that you created an RNAi content type.  What fields
> do you have in that content type?
>
> Thanks,
> Stephen
>
>
>
> On 8/24/2012 7:41 AM, Michael Dondrup wrote:
>> Hi,
>>
>> I have made a custom ontology with the developmental stages of my organism in an OBO file and uploaded it
>> into tripal; I am able to see my 'Sea Lice Developmental Ontology' in the CV terms listing in Tripal Administration.
>>
>> Now, I would like to use this ontology somehow, but I was unable to figure out how to. Eg. optimally I would like to use it
>> as a Drupal 'Taxonomy' or via the content construction kit as a Node reference. As an example I have created
>> a custom content type "RNAi" for annotation of experiments, and added (among others) node reference  fields:
>> - Organism
>> -  Feature
>> where these are textfields using autocompletion using the drupal database content.
>>
>> I was unable though to use any CV/Ontology though. Is it at all possible, and where are the imported CV terms (e.g. GO) used otherwise?
>>
>> My apologies if I have missed some documentation; on the other hand, if this functionality is lacking
>> I would be glad (and hopefully able) to help and
>> implement it. Just give me a pointer where to start, please. I appreciate your input.
>>
>> Kind regards
>>
>> Michael Dondrup
>> Postdoctoral fellow
>> The Sea Lice Research Centre
>> Department of Informatics
>> University of Bergen
>> Thormøhlensgate 55, N-5008 Bergen,
>> Norway
>>
>> Michael Dondrup
>> Postdoctoral researcher
>> The Sea Lice Research Centre
>> Department of Informatics
>> University of Bergen
>> Thormøhlensgate 55, N-5008 Bergen,
>> Norway
>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Gmod-tripal mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gmod-tripal
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gmod-tripal mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gmod-tripal


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gmod-tripal mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal
Reply | Threaded
Open this post in threaded view
|

Re: How to use custom ontologies e.g. as node references?

Stephen Ficklin-2
Hi Michael,

I'm CC'ing my response to the gmod-tripal-devel (developers) mailing
list as well.  You may want to consider joining that list too if you
decide to go down the route of writing your own code
(https://lists.sourceforge.net/lists/listinfo/gmod-tripal-devel).

My compliments on leveraging Drupal to create your pages!  Sounds like
you've done a great job.

It sounds as though you are using custom content types and adding CCK
fields to that content type.   In answer to your question, if you wanted
to use an ontology stored in Chado as a CCK field for your new content
type, you would need to write some code to create a custom CCK field.  
The custom CCK field could query the Chado schema to provide terms from
your developmental stage ontology.  I have never done this.  But, doing
a quick search  I found this documentation that explains it:
http://www.lullabot.com/articles/creating-custom-cck-fields.

One thing you may want to consider is that by using custom content types
and CCK your scientific data will not be housed in the Chado database
but rather in Drupal tables.  Specifically tables provided by the CCK
module.   By not having your data in Chado it makes it
difficult/impossible for other Chado-enabled tools to access this
information.   We may be working in features for Tripal in the future
that would allow two or more Tripal sites to share Chado data.  So,
having your scientific data in Chado would mean you could share it.  If
you don't anticipate ever needing other tools that would access this
type of data then you may be just fine.  My recommendation would be to
keep all of your options open and to try to keep non-scientific data in
the Drupal tables (e.g. community and site information) and scientific
data in Chado.

If you go the route of trying to store your data into Chado rather than
in CCK fields then I would suggest you send an email to the gmod-schema
mailing list or some folks on our mailing list may jump in and offer
assistance on what tables you should use for your data.  Just with the
limited understanding that I have I think you would need to store your
individuals for which you have images in the stock table; store your
images in the eimage table; your RNAi and primer sequences in the
feature table; your organism in the organism table and then use the
foreign key constraints to link them together.  Your developmental stage
and phenotype ontologies can be loaded in the cv, cvterm, dbxref, db
tables (if you use the OBO loader then they are getting stored that way
already).

Tripal supports viewing stocks (your individuals), and features (RNAi
features) already.  But I would imaging you would have to do some coding
to get everything to look the way you want.  For example, you want
phenotype images to appear on your "stock" pages. My guess is you
probably can do everything you want by editing and customizing the
existing templates for stocks and features and you don't need to write a
custom module.  The Tripal API will help you get access to any Chado
data you need within the templates.

Stephen


On 8/27/2012 4:57 AM, Michael Dondrup wrote:

> Hi Stephen,
>
> thank you very much for your response. I will try to describe our use-case with a bit more details then, sorry
> for the lengthy post.
>
> We are working with the newly sequenced genome of the atlantic Salmon Louse (Lepeophtheirus salmonis).
> I have loaded the genome sequence and draft annotation from GFF files into a local tripal (which will become a public "LiceBase" in the future).
> The biologists are now performing RNAi experiments to study gene knockdown, and the idea is that our
> system should support them with archiving the resulting data and linking it to the genomic features in the database.
>
> The data consist of (mostly microscope) images which are used to study the phenotype. Currently, I am in the process of
> prototyping RNAi and image support, and therefore the fields are not carved in stone yet, there might be more in the future;
> we have created a custom data type with the following fields:
>
> - Image file (TIFF)
> - Preview Image (web image)
> - Phenotype CV (a drupal taxonomy, with autocomplete text field, for phenotype annotation, not a phenotype ontology yet)
> - Gene symbol (text)
> - Gene id (node reference to chado 'feature' page, autocomplete text)
> - Organism (node reference to chado 'organism' page, autocomplete text)
> - phenotype description (free text)
> - external dbref (Title and URL)
>
> We should also add
> - forward primer sequence
> - reverse primer sequence
>
> Further, I have made a 'View' in drupal for this data type, which allows for queries.
>
> At this point, the developmental stage ontology comes into play, your assumption was correct, I wish to describe the stage of the
> individual in the image, providing a text field with auto-completion, backed by the ontology. And that is the point where I require some help.
>
> It might well be the case that this prototype is good enough for our purpose; I found tripal very convenient, and up to now
> we didn't need to code anything. We could also share our experience, if anybody is interested, and we like to hear about any
> related projects.  However, I would also be willing to code a module to be integrated into tripal, if required.
> I am new to php but decent perl programmer, so I believe it's feasible to switch.
>
>
> Michael
>
>
> On Aug 24, 2012, at 2:57 PM, Stephen Ficklin wrote:
>
>> Hi Michael,
>>
>> Just a few questions for you before I can give a proper answer. Are you
>> trying to create RNAi feature pages (e.g. miRNA, siRNA) with details of
>> the developmental stage where the feature is active?   If so, how are
>> you loading the RNAi features into the database? in the feature table of
>> Chado?  You mention that you created an RNAi content type.  What fields
>> do you have in that content type?
>>
>> Thanks,
>> Stephen
>>
>>
>>
>> On 8/24/2012 7:41 AM, Michael Dondrup wrote:
>>> Hi,
>>>
>>> I have made a custom ontology with the developmental stages of my organism in an OBO file and uploaded it
>>> into tripal; I am able to see my 'Sea Lice Developmental Ontology' in the CV terms listing in Tripal Administration.
>>>
>>> Now, I would like to use this ontology somehow, but I was unable to figure out how to. Eg. optimally I would like to use it
>>> as a Drupal 'Taxonomy' or via the content construction kit as a Node reference. As an example I have created
>>> a custom content type "RNAi" for annotation of experiments, and added (among others) node reference  fields:
>>> - Organism
>>> -  Feature
>>> where these are textfields using autocompletion using the drupal database content.
>>>
>>> I was unable though to use any CV/Ontology though. Is it at all possible, and where are the imported CV terms (e.g. GO) used otherwise?
>>>
>>> My apologies if I have missed some documentation; on the other hand, if this functionality is lacking
>>> I would be glad (and hopefully able) to help and
>>> implement it. Just give me a pointer where to start, please. I appreciate your input.
>>>
>>> Kind regards
>>>
>>> Michael Dondrup
>>> Postdoctoral fellow
>>> The Sea Lice Research Centre
>>> Department of Informatics
>>> University of Bergen
>>> Thormøhlensgate 55, N-5008 Bergen,
>>> Norway
>>>
>>> Michael Dondrup
>>> Postdoctoral researcher
>>> The Sea Lice Research Centre
>>> Department of Informatics
>>> University of Bergen
>>> Thormøhlensgate 55, N-5008 Bergen,
>>> Norway
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Live Security Virtual Conference
>>> Exclusive live event will cover all the ways today's security and
>>> threat landscape has changed and how IT managers can respond. Discussions
>>> will include endpoint security, mobile security and the latest in malware
>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>> _______________________________________________
>>> Gmod-tripal mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/gmod-tripal
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Gmod-tripal mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gmod-tripal


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gmod-tripal mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal
Reply | Threaded
Open this post in threaded view
|

Re: How to use custom ontologies e.g. as node references?

Michael Dondrup
Dear Stephen,

Thank you very much for your extensive and very helpful answer. I have contemplated a bit and I think I will in fact go for
option creating a new CCK content type, for now. This mainly because it looks like less coding than the other solution
and this functionality might be useful elsewhere. Given that our experiments are already running, I prefer a quick first approach to
get the data stored in a somewhat organized way.

We might try to tackle developing a full blown RNAi module later, but I am not sure yet if have the capacity to do this. Holding
all scientific data in chado is the way to go for the future, I agree. However, we have to replicate the annotation data between
collaborators, but not all will be allowed or want to see all the experimental content immediately.
The second solution will therefore require a bit more effort and infrastructure in data replication between labs, such that data separation
by CCK might become a positive side-effect for now.

I will report back, as soon as we have some results or get stuck.

Michael

On Aug 28, 2012, at 5:34 PM, Stephen Ficklin wrote:

> Hi Michael,
>
> I'm CC'ing my response to the gmod-tripal-devel (developers) mailing list as well.  You may want to consider joining that list too if you decide to go down the route of writing your own code (https://lists.sourceforge.net/lists/listinfo/gmod-tripal-devel).
>
> My compliments on leveraging Drupal to create your pages!  Sounds like you've done a great job.
>
> It sounds as though you are using custom content types and adding CCK fields to that content type.   In answer to your question, if you wanted to use an ontology stored in Chado as a CCK field for your new content type, you would need to write some code to create a custom CCK field.   The custom CCK field could query the Chado schema to provide terms from your developmental stage ontology.  I have never done this.  But, doing a quick search  I found this documentation that explains it: http://www.lullabot.com/articles/creating-custom-cck-fields.
>
> One thing you may want to consider is that by using custom content types and CCK your scientific data will not be housed in the Chado database but rather in Drupal tables.  Specifically tables provided by the CCK module.   By not having your data in Chado it makes it difficult/impossible for other Chado-enabled tools to access this information.   We may be working in features for Tripal in the future that would allow two or more Tripal sites to share Chado data.  So, having your scientific data in Chado would mean you could share it.  If you don't anticipate ever needing other tools that would access this type of data then you may be just fine.  My recommendation would be to keep all of your options open and to try to keep non-scientific data in the Drupal tables (e.g. community and site information) and scientific data in Chado.
>
> If you go the route of trying to store your data into Chado rather than in CCK fields then I would suggest you send an email to the gmod-schema mailing list or some folks on our mailing list may jump in and offer assistance on what tables you should use for your data.  Just with the limited understanding that I have I think you would need to store your individuals for which you have images in the stock table; store your images in the eimage table; your RNAi and primer sequences in the feature table; your organism in the organism table and then use the foreign key constraints to link them together.  Your developmental stage and phenotype ontologies can be loaded in the cv, cvterm, dbxref, db tables (if you use the OBO loader then they are getting stored that way already).
>
> Tripal supports viewing stocks (your individuals), and features (RNAi features) already.  But I would imaging you would have to do some coding to get everything to look the way you want.  For example, you want phenotype images to appear on your "stock" pages. My guess is you probably can do everything you want by editing and customizing the existing templates for stocks and features and you don't need to write a custom module.  The Tripal API will help you get access to any Chado data you need within the templates.
>
> Stephen
>
>
> On 8/27/2012 4:57 AM, Michael Dondrup wrote:
>> Hi Stephen,
>>
>> thank you very much for your response. I will try to describe our use-case with a bit more details then, sorry
>> for the lengthy post.
>>
>> We are working with the newly sequenced genome of the atlantic Salmon Louse (Lepeophtheirus salmonis).
>> I have loaded the genome sequence and draft annotation from GFF files into a local tripal (which will become a public "LiceBase" in the future).
>> The biologists are now performing RNAi experiments to study gene knockdown, and the idea is that our
>> system should support them with archiving the resulting data and linking it to the genomic features in the database.
>>
>> The data consist of (mostly microscope) images which are used to study the phenotype. Currently, I am in the process of
>> prototyping RNAi and image support, and therefore the fields are not carved in stone yet, there might be more in the future;
>> we have created a custom data type with the following fields:
>>
>> - Image file (TIFF)
>> - Preview Image (web image)
>> - Phenotype CV (a drupal taxonomy, with autocomplete text field, for phenotype annotation, not a phenotype ontology yet)
>> - Gene symbol (text)
>> - Gene id (node reference to chado 'feature' page, autocomplete text)
>> - Organism (node reference to chado 'organism' page, autocomplete text)
>> - phenotype description (free text)
>> - external dbref (Title and URL)
>>
>> We should also add
>> - forward primer sequence
>> - reverse primer sequence
>>
>> Further, I have made a 'View' in drupal for this data type, which allows for queries.
>>
>> At this point, the developmental stage ontology comes into play, your assumption was correct, I wish to describe the stage of the
>> individual in the image, providing a text field with auto-completion, backed by the ontology. And that is the point where I require some help.
>>
>> It might well be the case that this prototype is good enough for our purpose; I found tripal very convenient, and up to now
>> we didn't need to code anything. We could also share our experience, if anybody is interested, and we like to hear about any
>> related projects.  However, I would also be willing to code a module to be integrated into tripal, if required.
>> I am new to php but decent perl programmer, so I believe it's feasible to switch.
>>
>>
>> Michael
>>
>>
>> On Aug 24, 2012, at 2:57 PM, Stephen Ficklin wrote:
>>
>>> Hi Michael,
>>>
>>> Just a few questions for you before I can give a proper answer. Are you
>>> trying to create RNAi feature pages (e.g. miRNA, siRNA) with details of
>>> the developmental stage where the feature is active?   If so, how are
>>> you loading the RNAi features into the database? in the feature table of
>>> Chado?  You mention that you created an RNAi content type.  What fields
>>> do you have in that content type?
>>>
>>> Thanks,
>>> Stephen
>>>
>>>
>>>
>>> On 8/24/2012 7:41 AM, Michael Dondrup wrote:
>>>> Hi,
>>>>
>>>> I have made a custom ontology with the developmental stages of my organism in an OBO file and uploaded it
>>>> into tripal; I am able to see my 'Sea Lice Developmental Ontology' in the CV terms listing in Tripal Administration.
>>>>
>>>> Now, I would like to use this ontology somehow, but I was unable to figure out how to. Eg. optimally I would like to use it
>>>> as a Drupal 'Taxonomy' or via the content construction kit as a Node reference. As an example I have created
>>>> a custom content type "RNAi" for annotation of experiments, and added (among others) node reference  fields:
>>>> - Organism
>>>> -  Feature
>>>> where these are textfields using autocompletion using the drupal database content.
>>>>
>>>> I was unable though to use any CV/Ontology though. Is it at all possible, and where are the imported CV terms (e.g. GO) used otherwise?
>>>>
>>>> My apologies if I have missed some documentation; on the other hand, if this functionality is lacking
>>>> I would be glad (and hopefully able) to help and
>>>> implement it. Just give me a pointer where to start, please. I appreciate your input.
>>>>
>>>> Kind regards
>>>>
>>>> Michael Dondrup
>>>> Postdoctoral fellow
>>>> The Sea Lice Research Centre
>>>> Department of Informatics
>>>> University of Bergen
>>>> Thormøhlensgate 55, N-5008 Bergen,
>>>> Norway
>>>>
>>>> Michael Dondrup
>>>> Postdoctoral researcher
>>>> The Sea Lice Research Centre
>>>> Department of Informatics
>>>> University of Bergen
>>>> Thormøhlensgate 55, N-5008 Bergen,
>>>> Norway
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Live Security Virtual Conference
>>>> Exclusive live event will cover all the ways today's security and
>>>> threat landscape has changed and how IT managers can respond. Discussions
>>>> will include endpoint security, mobile security and the latest in malware
>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>>> _______________________________________________
>>>> Gmod-tripal mailing list
>>>> [hidden email]
>>>> https://lists.sourceforge.net/lists/listinfo/gmod-tripal
>>>
>>> ------------------------------------------------------------------------------
>>> Live Security Virtual Conference
>>> Exclusive live event will cover all the ways today's security and
>>> threat landscape has changed and how IT managers can respond. Discussions
>>> will include endpoint security, mobile security and the latest in malware
>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>> _______________________________________________
>>> Gmod-tripal mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/gmod-tripal
>


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gmod-tripal mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal
Reply | Threaded
Open this post in threaded view
|

Re: How to use custom ontologies e.g. as node references?

Stephen Ficklin-2
Hi Michael,

I look forward to hearing an update.

Cheers,
Stephen

On 9/4/2012 8:04 AM, Michael Dondrup wrote:

> Dear Stephen,
>
> Thank you very much for your extensive and very helpful answer. I have contemplated a bit and I think I will in fact go for
> option creating a new CCK content type, for now. This mainly because it looks like less coding than the other solution
> and this functionality might be useful elsewhere. Given that our experiments are already running, I prefer a quick first approach to
> get the data stored in a somewhat organized way.
>
> We might try to tackle developing a full blown RNAi module later, but I am not sure yet if have the capacity to do this. Holding
> all scientific data in chado is the way to go for the future, I agree. However, we have to replicate the annotation data between
> collaborators, but not all will be allowed or want to see all the experimental content immediately.
> The second solution will therefore require a bit more effort and infrastructure in data replication between labs, such that data separation
> by CCK might become a positive side-effect for now.
>
> I will report back, as soon as we have some results or get stuck.
>
> Michael
>
> On Aug 28, 2012, at 5:34 PM, Stephen Ficklin wrote:
>
>> Hi Michael,
>>
>> I'm CC'ing my response to the gmod-tripal-devel (developers) mailing list as well.  You may want to consider joining that list too if you decide to go down the route of writing your own code (https://lists.sourceforge.net/lists/listinfo/gmod-tripal-devel).
>>
>> My compliments on leveraging Drupal to create your pages!  Sounds like you've done a great job.
>>
>> It sounds as though you are using custom content types and adding CCK fields to that content type.   In answer to your question, if you wanted to use an ontology stored in Chado as a CCK field for your new content type, you would need to write some code to create a custom CCK field.   The custom CCK field could query the Chado schema to provide terms from your developmental stage ontology.  I have never done this.  But, doing a quick search  I found this documentation that explains it: http://www.lullabot.com/articles/creating-custom-cck-fields.
>>
>> One thing you may want to consider is that by using custom content types and CCK your scientific data will not be housed in the Chado database but rather in Drupal tables.  Specifically tables provided by the CCK module.   By not having your data in Chado it makes it difficult/impossible for other Chado-enabled tools to access this information.   We may be working in features for Tripal in the future that would allow two or more Tripal sites to share Chado data.  So, having your scientific data in Chado would mean you could share it.  If you don't anticipate ever needing other tools that would access this type of data then you may be just fine.  My recommendation would be to keep all of your options open and to try to keep non-scientific data in the Drupal tables (e.g. community and site information) and scientific data in Chado.
>>
>> If you go the route of trying to store your data into Chado rather than in CCK fields then I would suggest you send an email to the gmod-schema mailing list or some folks on our mailing list may jump in and offer assistance on what tables you should use for your data.  Just with the limited understanding that I have I think you would need to store your individuals for which you have images in the stock table; store your images in the eimage table; your RNAi and primer sequences in the feature table; your organism in the organism table and then use the foreign key constraints to link them together.  Your developmental stage and phenotype ontologies can be loaded in the cv, cvterm, dbxref, db tables (if you use the OBO loader then they are getting stored that way already).
>>
>> Tripal supports viewing stocks (your individuals), and features (RNAi features) already.  But I would imaging you would have to do some coding to get everything to look the way you want.  For example, you want phenotype images to appear on your "stock" pages. My guess is you probably can do everything you want by editing and customizing the existing templates for stocks and features and you don't need to write a custom module.  The Tripal API will help you get access to any Chado data you need within the templates.
>>
>> Stephen
>>
>>
>> On 8/27/2012 4:57 AM, Michael Dondrup wrote:
>>> Hi Stephen,
>>>
>>> thank you very much for your response. I will try to describe our use-case with a bit more details then, sorry
>>> for the lengthy post.
>>>
>>> We are working with the newly sequenced genome of the atlantic Salmon Louse (Lepeophtheirus salmonis).
>>> I have loaded the genome sequence and draft annotation from GFF files into a local tripal (which will become a public "LiceBase" in the future).
>>> The biologists are now performing RNAi experiments to study gene knockdown, and the idea is that our
>>> system should support them with archiving the resulting data and linking it to the genomic features in the database.
>>>
>>> The data consist of (mostly microscope) images which are used to study the phenotype. Currently, I am in the process of
>>> prototyping RNAi and image support, and therefore the fields are not carved in stone yet, there might be more in the future;
>>> we have created a custom data type with the following fields:
>>>
>>> - Image file (TIFF)
>>> - Preview Image (web image)
>>> - Phenotype CV (a drupal taxonomy, with autocomplete text field, for phenotype annotation, not a phenotype ontology yet)
>>> - Gene symbol (text)
>>> - Gene id (node reference to chado 'feature' page, autocomplete text)
>>> - Organism (node reference to chado 'organism' page, autocomplete text)
>>> - phenotype description (free text)
>>> - external dbref (Title and URL)
>>>
>>> We should also add
>>> - forward primer sequence
>>> - reverse primer sequence
>>>
>>> Further, I have made a 'View' in drupal for this data type, which allows for queries.
>>>
>>> At this point, the developmental stage ontology comes into play, your assumption was correct, I wish to describe the stage of the
>>> individual in the image, providing a text field with auto-completion, backed by the ontology. And that is the point where I require some help.
>>>
>>> It might well be the case that this prototype is good enough for our purpose; I found tripal very convenient, and up to now
>>> we didn't need to code anything. We could also share our experience, if anybody is interested, and we like to hear about any
>>> related projects.  However, I would also be willing to code a module to be integrated into tripal, if required.
>>> I am new to php but decent perl programmer, so I believe it's feasible to switch.
>>>
>>>
>>> Michael
>>>
>>>
>>> On Aug 24, 2012, at 2:57 PM, Stephen Ficklin wrote:
>>>
>>>> Hi Michael,
>>>>
>>>> Just a few questions for you before I can give a proper answer. Are you
>>>> trying to create RNAi feature pages (e.g. miRNA, siRNA) with details of
>>>> the developmental stage where the feature is active?   If so, how are
>>>> you loading the RNAi features into the database? in the feature table of
>>>> Chado?  You mention that you created an RNAi content type.  What fields
>>>> do you have in that content type?
>>>>
>>>> Thanks,
>>>> Stephen
>>>>
>>>>
>>>>
>>>> On 8/24/2012 7:41 AM, Michael Dondrup wrote:
>>>>> Hi,
>>>>>
>>>>> I have made a custom ontology with the developmental stages of my organism in an OBO file and uploaded it
>>>>> into tripal; I am able to see my 'Sea Lice Developmental Ontology' in the CV terms listing in Tripal Administration.
>>>>>
>>>>> Now, I would like to use this ontology somehow, but I was unable to figure out how to. Eg. optimally I would like to use it
>>>>> as a Drupal 'Taxonomy' or via the content construction kit as a Node reference. As an example I have created
>>>>> a custom content type "RNAi" for annotation of experiments, and added (among others) node reference  fields:
>>>>> - Organism
>>>>> -  Feature
>>>>> where these are textfields using autocompletion using the drupal database content.
>>>>>
>>>>> I was unable though to use any CV/Ontology though. Is it at all possible, and where are the imported CV terms (e.g. GO) used otherwise?
>>>>>
>>>>> My apologies if I have missed some documentation; on the other hand, if this functionality is lacking
>>>>> I would be glad (and hopefully able) to help and
>>>>> implement it. Just give me a pointer where to start, please. I appreciate your input.
>>>>>
>>>>> Kind regards
>>>>>
>>>>> Michael Dondrup
>>>>> Postdoctoral fellow
>>>>> The Sea Lice Research Centre
>>>>> Department of Informatics
>>>>> University of Bergen
>>>>> Thormøhlensgate 55, N-5008 Bergen,
>>>>> Norway
>>>>>
>>>>> Michael Dondrup
>>>>> Postdoctoral researcher
>>>>> The Sea Lice Research Centre
>>>>> Department of Informatics
>>>>> University of Bergen
>>>>> Thormøhlensgate 55, N-5008 Bergen,
>>>>> Norway
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Live Security Virtual Conference
>>>>> Exclusive live event will cover all the ways today's security and
>>>>> threat landscape has changed and how IT managers can respond. Discussions
>>>>> will include endpoint security, mobile security and the latest in malware
>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>>>> _______________________________________________
>>>>> Gmod-tripal mailing list
>>>>> [hidden email]
>>>>> https://lists.sourceforge.net/lists/listinfo/gmod-tripal
>>>> ------------------------------------------------------------------------------
>>>> Live Security Virtual Conference
>>>> Exclusive live event will cover all the ways today's security and
>>>> threat landscape has changed and how IT managers can respond. Discussions
>>>> will include endpoint security, mobile security and the latest in malware
>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>>> _______________________________________________
>>>> Gmod-tripal mailing list
>>>> [hidden email]
>>>> https://lists.sourceforge.net/lists/listinfo/gmod-tripal


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gmod-tripal mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal