sequenceserver
sequenceserver copied to clipboard
Disable FASTA and FASTA of all hits
Hi, Is there a way to disable FASTA and FASTA of all hits to prevent to download the assembly?
Thank you in advance,
Michal
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
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:
- add 'disabled' to the className in lines 146 and 185 of
public/js/sidebar.js
andpublic/js/hit.js
, and - then run
npm install && npm run-script build
- deploy using
bundle exec bin/sequenceserver -D
Thanks for all the help ! :)
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).
This may want to be an option specified at launchtime in the overall config file or as a command line option
to protect data, the server-side get_sequence
would also want to be changed to return an empty string.
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.
Just a note to say that this feature exists (in a highly robust manner) for users of the hosted Cloud service...