From: Lincoln S. <ls...@cs...> - 2007-03-30 15:35:59
|
Hi Sean, You didn't get the "diamonds on the overview" view when you switched to the oligofinder scheme? You should have. I'm a little worried that neither the "annotator" nor the "finder" plugin styles are going to do exactly what you want. The annotator is supposed to annotate the current region, and the finder is supposed to find matching regions, but not necessarily provide detailed information about them. I fear that we need to create a new type of plugin called "genome-annotator" which will generate a new feature set, store it stably, and then add it to the user's stored list of third-party annotations. I am a running a bit low on resources ( e.g. my own hours) to add this feature; would you have the patience to help me out with the coding? I can pretty well describe the strategy to take. Alternatively, I've got a great student working on adding popup balloons to gbrowse right now, and he ought to be finished with that in 2 weeks or so, and then I could put him to work on your problem... but I'm not sure if you can wait that long. Lincoln On 3/30/07, Sean O'Keeffe <ok...@mo...> wrote: > > Lincoln Stein wrote: > > Hi Sean, > > > > The plugin should generate a list of Bio::SeqFeature objects and stick > > them into a Bio::Graphics::FeatureFile object (which is a poorly named > > class that acts more like a set of Feature objects). When it returns > > the set to the browser, the browser will show the search results > > window and a little diamond for each of the hits. You can then click > > on each hit to get taken to the appropriate part of the genome. > > > > Keeping track of the detailed alignment results (e.g. base pair level > > alignments) is a bit trickier; I think you can write the alignment > > results to a web accessible region of the disk and add the appropriate > > "url" attribute to each Feature object that the plugin returns. There > > is a method call that you can make on the browser object to return a > > temporary directory that is specific to the current user, but you may > > have to spelunk through the source code to find out how to use it > > properly. > > > > Lincoln > > > > On 3/30/07, *Sean O'Keeffe* <ok...@mo... > > <mailto:ok...@mo...>> wrote: > > > > Hi all, > > I'm in the process of implementing a Blat server plugin for Gbrowse > to > > map input sequences on the fly across the genome. > > Now having had a peek at other plugins, the AlignTwoSequences plugin > > resembles what I need but with a BLAT server. The question I have > > is how > > can this plugin return a set of hits a)in the display window if > > alignments occur there as well as b)links to other genome wide hits > > whenever they occur. I saw OligoFinder but we are using the > > Bio::DB::SeqFeature schema with Gbrowse 1.67 & BioPerl 1.5.2 and > it's > > not valid for us. > > > > Regards, > > Sean. > > > > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to > > share your > > opinions on IT & business topics through brief surveys-and earn cash > > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > > _______________________________________________ > > Gmod-gbrowse mailing list > > Gmo...@li... > > <mailto:Gmo...@li...> > > https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse > > > > > > > > > > -- > > Lincoln D. Stein > > Cold Spring Harbor Laboratory > > 1 Bungtown Road > > Cold Spring Harbor, NY 11724 > > (516) 367-8380 (voice) > > (516) 367-8389 (fax) > > FOR URGENT MESSAGES & SCHEDULING, > > PLEASE CONTACT MY ASSISTANT, > > SANDRA MICHELSEN, AT mic...@cs... <mailto:mic...@cs...> > Thanks Lincoln, > > A result file of 10kbp (taken from SRF gene on human chr 6) blat > alignment against human: > Using sub type{annotator} and the code below: > > my $blat_result = do_blat(); > > my $searchio = new Bio::SearchIO(-format => 'psl', > -file => $blat_result); > while( my $result = $searchio->next_result ) { > while( my $hit = $result->next_hit ) { > while( my $hsp = $hit->next_hsp ) { > my $start = $abs_start + $hsp->start; > my $stop = $abs_start + $hsp->end; > my $feature = Bio::Graphics::Feature->new( > -start=>$start, > -type => "blat", > -subtype => "similarity", > #-desc => "Blat alignment", > -source => "gfServer", > -strand => "0", > -stop=>$stop, > -ref=>$ref, > -name=>'blat'); > $feature_list->add_feature($feature,'blat'); > } > } > } > return $feature_list; > > All alignments are simply returned as graded segments in the window > irrespective of their genomic position. 1 large full alignment (correct) > and others scattered about underneath (incorrect). Not what's required. > > I then switched to OligoFinder schema using sub type{finder}and switched > a little as below: > my $searchio = new Bio::SearchIO(-format => 'psl', > -file => $blat_result); > while( my $result = $searchio->next_result ) { > while( my $hit = $result->next_hit ) { > while( my $hsp = $hit->next_hsp ) { > my $start = $hsp->start; > my $stop = $hsp->end; > my $ref = $hsp->hit_string; > push @results, Bio::Graphics::Feature->new(-ref => > "Human_Chr_$ref", > -type => 'oligo', > -start => $start, > -end => $stop, > ) > } > } > } > return \@results; > > No alignments returned. > I basically need a schema to return 1 hit and loads of 'diamonds' if not > asking too much :) > -- Lincoln D. Stein Cold Spring Harbor Laboratory 1 Bungtown Road Cold Spring Harbor, NY 11724 (516) 367-8380 (voice) (516) 367-8389 (fax) FOR URGENT MESSAGES & SCHEDULING, PLEASE CONTACT MY ASSISTANT, SANDRA MICHELSEN, AT mic...@cs... -- Lincoln D. Stein Cold Spring Harbor Laboratory 1 Bungtown Road Cold Spring Harbor, NY 11724 (516) 367-8380 (voice) (516) 367-8389 (fax) FOR URGENT MESSAGES & SCHEDULING, PLEASE CONTACT MY ASSISTANT, SANDRA MICHELSEN, AT mic...@cs... |