Comments (10)
I try to use postgres schema to access blast_sequence table but encounter the permission issue
from genomics-workspace.
I try to use postgres schema to access blast_sequence table but encounter the permission issue
ERROR: permission denied for relation blast_sequence
and then I try : GRANT ALL PRIVILEGES ON TABLE blast_sequence TO django;
GRANT ALL PRIVILEGES ON TABLES IN SCHEMA public TO django;
but still get the same error
from genomics-workspace.
I went through three script yesterday to figure out the procedure for replacing current fasta-view by blast+ application.
- setup.py ( check if it need more installation for blast+)
- blast.result.js ( there are further more package need to figure out eg. codemirror)
- result.html
from genomics-workspace.
1.Encounter the issue No alias or index file found for nucleotide database
2.After figuring out, I try to use blastdbcmd -list /home/vagrant/genomics-workspace/media/blast/db -recursive but fail
3.Then I try to replace full path by ./ then somehow it works
4. There are several argument for blastdbcmd such like blastdbcmd [-h] [-help] [-db dbname] [-dbtype molecule_type]
[-entry sequence_identifier] [-entry_batch input_file] [-pig PIG] [-info]
[-range numbers] [-strand strand] [-mask_sequence_with mask_algo_id]
[-out output_file] [-outfmt format] [-target_only] [-get_dups]
[-line_length number] [-ctrl_a] [-show_blastdb_search_path]
[-list directory] [-remove_redundant_dbs] [-recursive]
[-list_outfmt format] [-exact_length] [-long_seqids] [-logfile File_Name]
[-version]
I pick " - entry " as the argument to extract sequence from BLAST database but it seems like I still choose the wrong value to search
from genomics-workspace.
There are three python package that can use for CLI:
- Click ( include: django-click)
- Docopt
- Fire (develop by google)
The way than can used by javascript:
- fixed package.json bin
- commander.js
from genomics-workspace.
Get Javascript and Python get communicate using Json
- Ajax include JQuery and Js
from genomics-workspace.
Alright, so for sending data from the client (JavaScript) to the backend (your Django app) you need to employ something called Ajax, it stands for Asynchronous JavaScript and XML. Basically what it does is allowing you to communicate with your backend services without the need of having to reload the page, which, you would have to do using a normal POST or PUT form submission.
The easiest implementation is using jQuery. jQuery is first and foremost a DOM manipulation library but since its inception has grown to encompass much more than that.
example code :
'''
$(document).ready(function() {
$.ajax({
method: 'POST',
url: '/path/to/your/view/',
data: {'yourJavaScriptArrayKey': yourJavaScriptArray},
success: function (data) {
//this gets called when server returns an OK response
alert("it worked!");
},
error: function (data) {
alert("it didnt work");
}
});
});
'''
from genomics-workspace.
so far we need three steps to achieve the goal
- build the folder /blast/templatetags
- put the function script under /blast/templatetags e.g. blastdbcmd.py
- add some more AJAX line in result.html or blast-result.js
from genomics-workspace.
For future reference. This is in branch "blastdbcmd"
from genomics-workspace.
different path between blast/views.py and media/blast/db (where the BLAST DATABASE is)
the only problem right now is that we need to change the default path set by " blastdbcmd"
from genomics-workspace.
Related Issues (20)
- Re-written [BLAST query page] by React JS library HOT 5
- [BLAST query page] Organism display order HOT 1
- Final step to Integrate the adding organism functionality to CWL and fix CI issue HOT 3
- All feature under manage.py command HOT 3
- Do we need the sequences table? HOT 1
- Adding delete feature to script HOT 2
- Test if linkouts appear when ENABLE_JBROWSE_INTEGRATION = False HOT 1
- add CLI function to set is_shown HOT 3
- Moving docker version to the new repo
- vulnerabilities of django 1.11.20 and update blastdbcmd argument HOT 3
- Update readthedocs with command line interface documentation
- Consider truncating BLAST results when they are too large
- manage.py addOrganism capitalizes the short_name entry
- Using dbtitle in blast-results.js is awkward
- disable travis CI HOT 1
- Problems with multiple space characters in organism name
- google analytics code is missing
- change draggableBlastFeature to draggableNeatBlastFeature HOT 1
- Add Apollo link-outs to transcript and protein features HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from genomics-workspace.