wurmlab / sequenceserver

Intuitive graphical web interface for running BLAST bioinformatics tool (i.e. have your own custom NCBI BLAST site!)
https://sequenceserver.com
GNU Affero General Public License v3.0
268 stars 112 forks source link

Disable FASTA and FASTA of all hits #414

Open mictadlo opened 5 years ago

mictadlo commented 5 years ago

Hi, Is there a way to disable FASTA and FASTA of all hits to prevent to download the assembly?

Thank you in advance,

Michal

enuggetry commented 4 years ago

This is the way I did it:

In sidebar.js, https://github.com/wurmlab/sequenceserver/blob/master/public/js/sidebar.js#L146 add the word "disabled" to className. So the className string would be "btn-link download-fasta-of-all disabled"

In hits.js https://github.com/wurmlab/sequenceserver/blob/master/public/js/hit.js#L185 add the word "disabled" to className. So the className string would be "download-fa disabled"

Recompile the javascript: You will need Node and npm if you want to modify and build frontend code:

# Install frontend dependencies
npm install

# Build minified JS and CSS bundles
npm run-script build
rahulvrane commented 3 years ago

Hi Thanks for that tip @enuggetry .. I did try that with the git clone and run using bundle exec bin/sequenceserver -D - but I still get the options to download all fasta.. Is there something I've missed? What I did was as below:

  1. add 'disabled' to the className in lines 146 and 185 of public/js/sidebar.js and public/js/hit.js, and
  2. then run npm install && npm run-script build
  3. deploy using bundle exec bin/sequenceserver -D

Thanks for all the help ! :)

yeban commented 3 years ago

Try clearing your browser's cache? By the way, -D option bypasses the minified files you built in step 2 (but that shouldn't be the reason that the button is not being disabled).

yannickwurm commented 2 years ago

This may want to be an option specified at launchtime in the overall config file or as a command line option

yannickwurm commented 2 years ago

to protect data, the server-side get_sequence would also want to be changed to return an empty string.

noecochetel commented 7 months ago

Hi, I am interested in the very same feature, I am using a slightly different configuration. Sequenceserver runs in Apache using phusion passenger. The app is deployed to a sub-uri. The changes I make to the individual JS are not taken into account as I am not sure how to re-build the minified JS. Is it possible to modify directly the minified JS to trigger the expected outcome? I am open to any solution involving or not the re-building process as long as it disable/removes the fasta download option. Thank you.

yannickwurm commented 5 months ago

Just a note to say that this feature exists (in a highly robust manner) for users of the hosted Cloud service...