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

Andreas Prlic andreas at sdsc.edu
Tue Dec 20 13:23:26 UTC 2011


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("ARNDCEQGHILKMFPSTWYVBZJXARNDCEQGHILKMFPSTWYVBZJXARNDCEQGHI
> LKMFPSTWYVBZJXARNDCEQGHILKMFPSTWYVBZJXARNDCEQGHILKMFPSTWYVBZJXARNDCEQGHILKM
> FPSTWYVBZJXARNDCEQGHILKMFPSTWYVBZJXARNDCEQGHILKMFPSTWYVBZJXARNDCEQGHILKMFPS
> 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