Here is what I did for running BUSCO v3
python ~/bin/busco/scripts/run_BUSCO.py -i genome.fasta \
-o busco_test -l /eukaryota_odb9/ --mode genome --long
So here is what I did in order to convert gff files produced by augustus into a format that could be read by SNAP. Note that I used bedtools merge because fathom complained that some of the exons were overlapping. I am sure someone could write the code more efficiently and elegantly, but it suffices for the ~250 files I am working with.
cd /directory_with_augustus_gffs/
ls *.gff | perl -pe "s/.gff//g" > samples
while read i;do
file=$i
grep "exon" $i.gff | sort -k 1,1 -k4,4n | ~/bin/bedtools-2.26.0/bin/bedtools merge |\
awk -v OFS='\t' -v b="$file" '
{if ($7 == "-" && NR == 1)
{a="Terminal";print $1,$2,a,$4,$5,$6,$7,$8,b;}}
{if ($7 == "-" && NR>1)
{a="Internal";print $1,$2,a,$4,$5,$6,$7,$8,b;}}
END {if ($7 == "-")
{a="First";print $1,$2,a,$4,$5,$6,$7,$8,b;}}
{if ($7 == "+" && NR==1)
{a="First";print $1,$2,a,$4,$5,$6,$7,$8,b;}}
{if ($7 == "+" && NR>1)
{a="Internal";print $1,$2,a,$4,$5,$6,$7,$8,b;}}
END {if ($7 == "+")
{a="Terminal";print $1,$2,a,$4,$5,$6,$7,$8,b;}}' >> busco_augustus_all.gff
done < samples
#
~/bin/maker/bin/cegma2zff busco_augustus_all.gff genome.fasta
~/bin/maker/exe/snap/fathom genome.ann genome.dna -categorize 1000
~/bin/maker/exe/snap/fathom -export 1000 -plus uni.ann uni.dna
~/bin/maker/exe/snap/forge export.ann export.dna
~/bin/maker/exe/snap/hmm-assembler.pl drom . > ../drom.buscosnap.hmm
Here's an explanation of the code
cd /directory_with_augustus_gffs/
ls *.gff | perl -pe "s/.gff//g" > samples # get all files with the extension .gff, remove the extension with perl and then put them in a file called samples
while read i;do # for each line in samples, read in "i" or the sample name and do the following
file=$i # create the variable file and assign "i" or the current sample name to it
grep "exon" $i.gff | \ # get only the rows with exon in them
sort -k 1,1 -k4,4n | \ # sort the file by chromosome then start position just in case
~/bin/bedtools-2.26.0/bin/bedtools merge |\ # merge overlapping exons if any
awk -v OFS='\t' -v b="$file" ' # initiate awk, make output field separator tabs, and assign the variable $file (the current sample) to the variable b
{if ($7 == "-" && NR == 1)
{a="Terminal";print $1,$2,a,$4,$5,$6,$7,$8,b;}} # if the sequence is on the minus strand and it is the first line, then rename "exon" to "Terminal"
{if ($7 == "-" && NR>1)
{a="Internal";print $1,$2,a,$4,$5,$6,$7,$8,b;}} # if the sequence is on the minus strand and it is not the first line, then rename "exon" to "Internal"
END {if ($7 == "-")
{a="First";print $1,$2,a,$4,$5,$6,$7,$8,b;}} # if the sequence is on the minus strand and it is the last line, then rename "exon" to "First"
{if ($7 == "+" && NR==1)
{a="First";print $1,$2,a,$4,$5,$6,$7,$8,b;}} # if the sequence is on the plus strand and it is the first line, then rename "exon" to "First"
{if ($7 == "+" && NR>1)
{a="Internal";print $1,$2,a,$4,$5,$6,$7,$8,b;}}
END {if ($7 == "+")
{a="Terminal";print $1,$2,a,$4,$5,$6,$7,$8,b;}}' \ # if the sequence is on the minus strand and it is the last line, then rename "exon" to "Terminal"
>> busco_augustus_all.gff # append the output for each iteration to the file busco_augustus_all.gff
done < samples
#
~/bin/maker/bin/cegma2zff busco_augustus_all.gff genome.fasta
~/bin/maker/exe/snap/fathom genome.ann genome.dna -categorize 1000
~/bin/maker/exe/snap/fathom -export 1000 -plus uni.ann uni.dna
~/bin/maker/exe/snap/forge export.ann export.dna
~/bin/maker/exe/snap/hmm-assembler.pl drom . > ../drom.buscosnap.hmm
You should also see the following maker-devel post:
https://groups.google.com/forum/#!topic/maker-devel/vp8R06VVQGQ