-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scripting access of django databases #276
Conversation
Codecov Report
@@ Coverage Diff @@
## master #276 +/- ##
=======================================
Coverage 51.01% 51.01%
=======================================
Files 64 64
Lines 2662 2662
=======================================
Hits 1358 1358
Misses 1304 1304 Continue to review full report at Codecov.
|
I am on my personal laptop. This is what I did:
|
python manage.py addorganism Aethina tumida python manage.py addblast Aethina tumida -t peptide protein -f GCF_001937115.1_Atum_1.0_genomic.fna python manage.py makeblast GCF_001937115.1_Atum_1.0_genomic.fna python manage.py populatesequence GCF_001937115.1_Atum_1.0_genomic.fna python manage.py delete -o Aethina tumida python manage.py delete -b GCF_001937115.1_Atum_1.0_genomic.fna python manage.py delete -h GCF_001937115.1_Atum_1.0_genomic.fna python manage.py addhmmer GCF_001937115.1_Atum_1.0_genomic.fna |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@r06942072 As far as I can tell, you should follow the step of setup guide. https://genomics-workspace.readthedocs.io/en/latest/setup_guide_centos.html |
try to add init.py under blast/management/commands |
@deming7h777
maybe it should be added directly on that branch. |
misc/add_func.py
Outdated
#organism = options["organism"][0].lower().capitalize() + " " + options["organism"][1].lower() | ||
Organism.objects.filter(display_name = name).delete() | ||
return ("remove %s in database"%name) | ||
''' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't include these commented out lines. It seems to me that these lines are for initial development, right ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, good point
misc/add_func.py
Outdated
@@ -0,0 +1,160 @@ | |||
from blast.models import BlastDb, SequenceType | |||
#from django.core.management.base import BaseCommand, CommandError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unused import directly rather than commenting it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it
misc/add_func.py
Outdated
data2 = re2.json() | ||
key = data1['query']['search'][0]['pageid'] | ||
key = str(key) | ||
#print type(key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove debug purpose code will be great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it
misc/add_func.py
Outdated
sys.exit(0) | ||
|
||
def delete_org(name): | ||
#if options["organism"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unused lines here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gottcha
@hsiaoyi0504 I use repo genomics-VM to set up a new VM, so I didn't go through the process manually in Setup Guide |
@deming7h777
|
@r06942072 you get the error because you don't need to type the full path of fasta file , just the name and title of blast db or hmmer db |
Do you mean like this? I got the same error(See pic1 and pic2)
|
@deming7h777 In my opinion, it will be good to handle path no matter it‘s full path or not. That is, you should handle relative path and absolute path at the same time. |
Monday, what I did *On personal laptop, make a folder called 'media' *command 1 works *command2 not works |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Monday, what I did
cd ~/genomics-workspace
*On personal laptop, make a folder called 'media'
mkdir -p media/blast/db media/hmmer/db
cp ../Downloads/GCF_003254395.2_Amel_HAv3.1_genomic.fna ./media/blast/db/
cp ../Downloads/GCF_003254395.2_Amel_HAv3.1_genomic.fna ./media/hmmer/db/
*command 1 works
python manage.py addblast Apis mellifera -t peptide protein -f GCF_003254395.2_Amel_HAv3.1_genomic.fna
*command2 not works
python manage.py blast_utility GCF_003254395.2_Amel_HAv3.1_genomic.fna -m
see screenshot
please run npm run build
first
misc/add_func.py
Outdated
@@ -0,0 +1,160 @@ | |||
from blast.models import BlastDb, SequenceType | |||
#from django.core.management.base import BaseCommand, CommandError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it
misc/add_func.py
Outdated
data2 = re2.json() | ||
key = data1['query']['search'][0]['pageid'] | ||
key = str(key) | ||
#print type(key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it
misc/add_func.py
Outdated
sys.exit(0) | ||
|
||
def delete_org(name): | ||
#if options["organism"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gottcha
misc/add_func.py
Outdated
#organism = options["organism"][0].lower().capitalize() + " " + options["organism"][1].lower() | ||
Organism.objects.filter(display_name = name).delete() | ||
return ("remove %s in database"%name) | ||
''' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, good point
July.31, 1st post
|
July31, 2nd post
|
No description provided.