biopython 内で blast を使用するのは初めてで、問題が発生しています。
以下を使用して、20 シーケンスを含む fasta ファイルからカスタム blast データベースを作成しました。
os.system('makeblastdb -in newtest.fasta -dbtype nucl -out newtest.db')
これにより、現在作業している現在のディレクトリ内にいくつかのファイル (newtest.db.nhr、newtest.db.nin、newtest.db.nsq) が生成されました: ( /home/User/Documents/python/fasta-files
)
そして今、次を使用してbiopython内でこのデータベースにクエリを実行しようとしています:
blastx_cline = NcbiblastxCommandline(query="queryfile.fas", db="newtest.db", evalue=0.00000001, outfmt=5, out="opuntia.xml")
しかし、私はこのエラーが発生しています:
> Bio.Application.ApplicationError: Command 'blastx -out opuntia.xml
> -outfmt 5 -query queryfile.fas -db newtest.db -evalue 1e-08' returned non-zero exit status 2, 'BLAST Database error: No alias or
> index file found for protein database [newtest.db] in search path
> [/home/User/Documents/python/fasta-files:/usr/share/ncbi/blastdb:]'
から生成されたファイルをコピーしようとしました/home/User/Documents/python/fasta-files
が/usr/share/ncbi/blastdb
、権限がないと表示されます。
*編集*
私が使用する場合:os.system("blastn -db newtest.db -query "fastafile.fas" + " -out test.txt")
正常に動作し、出力ファイルを生成します。しかし、その逆ではありません**
だから私はここで立ち往生しており、これを解決する方法がわかりません。
任意の助けをいただければ幸いです