[Biojava-dev] new biojava3-ws feature Hmmer searches

Scooter Willis HWillis at scripps.edu
Tue Dec 20 16:36:32 UTC 2011


Andreas

The extent of what I tried to manage for features was keeping track of
what sequence position(s) a feature covered and asking for features based
on a String designation and/or sequence position. Gives the most
flexibility and minimum code where you can store complex user defined
feature classes by sequence position. You just need to use instance of to
cast the return of the FeatureInterface.

The SequenceFeaturePanel rendering framework is modeled after the older
Sequence display code in legacy BioJava without all the complexity.
Basically the renderer for a feature gets called to update a sequence
position cell with enough information about the coordinate system to
render outside of the cell if needed. Would be nice to add in a secondary
structure feature using the PDB glifs in a secondary feature renderer.

Scooter



On 12/20/11 8:23 AM, "Andreas Prlic" <andreas at sdsc.edu> wrote:

>Thanks Scooter, yea the SequenceFeaturePanel is a nice example and
>indeed difficult to find. Having a pointer to this in the cookbook
>will be helpful.  I'll add some more recipes related to this and the
>Hmmer client that I am working on currently...
>
>- Features seem to be relatively easy to set up. Just extend
>AbstractFeature...
>
>Andreas
>
>
>
>On Mon, Dec 19, 2011 at 8:04 AM, Scooter Willis <HWillis at scripps.edu>
>wrote:
>> Andreas
>>
>> Check out QuantityFeature and TextFeature in core as two
>>implementations I
>> use to track Features  associated with a peptide.
>>
>> If you run SequenceFeaturePanel in the biojava3-sequence-gui library you
>> will see how it is used. I don't think we list that as one of the
>>modules
>> and got checked into an odd path in the source tree. The Sequence
>>Feature
>> Renderer code is very cool in that I tried to handle the ability to wrap
>> sequences and have the feature renderers auto adjust. The difficulty is
>> dealing with a unknown number of overlapping features of the same type.
>> Probably worth putting up the SequenceFeaturePanel as a cookbook example
>> if it currently isn't listed.
>>
>> Example code from SequenceFeaturePanel
>>
>> ProteinSequence proteinSequence = new
>> 
>>ProteinSequence("ARNDCEQGHILKMFPSTWYVBZJXARNDCEQGHILKMFPSTWYVBZJXARNDCEQG
>>HI
>> 
>>LKMFPSTWYVBZJXARNDCEQGHILKMFPSTWYVBZJXARNDCEQGHILKMFPSTWYVBZJXARNDCEQGHIL
>>KM
>> 
>>FPSTWYVBZJXARNDCEQGHILKMFPSTWYVBZJXARNDCEQGHILKMFPSTWYVBZJXARNDCEQGHILKMF
>>PS
>> TWYVBZJX");
>>            QuantityFeature f1 = new QuantityFeature("HDX", "");
>>            f1.addQuantity(10);
>>            proteinSequence.addFeature(26, 34, f1);
>>            f1 = new QuantityFeature("HDX", "");
>>            f1.addQuantity(20);
>>            proteinSequence.addFeature(26, 45, f1);
>>
>>
>>
>> You can then getFeatures() by type, position etc against the Sequence.
>> Since you can have a collection of different feature types that can be
>> returned you will need to use instanceof to find the one that you are
>> interested in.
>>
>> Let me know if you run into any problems or need anything specific to
>>what
>> you are working on.
>>
>> Scooter
>>
>> On 12/19/11 10:47 AM, "Andreas Prlic" <andreas at sdsc.edu> wrote:
>>
>>>Hi,
>>>
>>>I am currently working on a new feature for the web service module, It
>>>allows to submit a ProteinSequence to the Hmmer3 web site and returns
>>>Pfam domains that have been found on the sequence. At the present the
>>>class  responds with a  SortedSet<HmmerResult>, which wraps the data
>>>that is responded from the Hmmer web service. Instead I would like to
>>>use the FeatureInterface from the core module. Do we have  example
>>>code somewhere for how to correctly use this?
>>>
>>>Thanks,
>>>
>>>Andreas
>>
>
>
>
>-- 
>-----------------------------------------------------------------------
>Dr. Andreas Prlic
>Senior Scientist, RCSB PDB Protein Data Bank
>University of California, San Diego
>(+1) 858.246.0526
>-----------------------------------------------------------------------





More information about the biojava-dev mailing list