Quantcast
Viewing all articles
Browse latest Browse all 41826

Blast Results Wont Return

This isnt my usual way if doing things but because im using Plone it has to be done this way. The function below takes a variable "x" which is the query sequence. Its is then formatted to a blast-able format and then blasted against the database. When results are retuned the file is empty. Any idea why? I had this working but now its not...

def print_query(x):
    f = open('/home/rv/ncbi-blast-2.2.23+/db/test.txt', 'w')
    f.write(x)
    from subprocess import Popen
    Popen(["formatdb", "-p", "T", "-i", "/home/rv/ncbi-blast-2.2.23+/db/test.txt"])
    Popen(["blastall", "-d", "/home/rv/ncbi-blast-2.2.23+/db/vdatabase.fasta", "-i", "/home/rv/ncbi-blast-2.2.23+/db/test.txt", "-p", "blastp", "-m", "8", "-e", "0.01", "-o", "/home/rv/ncbi-blast-2.2.23+/db/output.blast"])
    return open('/home/rv/ncbi-blast-2.2.23+/db/output.blast', 'r').read()

P.S. I know im using the outdated BLAST I'm planning on switching when i have this working


Viewing all articles
Browse latest Browse all 41826

Trending Articles