Help needed running BUSCO
6
2
Entering edit mode
8.6 years ago
Max Haase ▴ 60

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 • 8.2k views
ADD COMMENT
1
Entering edit mode

What is the full command you're running?

ADD REPLY
1
Entering edit mode

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 REPLY
4
Entering edit mode
8.5 years ago

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 COMMENT
1
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
1
Entering edit mode
8.6 years ago
thiagomafra ▴ 70

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 COMMENT
1
Entering edit mode

I managed to solve my problem.

ADD REPLY
1
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
1
Entering edit mode
8.2 years ago
caizexi123 ▴ 60

Using Python3 will fix this problem.

ADD COMMENT
1
Entering edit mode
8.0 years ago
matsepp ▴ 10

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

ADD COMMENT
0
Entering edit mode
8.2 years ago
charbo24 ▴ 40

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 COMMENT
0
Entering edit mode
7.1 years ago
Myggan ▴ 30

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 COMMENT

Login before adding your answer.

Traffic: 2070 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6