0
我嘗試使用下面的腳本來自動codeml來計算1500個直向同源KaKs值,但我收到此錯誤我在運行這個shell腳本時出了什麼問題?
#!/bin/bash
for FILE in *.aln
do
NAME=`echo $FILE | sed 's/\.aln//'`
python codemlScript.py /home/tulasi/Desktop/Tools/Tools/AutoPAML/Alignments/\.aln /home/tulasi/Desktop/Tools/Tools/AutoPAML/Trees/\.tree /home/tulasi/Desktop/Tools/Tools/AutoPAML/Out/\.out
done
我得到這個pythonscript以從GitHub囤codeml。
當我運行該腳本,我得到這個錯誤
/home/tulasi/Desktop/Tools/Tools/AutoPAML/Alignments/.aln
/home/tulasi/Desktop/Tools/Tools/AutoPAML/Alignments/.aln
/home/tulasomega.out
Traceback (most recent call last):
File "codemlScript.py", line 45, in <module>
results1 = cml.run(verbose=True)
File "/usr/local/lib/python2.7/dist-packages/Bio/Phylo/PAML/codeml.py", line 185, in run
raise IOError("The specified tree file does not exist.")
IOError: The specified tree file does not exist.
這裏是Python腳本,我使用
#!/usr/bin/python
#########################################################################################################################
#This script was written by Nathan Whelan.
# THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE CONTRIBUTORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
# SOFTWARE.
##########################################################################################################################
##This script utilizes codeml in PAML by Ziheng Yang. If you use this script please also cite PAML.
##BIOPYTHON IS REQUIRED FOR THIS SCRIPT!
##This script can be used to automate running the codeml PAML package(e.g. if you have hundreds of genes you want to fit to a model).
#A codeml ctl file should be in your working directory with the parameters you wish to use.
from __future__ import division
from Bio.Phylo.PAML import codeml ##Biopython PAML
import sys
#This program takes three inputs: the alignment in phylip format, a treefile in Newick format, and outputfile name
#It returns a nested dictionary with various results depending on analysis
if len(sys.argv) != 4:
print "Error. There should be three inputs. An alignment in pyhlip format, a tree file, and the name for the output file"
quit()
cml = codeml.Codeml()
cml.read_ctl_file("codeml.ctl") ##CTL File. See PAML manual for format.
cml.alignment = sys.argv[1]
cml.tree = sys.argv[2]
cml.out_file = sys.argv[3]
name=sys.argv[1]
print name
name=sys.argv[1]
print name
name2=name[0:11]+"_omega.out"
print name2
results1 = cml.run(verbose=True)
但是,當我用單一的調整和樹一起運行Python腳本我得到結果。從這我明白,有shell腳本的問題,但不是與python腳本
我想知道我要去哪裏錯了。 或者請推薦shell腳本來補充這個python腳本。
謝謝
對沒錯..我會盡力讓ň你知道我 –
你的建議試過,我得到了同樣的錯誤 –
你從GitHub正確得到所有的文件嗎? Google搜索上有人抱怨過嗎? –