Member Site › Forums › Rosetta 3 › Rosetta 3 – General › make_fragment.pl Error!
- This topic has 12 replies, 3 voices, and was last updated 10 years, 9 months ago by Anonymous.
-
AuthorPosts
-
-
February 15, 2014 at 9:35 pm #1835Anonymous
Hi all,
I want to generate fragment for using in homology modelling. After I installed all tools and database by the script make_fragments.pl -verbose 1NB1.fasta , I found this error.
nr_pfilt database missing so using nr: /home/nong/Documents/Rosetta/rosetta_2013wk52_bundle/tools/fragment_tools/databases/nr
no id specified. parsing filename instead.
cannot parse id from filename so using ‘t001_’
ID: t001 CHAIN: _
File for psipred not found! Generating from scratch instead.
picking fragments with options:
DEBUG: 1
add_pdbs_to_vall:
chain: _
cleanup: 1
exclude_homologs_by_pdb_date: 0
f: 1NB1.fasta
fastafile: t001_.fasta
frags: 1
homs: 1
id: t001
n_candidates: 1000
n_frags: 200
old_name_format: 0
porter: 0
porterfile:
psipred: 1
psipredfile:
rundir: /home/nong/Documents/Rosetta/rosetta_2013wk52_bundle/tools/fragment_tools
runid: t001_
sam: 0
samfile:
torsion_bin: 0
verbose: 1
FILENAME: t001_.fasta
Sequence: CGETCVGGTCNTPGCTCSWPVCTRNGLPV
Running sparks for phi, psi, and solvent accessibility predictions
/home/nong/Documents/Rosetta/rosetta_2013wk52_bundle/tools/fragment_tools/sparks-x/bin/buildinp_query.sh: 7: [: /home/nong/Documents/Rosetta/rosetta_2013wk52_bundle/tools/fragment_tools/sparks-x: unexpected operator
running psiblast for sequence: t001_.fasta
At line 317 of file phipsi_phipsi0.f (unit = 77, file = ‘/home/nong/Documents/Rosetta/rosetta_2013wk52_bundle/tools/fragment_tools/sparks-x/SPINE-X/weights/phipsi0/psi/av1/fort.’)
Fortran runtime error: End of file
Aborting: Can’t run first phi/psi predictor
Error in file: t001_.fasta.phipsi
Traceback (most recent call last):
File “/home/nong/Documents/Rosetta/rosetta_2013wk52_bundle/tools/fragment_tools/sparks-x/bin/buildinp.py”, line 255, in run1
buildinp(fphipsiss, fmat, finp)
File “/home/nong/Documents/Rosetta/rosetta_2013wk52_bundle/tools/fragment_tools/sparks-x/bin/buildinp.py”, line 238, in buildinp
seq1, ssec1, phipsi1, Fphipsi = rdphipsi(fphipsiss)
File “/home/nong/Documents/Rosetta/rosetta_2013wk52_bundle/tools/fragment_tools/sparks-x/bin/buildinp.py”, line 9, in rdphipsi
for line in file(fn):
IOError: [Errno 2] No such file or directory: ‘t001_.fasta.phipsi’I think, the problem come from sparks-x, but I don’t no how to fix it. Please any one help me.
Thanks
-
February 17, 2014 at 7:17 pm #9820Anonymous
First off, if you’re an academic user and aren’t doing anything particularly special with picking fragments, I’d highly recommend just using the Robetta server (http://robetta.bakerlab.org/) to make fragments. — Even in the Rosetta community most people just use the server instead of trying to install/troubleshoot the fragment generation process.
If you can’t use the server (e.g. you’re a commercial user, or you want to make tweaks to the process), it looks like there’s something up with your Sparks-X runs. Sparks-X is an external program that’s installed as part of the make_fragments process. There’s not much “Rosetta” interfacing to it, aside from downloading it, running it with your fasta file, and parsing the output.
What’s the format of your input FASTA file like? I’m wondering if you might have a no-newline-at-end-of-file issue. Open your FASTA file in a plain text editor (something like vim, emacs, gedit, kate — *not* a word processor) and add several blank lines to the end of the file and see if that fixes things.
The other thing you could try is re-installing Sparks-X. I believe it should be sufficient to delete the tools/fragment_tools/sparks-x/ directory and re-run make_fragments.pl. Sparks-X should be re-downloaded and reinstalled automatically.
-
February 19, 2014 at 11:12 am #9828Anonymous
Thanks for your help, I added several blank lines in fasta file and also removed and re-installed sparks-x, but the error is not fixed yet.
-
February 28, 2014 at 12:21 pm #9842Anonymous
Hi,
I think I encountered this problem myself and the fix was to edit sparks-x/SPINE-X/spineX.pl to change the last line “cp -n $workdir/phipsi_phipsi1 $pro_bn.phipsi” to remove tne -n argument to copy as it isn’t supported on some shells.
I’ve written some documentation on getting the rosetta fragment installed locally which you might find helpful:
http://ccp4wiki.org/~ccp4wiki/wiki/index.php?title=Installing_Rosetta
Best wishes,
Jens
-
March 7, 2014 at 3:39 pm #9867Anonymous
Thanks for your help,
Hi, rmoretti
I changed to another computer (just formatted) with Ubuntu 12.04 and I tried to fix it followed your suggestion, but the error still occurred. I’m wondered why you haven’t had any error.Hi, Jens
I found that the latest make_fragments.pl version already remove -n argument.I think the problem may be come from these lines
$./buildinp_query.sh 1NB1.fasta.txt
./buildinp_query.sh: 7: [: /home/marasri/Documents/NongDoc/rosetta_2013wk52_bundle/tools/fragment_tools/sparks-x: unexpected operator
1NB1.fasta.txt.pssm exists
At line 317 of file phipsi_phipsi0.f (unit = 77, file = ‘/home/marasri/Documents/NongDoc/rosetta_2013wk52_bundle/tools/fragment_tools/sparks-x/SPINE-X/weights/phipsi0/psi/av1/fo’)Thanks,
-
March 8, 2014 at 3:00 am #9876Anonymous
Thanks for your response,
Could you tell me where is the problem?marasri@marasri-H87M-D3H:~/Documents/NongDoc/rosetta_2013wk52_bundle/tools/fragment_tools$ echo $SPARKSXDIR
/home/marasri/Documents/NongDoc/rosetta_2013wk52_bundle/tools/fragment_tools/sparks-xmarasri@marasri-H87M-D3H:~/Documents/NongDoc/rosetta_2013wk52_bundle/tools/fragment_tools/sparks-x/bin$ head buildinp_query.sh
#!/bin/sh#spxdir=$SPARKSXDIR
# the following 2 lines were added by Rosetta/tools/fragment_tools/install_dependencies.pl
spxdir=$(dirname $(readlink -f $0))
spxdir=${spxdir%/*}
if [ “$spxdir” == “” ]; then
echo “SPARKSXDIR variable not defined”; exit 1
fi
if [ ! -d “$spxdir” ]; thenmarasri@marasri-H87M-D3H:~/Documents/NongDoc/rosetta_2013wk52_bundle/tools/fragment_tools/sparks-x/bin$ bash –version
GNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.marasri@marasri-H87M-D3H:~/Documents/NongDoc/rosetta_2013wk52_bundle/tools/fragment_tools/sparks-x/bin$ “$0” –version
GNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.Thanks,
-
March 8, 2014 at 3:00 am #9877Anonymous
Thanks for your response,
Could you tell me where is the problem?marasri@marasri-H87M-D3H:~/Documents/NongDoc/rosetta_2013wk52_bundle/tools/fragment_tools$ echo $SPARKSXDIR
/home/marasri/Documents/NongDoc/rosetta_2013wk52_bundle/tools/fragment_tools/sparks-xmarasri@marasri-H87M-D3H:~/Documents/NongDoc/rosetta_2013wk52_bundle/tools/fragment_tools/sparks-x/bin$ head buildinp_query.sh
#!/bin/sh#spxdir=$SPARKSXDIR
# the following 2 lines were added by Rosetta/tools/fragment_tools/install_dependencies.pl
spxdir=$(dirname $(readlink -f $0))
spxdir=${spxdir%/*}
if [ “$spxdir” == “” ]; then
echo “SPARKSXDIR variable not defined”; exit 1
fi
if [ ! -d “$spxdir” ]; thenmarasri@marasri-H87M-D3H:~/Documents/NongDoc/rosetta_2013wk52_bundle/tools/fragment_tools/sparks-x/bin$ bash –version
GNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.marasri@marasri-H87M-D3H:~/Documents/NongDoc/rosetta_2013wk52_bundle/tools/fragment_tools/sparks-x/bin$ “$0” –version
GNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.Thanks,
-
March 10, 2014 at 5:44 pm #9883Anonymous
Thanks again rmoretti,
I edited all sh script, but the script is not work yet.
However, I think, I found the problem. I can run the script(./buildinp_query.sh) completely now without any error by setting $SPARKSXDIR to point to a sparks-x folder , which must not be in fragment_tools folder.What’s happened?
Have you any idea to run make_fragments.pl completely?
-
March 10, 2014 at 11:48 pm #9886Anonymous
If you getting buildinp_query.sh to run successfully, you should be able to run make_fragments.pl (unless there’s a another separate issue with the script). Do whatever magic incantation makes the ./buildinp_query.sh script work properly.
By the way, if you’re using a sparks-x that’s not in the fragment_tools, you can edit make_fragments.pl at about line 43 to set the sparks directory to use your “external” buildinp_query.sh, as opposed to the one that’s downloaded by Rosetta.
I’m not quite sure why setting $SPARKSXDIR would fix things, given the information you posted. Although if things got changed such that you were somehow using the external sparks-x version already, then setting the $SPARKSXDIR environment variable would be necessary.
-
March 11, 2014 at 4:42 pm #9889Anonymous
Thank you very much,rmoretti
Now, my make_fragment.pl script works fine.How to fix ?
I fixed this problem by dowload a new spark-x from original source. Then,I updated symlink of blast and blast-NR to correct directory. After that, I setting $SPARKSXDIR to point to the new sparks-x directory. At line 43 in make_fragment.pl, the sparks-x directory was changed to an external buildinp_query.sh in the new sparks-x folder. Run make_fragment.pl againThanks,
Apiwat -
February 24, 2014 at 8:11 pm #9835Anonymous
I’ve attempted things locally with what I believe is your fasta file, and haven’t had any issues.
Try running the sparks command in isolation, rather than as part of the make_fragments.pl command (e.g. something like):
~/sparks/sparks-x/bin/buildinp_query.sh t001_.fasta
If that gives you an error, there is something wrong with your sparks-x installation. Note there were three things I needed to do in order to get Sparks-X to install/run properly:
* Set the SPARKSXDIR environment variable. On bash this is something like:
export SPARKSXDIR=”${HOME}/sparks/sparks-x”
* Update the symlink for “blast” in the sparks-x directory (this should point to the same directory as you set for $BLAST_DIR in make_fragments.pl)
* Update the symlink for “blast-NR” in the sparks-x directory (this should point to the same directory as you set for $NR in make_fragments.pl)
If things work when you run sparks-x explicitly, but not as part of make_fragments.pl, you may need to examine the line where you set the path to sparks-x in make_fragments.pl.
-
March 7, 2014 at 4:56 pm #9870Anonymous
Urrg. I have suspicion that “unexpected operator” is referring to the “[” shell operator, which means that you have a shell scripting issue. (Strange, on a fresh install.)
Okay, what do the following commands show, when you type them into the commandline as prepared for the “./buildinp_query.sh 1NB1.fasta.txt” run you did before?
echo $SPARKSXDIR
head ./buildinp_query.sh
bash –version
“$0” –version -
March 9, 2014 at 7:53 pm #9878Anonymous
Okay, I got it now.
What happened is that Ubuntu uses the “dash” shell as ‘/bin/sh’, whereas most other Linuxes use the “bash” shell. Bash has certain extensions which dash does not, so if you write a script using those extensions (which the sparks scripts do), they’ll work on most other Linuxes, but will fail under Ubuntu. The way you fix this is to explicitly call for bash in the script. (See https://wiki.ubuntu.com/DashAsBinSh for details.)
Sparks has fixed it with updated versions of their releases, but the fragment_tools/install_dependencies.pl script is pulling an older version for some reasons. Again, this works on most Linuxes, but on Ubuntu it chokes.
Basically, what you need to do is edit buildinp_query.sh (and all of the other .sh files in that directory) to change the very first line from
#!/bin/sh
to
#!/bin/bash
-
-
AuthorPosts
- You must be logged in to reply to this topic.