Question: Help needed running BUSCO
2
gravatar for Max Haase
2.9 years ago by
Max Haase40
UW Madison
Max Haase40 wrote:

Hi I am trying to get BUSCO v1.2 up and running using their provided sample data and I am running into a few problems. Firstly, I get "Error: Cannot write to Augustus directory ", Im certain I have provide read and write permission to the augustus config file. After that prints, BUSCO seems to run normally:

Phase One
*** Running tBlastN ***

Building a new DB, current time: 05/17/2016 14:37:21

New DB name:   /Users/maxhaase/BUSCO/BUSCO_v1.2/sample_data/sample

New DB title:  target.fa

Sequence type: Nucleotide

Keep Linkouts: T

Keep MBits: T

Maximum file size: 1000000000B

Adding sequences from FASTA; added 1 sequences in 0.00873184 seconds.

*** Getting coordinates for candidate regions! ***

*** pre-Augustus scaffold extraction ***

*** Running Augustus prediction ***

=>  10% of predictions performed

=>  25% of predictions performed

=>  50% of predictions performed

=>  75% of predictions performed

=>  100%% of predictions performed

*** Extracting predicted proteins ***

sed: 1: "./run_sample/augustus/B ...": invalid command code .

sed: 1: "./run_sample/augustus/B ...": invalid command code .

sed: 1: "./run_sample/augustus/B ...": invalid command code .

sed: 1: "./run_sample/augustus/B ...": invalid command code .

sed: 1: "./run_sample/augustus/B ...": invalid command code .

sed: 1: "./run_sample/augustus/B ...": invalid command code .

sed: 1: "./run_sample/augustus/B ...": invalid command code .

sed: 1: "./run_sample/augustus/B ...": invalid command code .

*** Running HMMER to confirm orthology of predicted proteins ***

Complete: 0
Single: 0

Multi: 0

Fragment: 0

Missing: 10

Total BUSCO groups searched: 10

I am unsure how to trouble shoot the sed 1 error. The blast step works, as there are hits for all the sequences. However the BUSCO.out files (I think these should be the predicted proteins from augustus) are completely empty. The things I do know is that augustus works for me perfectly when I use it by itself, so I believe the issue has something to with BUSCO.

Any help is appreciated, thanks!

software error • 3.8k views
ADD COMMENTlink modified 17 months ago by Myggan20 • written 2.9 years ago by Max Haase40
1

What is the full command you're running?

ADD REPLYlink written 2.9 years ago by Philipp Bayer6.0k
1

My command is: Maxs-MacBook:sample_data maxhaase$ python3 /Users/maxhaase/School/Phylo563/BUSCO_v1.2/BUSCO_v1.2.py -in target.fa -o sample -l ./example -m genome

ADD REPLYlink written 2.9 years ago by Max Haase40
4
gravatar for Philipp Bayer
2.9 years ago by
Philipp Bayer6.0k
Australia/Perth/UWA
Philipp Bayer6.0k wrote:

Aaah so it's a MacBook, I have a feeling it's a problem with the sed contained in OSX and the sed contained in Linux -

for example, see this answer on StackOverflow for the same problem you have: http://stackoverflow.com/a/19457213

Looking at the BUSCO code, this is the problematic line:

 subprocess.call('sed -i \'1,3d\' %saugustus/%s' % (mainout,entry), shell = True)

We can see the -i flag there which behaves differently under OSX.

Maybe if you replace it with this line it'll work:

 subprocess.call('sed -i \'\' -e \'1,3d\' %saugustus/%s' % (mainout,entry), shell = True)

or this one:

 subprocess.call('sed -i.bak -e \'1,3d\' %saugustus/%s' % (mainout,entry), shell = True)

But I don't have a Mac so I can't test it... (Alternatively, just run it on Linux?)

ADD COMMENTlink modified 2.9 years ago • written 2.9 years ago by Philipp Bayer6.0k
1

Thanks for the info, I was working with a postdoc in my lab on the sed -i issue yesterday for a few hours and we agreed that I should just use BUSCO on Linux. But maybe you have some further insight, when I run with the modified line "subprocess.call('sed -i \'\' -e \'1,3d\' %saugustus/%s' % (mainout,entry), shell = True)", I get this as the out put:

Building a new DB, current time: 05/20/2016 09:36:04

New DB name: /Users/maxhaase/BUSCO/BUSCO_v1.2/sample_data/sample

New DB title: target.fa

Sequence type: Nucleotide

Keep Linkouts: T

Keep MBits: T

Maximum file size: 1000000000B

Adding sequences from FASTA; added 1 sequences in 0.00824285 seconds.

* Getting coordinates for candidate regions! *

* pre-Augustus scaffold extraction *

* Running Augustus prediction *

=> 10% of predictions performed

=> 25% of predictions performed

=> 50% of predictions performed

=> 75% of predictions performed

=> 100%% of predictions performed

* Extracting predicted proteins *

* Running HMMER to confirm orthology of predicted proteins *

Complete: 0

Single: 0

Multi: 0

Fragment: 0

Missing: 10

Total BUSCO groups searched: 10

Phase Two

* Training Augustus using Single-Copy Complete BUSCOs *

cat: ./run_sample/gb/*.gb: No such file or directory

* Re-running Augustus with the new metaparameters, number targets: 10 *

=> 10.0% of predictions performed

=> 25.0% of predictions performed

=> 50.0% of predictions performed

=> 75.0% of predictions performed

=> 100.0% of predictions performed

Exception in thread Thread-1:

Traceback (most recent call last):

File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/threading.py", line 914, in _bootstrap_inner self.run()

File "/Users/maxhaase/BUSCO/BUSCO_v1.2/BUSCO_v1.2_m.py", line 617, in run process_dataself.name, self.q)

File "/Users/maxhaase/BUSCO/BUSCO_v1.2/BUSCO_v1.2_m.py", line 633, in process_data if state > slate[-1]:

IndexError: list index out of range

The other alternative you gave also gives this error.

ADD REPLYlink modified 2.9 years ago • written 2.9 years ago by Max Haase40

Oh, this is really hard to debug, I've run into the same issue with BUSCO where some dependency got borked and it would report 0 for Complete/Single/etc. hits. and then later crash.

There are numerous ways to circumvent this issue (this StackOverflow answer suggest using a small perl one-liner instead), I'd suggest to annoy the BUSCO maintainers since this is a general issue they should fix.

ADD REPLYlink written 2.9 years ago by Philipp Bayer6.0k
1
gravatar for thiagomafra
2.9 years ago by
thiagomafra70
Brazil
thiagomafra70 wrote:

I also have a error message "Error: Cannot write to Augustus directory, please make sure you have write permissions to ..." but my augustus directory have write permission, see:

drwxr-xr-x 2 thiagomafra thiagomafra 4,0K Mar  2  2011 bin
drwxrwxrwx 6 thiagomafra thiagomafra 4,0K Mar  2  2011 config
drwxr-xr-x 3 thiagomafra thiagomafra 4,0K Mar  2  2011 docs
drwxr-xr-x 4 thiagomafra thiagomafra 4,0K Mar  2  2011 examples
-rw-r--r-- 1 thiagomafra thiagomafra  11K Mar  2  2011 HISTORY.TXT
drwxr-xr-x 2 thiagomafra thiagomafra 4,0K Mar  2  2011 include
-rw-r--r-- 1 thiagomafra thiagomafra  140 Nov  1  2009 Makefile
-rw-r--r-- 1 thiagomafra thiagomafra  48K Jan  9  2011 README.TXT
-rw-r--r-- 1 thiagomafra thiagomafra  28K Nov  1  2009 retraining.html
drwxr-xr-x 4 thiagomafra thiagomafra 4,0K Mar  2  2011 scripts
drwxr-xr-x 2 thiagomafra thiagomafra 4,0K Jun  3  2015 src

I ran the following command, and although it has not shown error, BUSCO not finished well.

python ~/instaladores/BUSCO_v1.2/BUSCO_v1.2.py -o amostra1 -in ~/spades_run/amostra1/run1/contigs.fasta -l ~/instaladores/BUSCO_v1.2/fungi/ -c 12

Can anybody help me?

ADD COMMENTlink written 2.9 years ago by thiagomafra70
1

I managed to solve my problem.

ADD REPLYlink modified 2.9 years ago • written 2.9 years ago by thiagomafra70
1

Hi Thiago, I have the same error " Error: Cannot write to Augustus directory, please make sure you have write permissions to..." . Could you explain how you solved this issue? Thank you so much!

ADD REPLYlink written 2.9 years ago by miriantnt10

Bit late, but I've run into this too -

in my case it happened because I used a globally installed AUGUSTUS where I had no write permissions, of course. BUSCO makes a new folder in the species directory.

The workaround was to just use my own AUGUSTUS installation in my home directory where I had write permissions.

ADD REPLYlink written 2.6 years ago by Philipp Bayer6.0k

It would be of great benefit to others who might face similar hiccups if you could mention how you managed to resolve the issue. Thanks.

ADD REPLYlink modified 2.9 years ago • written 2.9 years ago by Bioinformatics_NewComer320
1
gravatar for caizexi123
2.6 years ago by
caizexi12350
Denmark
caizexi12350 wrote:

Using Python3 will fix this problem.

ADD COMMENTlink written 2.6 years ago by caizexi12350
1
gravatar for matsepp
2.4 years ago by
matsepp10
matsepp10 wrote:

Hello, The solution can be found here: https://gitlab.com/ezlab/busco/issues/15

ADD COMMENTlink written 2.4 years ago by matsepp10
0
gravatar for charbo24
2.6 years ago by
charbo2440
Michigan State University
charbo2440 wrote:

Error: Cannot write to Augustus directory

When you specify AUGUSTUS_CONFIG_PATH=/path_to_augustus/config make sure you have the full path. For some reason relative paths (like ~/foobar/config) don't work.

ADD COMMENTlink written 2.6 years ago by charbo2440
0
gravatar for Myggan
17 months ago by
Myggan20
Sweden
Myggan20 wrote:

If you use Hombrew for Mac, and replace your sed with gnu-sed, sed will behave as on linux.

You can do this by:

#If already exists, uninstall:    
brew uninstall gnu-sed

#Install gnu-sed but instead of the default gsed, use --with-default-names
brew install gnu-sed --with-default-names

Check that your sed path now changed, where homebrew installs stuff:

which sed

I tried it on my MBP, but it still seems to run into problems, but later, maybe becuase of this? : https://github.com/nextgenusfs/funannotate/issues/3

Anyway, it removes the sed error...

ADD COMMENTlink written 17 months ago by Myggan20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 738 users visited in the last hour