Url from which sequenceserver link was opened

I’m using sequenceserver in conjunction with J-browse. Using links.rb I am able to create a link that guides the user back to the contig where the hit is found. I open sequenceserver in a pop-up window.
Would it be possible to get the url of the window from which I openen sequenceserver and use this url to append the specific target, so that the user keep’s the current tracks open?
So basically, if sequenceserver if opened from www.thisdomain/app/app_parameter=1 I would like to add app_parameter=blasthit to the url from the parent window and open this new link in the parent window.

Thanks for your ideas and the great product!

Thomas

If I understand your use case well, this may be beyond links.rb.

You could generate a link with href=blasthit from link.rb, put a CSS class on it and update the link client side with the URL of the window. Something like:

$(‘.my-hits’).each(function (my_hit) {
var $this = $(this)
var href = $this.attr(‘href’)
href = window.location… + href
$this.attr(‘href’, href)
})

Out of curiosity, are you opening SequenceServer from inside JBrowse? For example, when the user clicks on search button in JBrowse?

Priyam

Dear Priyam,

Yes, I am opening SequenceServer from a custom menu I made in jbrowse. Furthermore, I’m working on a plugin that allows for right-clicking on any mRNA or other feature and send the sequence directly to Sequenceserver, hence my other question.

I think integration with Jbrowse will really enhance the usability of SequenceServer.

With kind regards,

Thomas van Gurp

Owner | Bioinformatician

Deena Bioinformatics

thomas@deenabio.com

+31(317) 702 709

+31(6) 472 421 09

This could be cool.

JBrowse has info about the loaded chromosome, scaffold, contig. It’s possible to get the sequence underlying right-clicked mRNA directly from JBrowse, without hitting sequences.cgi or some server side script with id of the mRNA. Of course, there are reasons you may want to go with the server side script.

Once you have the mRNA sequence, you simply need to call $(‘.sequences’).val(sequence) to put that in SequenceServer popup.

Just putting the idea on table. I have some code in Afra (github.com/wurmlab/afra <http://github.com/wurmlab/afra>) to get sequence underlying mRNA (genomic +/-, exonic, coding, protein) from JBrowse. Of course, you can look into Apollo too.

Priyam