2017-06-26 38 views
1

ANARCI - 抗体番号付けツール - を確認しようとしています。 Python 2.6以降(2.7.13で動作)、HMMER3、Biopython(それに加えてNumpy)が必要です。私はこれらのそれぞれがうまくセットアップされており、ANARCI用のサンプルスクリプトの1つを実行すると、上記のエラーが発生します。ANARCI Python 2.7.13 - raise child_exception // OSError:[Errno 2]

RESTART: /path/anarci_API_example.py 

Traceback (most recent call last): 
    File "/Users/BioAtla-Intern/Downloads/anarci-1.1/Example_scripts_and_sequences/anarci_API_example.py", line 12, in <module> 
     results = anarci(sequences, scheme="imgt", output=False) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/anarci/anarci.py", line 554, in anarci 
     alignments = run_hmmer(sequences, hmm_database=database, hmmerpath=hmmerpath, ncpu=ncpu, bit_score_threshold=bit_score_threshold) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/anarci/anarci.py", line 382, in run_hmmer 
     process = Popen(command, stdout=PIPE, stderr=PIPE ) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 390, in __init__ 
     errread, errwrite) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1024, in _execute_child 
     raise child_exception 
OSError: [Errno 2] No such file or directory 

このツールのヘルプや以前の質問は見つかりませんでした。サンプルファイルに興味がある人は、

# Import the anarci function. 
from anarci import anarci 

# Format the sequences that we want to number. 
sequences = [("12e8:H","EVQLQQSGAEVVRSGASVKLSCTASGFNIKDYYIHWVKQRPEKGLEWIGWIDPEIGDTEYVPKFQGKATMTADTSSNTAYLQLSSLTSEDTAVYYCNAGHDYDRGRFPYWGQGTLVTVSAAKTTPPSVYPLAP"), 
      ("12e8:L","DIVMTQSQKFMSTSVGDRVSITCKASQNVGTAVAWYQQKPGQSPKLMIYSASNRYTGVPDRFTGSGSGTDFTLTISNMQSEDLADYFCQQYSSYPLTFGAGTKLELKRADAAPTVSIFPPSSEQLTSGGASV"), 
      ("scfv:A","DIQMTQSPSSLSASVGDRVTITCRTSGNIHNYLTWYQQKPGKAPQLLIYNAKTLADGVPSRFSGSGSGTQFTLTISSLQPEDFANYYCQHFWSLPFTFGQGTKVEIKRTGGGGSGGGGSGGGGSGGGGSEVQLVESGGGLVQPGGSLRLSCAASGFDFSRYDMSWVRQAPGKRLEWVAYISSGGGSTYFPDTVKGRFTISRDNAKNTLYLQMNSLRAEDTAVYYCARQNKKLTWFDYWGQGTLVTVSSHHHHHH"), 
      ("lysozyme:A","KVFGRCELAAAMKRHGLDNYRGYSLGNWVCAAKFESNFNTQATNRNTDGSTDYGILQINSRWWCNDGRTPGSRNLCNIPCSALLSSDITASVNCAKKIVSDGNGMNAWVAWRNRCKGTDVQAWIRGCRL")] 

# Hand the list of sequences to the anarci function. Number them with the IMGT scheme 
results = anarci(sequences, scheme="imgt", output=False) 

# Unpack the results. We get three lists 
numbering, alignment_details, hit_tables = results 

# Each has the same number of elements as the number of sequences submitted 
assert len(numbering) == len(alignment_details) == len(hit_tables) == len(sequences) 

print 'I am using the anarci function to number and get all the details about the following sequences' 
print sequences 

print '\n' 
# Iterate over the sequences 
for i in xrange(len(sequences)):  
    if numbering[i] is None: 
     print 'ANARCI did not number', sequences[i][0] 
    else: 
     print 'ANARCI numbered', sequences[i][0] 
     print 'It identified %d domain(s)'%len(numbering[i]) 

     # Iterate over the domains 
     for j in xrange(len(numbering[i])): 
      domain_numbering, start_index, end_index = numbering[i][j] 
      print 'This is the IMGT numbering for the %d\'th domain:'%j, domain_numbering 
      print 'This is the bit of the sequence it corresponds to:', sequences[i][1][start_index:end_index+1] 
      print 'These are the details of the alignment:' 
     for (key,value) in alignment_details[i][j].iteritems(): 
       print key, ':', value 
      print 'This is the summary of the hits that HMMER found' 
     for line in hit_tables[i]: 
       print line  
    print '\n','_'*40 

print 'Do with this infomation as you wish' 

print '\n','*'*40 

# Want to just get a quick numbering without caring about the other details? 
from anarci import number 

seq = "EVQLQQSGAEVVRSGASVKLSCTASGFNIKDYYIHWVKQRPEKGLEWIGWIDPEIGDTEYVPKFQGKATMTADTSSNTAYLQLSSLTSEDTAVYYCNAGHDYDRGRFPYWGQGTLVTVSAAKTTPPSVYPLAP" 
numbering, chain_type = number(seq, scheme = 'kabat') 
print 'Alternatively we can simply number the first domain of a sequence with the number function' 
print 'I gave it this sequence\n', seq 
print 'ANARCI told me it was a', chain_type, 'chain' 
print 'This is the first domain\'s Kabat numbering:' 
print numbering 

ANARCIはあまり知られていないようですので、助けてください。

+0

スクリプトをどのように実行していますか?どのオペレーティングシステムで? Windows? Linux? –

+0

OS X 10.11.6では、ANARCIはWindowsでは実行されません。私はPythonシェルを使ってそれを走らせた。 – MTJ

+0

私はreadme.txtをちょっと読んでみましたが、この行に "imgt"を "IMGT"してみてください。anarci(sequences、scheme = "IMGT"、output = False) –

答えて

2

少しずつドキュメントとエラーログを読んで、私はすべてをインストールした後、最後のパラメータがHMMERデータベースの名前であることを知りました。この場合、 "ALL"という名前が付けられています。名前から:

results = anarci(sequences, scheme="imgt", output=False) 

へ:

results = anarci(sequences, "imgt", "ALL") 

その後問題が解決した場合、あなたが正しくインストールHMMERを持っていないため、です。 、あなたの端末に

このコマンドを入力します:私はこのようなインストール

wget http://eddylab.org/software/hmmer3/3.1b2/hmmer-3.1b2.tar.gz 

tar -zxvf hmmer-3.1b2.tar.gz 

cd hmmer-3.1b2 

./configure && make && sudo make install 

cd easel && make check && sudo make install 

とそれはそれだ、私のためにそれが働いています。

update

あなたがアクセス許可の問題がある場合、あなたはここからソースをダウンロードすることができます:http://hmmer.org/download.htmlは、このコマンドを実行します。

cd hmmer-3.1b2 
./configure --prefix=$HOME/ 
make -j 4 
make check 
make install 

を私のためのスクリプトの出力は、このリストを返しました:

[((1, ' '), 'E'), ((2, ' '), 'V'), ((3, ' '), 'Q'), ((4, ' '), 'L'), 
((5, ' '), 'Q'), ((6, ' '), 'Q'), ((7, ' '), 'S'), ((8, ' '), 'G'), 
((9, ' '), 'A'), ((10, ' '), 'E'), ((11, ' '), 'V'), ((12, ' '), 'V'), 
((13, ' '), 'R'), ((14, ' '), 'S'), ((15, ' '), 'G'), ((16, ' '), 'A'), 
((17, ' '), 'S'), ((18, ' '), 'V'), ((19, ' '), 'K'), ((20, ' '), 'L'), 
((21, ' '), 'S'), ((22, ' '), 'C'), ((23, ' '), 'T'), ((24, ' '), 'A'), 
((25, ' '), 'S'), ((26, ' '), 'G'), ((27, ' '), 'F'), ((28, ' '), 'N'), 
((29, ' '), 'I'), ((30, ' '), 'K'), ((31, ' '), 'D'), ((32, ' '), 'Y'), 
((33, ' '), 'Y'), ((34, ' '), 'I'), ((35, ' '), 'H'), ((36, ' '), 'W'), 
((37, ' '), 'V'), ((38, ' '), 'K'), ((39, ' '), 'Q'), ((40, ' '), 'R'), 
((41, ' '), 'P'), ((42, ' '), 'E'), ((43, ' '), 'K'), ((44, ' '), 'G'), 
((45, ' '), 'L'), ((46, ' '), 'E'), ((47, ' '), 'W'), ((48, ' '), 'I'), 
((49, ' '), 'G'), ((50, ' '), 'W'), ((51, ' '), 'I'), ((52, ' '), 'D'), 
((52, 'A'), 'P'), ((53, ' '), 'E'), ((54, ' '), 'I'), ((55, ' '), 'G'), 
((56, ' '), 'D'), ((57, ' '), 'T'), ((58, ' '), 'E'), ((59, ' '), 'Y'), 
((60, ' '), 'V'), ((61, ' '), 'P'), ((62, ' '), 'K'), ((63, ' '), 'F'), 
((64, ' '), 'Q'), ((65, ' '), 'G'), ((66, ' '), 'K'), ((67, ' '), 'A'), 
((68, ' '), 'T'), ((69, ' '), 'M'), ((70, ' '), 'T'), ((71, ' '), 'A'), 
((72, ' '), 'D'), ((73, ' '), 'T'), ((74, ' '), 'S'), ((75, ' '), 'S'), 
((76, ' '), 'N'), ((77, ' '), 'T'), ((78, ' '), 'A'), ((79, ' '), 'Y'), 
((80, ' '), 'L'), ((81, ' '), 'Q'), ((82, ' '), 'L'), ((82, 'A'), 'S'), 
((82, 'B'), 'S'), ((82, 'C'), 'L'), ((83, ' '), 'T'), ((84, ' '), 'S'), 
((85, ' '), 'E'), ((86, ' '), 'D'), ((87, ' '), 'T'), ((88, ' '), 'A'), 
((89, ' '), 'V'), ((90, ' '), 'Y'), ((91, ' '), 'Y'), ((92, ' '), 'C'), 
((93, ' '), 'N'), ((94, ' '), 'A'), ((95, ' '), 'G'), ((96, ' '), 'H'), 
((97, ' '), 'D'), ((98, ' '), 'Y'), ((99, ' '), 'D'), ((100, ' '), 'R'), 
((100, 'A'), 'G'), ((100, 'B'), 'R'), ((100, 'C'), 'F'), ((101, ' '), 'P'), 
((102, ' '), 'Y'), ((103, ' '), 'W'), ((104, ' '), 'G'), ((105, ' '), 'Q'), 
((106, ' '), 'G'), ((107, ' '), 'T'), ((108, ' '), 'L'), ((109, ' '), 'V'), 
((110, ' '), 'T'), ((111, ' '), 'V'), ((112, ' '), 'S'), ((113, ' '), 'A')] 
+0

ありがとうございました。 'results'行を変更しましたが、コードを実行すると何も起こりません。 'sudo'を使う端末のためのコマンドでは、これを回避する方法はありますか?私が取り組んでいるコンピュータは私のものではなく、誰がパスワードを設定したのか、それが何であるか(誰も管理パスワードが働いていない)を知っている人はいません。 – MTJ

+0

@MTJこれは本当に奇妙です。なぜなら、私はsudoを使わなかったからです。/、ただPythonパッケージをインストールするために、ああ..そしてある時点でHMMERは私にsudoのパスワードも聞いています。私は解決する方法を知らない:(しかし、主と悪い問題は首尾よく解決された:)。ここで確認できますhttps://unix.stackexchange.com/questions/26074/is-there-a-way-to-stop-having-to-write-sudo-for-every-little-thing-in-linux ( –

+0

)ターミナルコマンドに 'sudo'を2回(' ... && sudo make install')使用しましたが、どちらもHMMER用ではありませんか? – MTJ

関連する問題