sequenceserver icon indicating copy to clipboard operation
sequenceserver copied to clipboard

Disable FASTA and FASTA of all hits

Open mictadlo opened this issue 5 years ago • 7 comments

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

Thank you in advance,

Michal

mictadlo avatar Aug 23 '19 00:08 mictadlo

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

enuggetry avatar Aug 25 '20 11:08 enuggetry

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 ! :)

rahulvrane avatar Oct 08 '20 05:10 rahulvrane

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).

yeban avatar Oct 10 '20 10:10 yeban

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

yannickwurm avatar Oct 15 '21 12:10 yannickwurm

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

yannickwurm avatar Nov 25 '21 21:11 yannickwurm

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.

noecochetel avatar Jan 16 '24 17:01 noecochetel

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

yannickwurm avatar Mar 12 '24 11:03 yannickwurm