Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Palmer authored and Jon Palmer committed Mar 23, 2016
1 parent 86d4295 commit 296dfcf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ if [ "$dep" = 'pass' ]; then
fi

check='pass'
for i in {blastp,hmmsearch,hmmscan,augustus,'gmes_petap.pl',mummer,nucmer,show-coords,exonerate,gmap,blat,RepeatModeler,RepeatMasker,pslCDnaFilter,bedtools,bamtools,'gag.py',tbl2asn,'braker.pl',funannotate,mafft,trimal,raxmlHPC-PTHREADS,tRNAscan-SE, 'rmOutToGFF3.pl'}; do
for i in {blastp,hmmsearch,hmmscan,augustus,'gmes_petap.pl',mummer,nucmer,show-coords,exonerate,gmap,blat,RepeatModeler,RepeatMasker,pslCDnaFilter,bedtools,bamtools,'gag.py',tbl2asn,'braker.pl',funannotate,mafft,trimal,raxmlHPC-PTHREADS,tRNAscan-SE,'rmOutToGFF3.pl'}; do
var=$(command -v $i)
if [ "$var" ]; then
echo "$i installed.........$var"
Expand Down
25 changes: 15 additions & 10 deletions util/fgenesh2gff3.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,22 @@
sys.stdout.write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" % (scaffold, 'FGENESH', 'gene', genestart, genestop, '.', strand, '.', 'ID='+k+';'))
sys.stdout.write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" % (scaffold, 'FGENESH', 'mRNA', genestart, genestop, '.', strand, '.', 'ID='+k+'-T1;Parent='+k+';'))
last_index = len(v)
for i in range(0,last_index):
start = v[i][0]
stop = v[i][1]
if i == 0: #first CDS, set phase to 0, calculate next phase
phase = '0'
phase = 0
if strand == '+':
for i in range(0,last_index):
start = v[i][0]
stop = v[i][1]
sys.stdout.write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" % (scaffold, 'FGENESH', 'exon', start, stop, '.', strand, '.', 'ID='+k+':exon'+str(i+1)+';Parent='+k+'-T1;'))
sys.stdout.write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" % (scaffold, 'FGENESH', 'CDS', start, stop, '.', strand, str(phase), 'ID=cds.'+k+';Parent='+k+'-T1;'))
diff = int(stop) - int(start) + 1
next_phase = (int(phase) - diff) % 3
else:
phase = next_phase
phase = next_phase
else:
for i in reversed(range(0,last_index)):
start = v[i][0]
stop = v[i][1]
sys.stdout.write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" % (scaffold, 'FGENESH', 'exon', start, stop, '.', strand, '.', 'ID='+k+':exon'+str(i+1)+';Parent='+k+'-T1;'))
sys.stdout.write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" % (scaffold, 'FGENESH', 'CDS', start, stop, '.', strand, phase, 'ID=cds.'+k+';Parent='+k+'-T1;'))
diff = int(stop) - int(start) + 1
next_phase = (int(phase) - diff) % 3

sys.stdout.write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" % (scaffold, 'FGENESH', 'exon', start, stop, '.', strand, '.', 'ID='+k+':exon'+str(i+1)+';Parent='+k+'-T1;'))
sys.stdout.write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" % (scaffold, 'FGENESH', 'CDS', start, stop, '.', strand, phase, 'ID=cds.'+k+';Parent='+k+'-T1;'))
phase = next_phase

0 comments on commit 296dfcf

Please sign in to comment.