Skip to content

Commit 8761d15

Browse files
Jon PalmerJon Palmer
Jon Palmer
authored and
Jon Palmer
committed
updates to v0.2.6
1 parent 50e39ca commit 8761d15

File tree

5 files changed

+22
-8
lines changed

5 files changed

+22
-8
lines changed

bin/funannotate-compare.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@ def __init__(self,prog):
404404
########################################################
405405

406406
####SignalP############################
407+
lib.log.info("Summarizing secreted protein results")
407408
#flip the dict and just count number for each
408409
signalpDict = lib.busco_dictFlip(signalp)
409410

@@ -800,10 +801,9 @@ def addlink(x):
800801

801802
lib.log.info("Compressing results to output file: %s.tar.gz" % args.out)
802803
lib.make_tarfile(args.out+'.tar.gz', args.out)
803-
lib.log.info("Finished!")
804+
lib.log.info("Funannotate compare completed successfully!")
804805
os._exit(1)
805806

806-
807807
############################################
808808

809809

bin/funannotate-functional.py

+12
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,15 @@ def runIPRpython(Input):
9898
lib.log.info("No NCBI SBT file given, will use default, however if you plan to submit to NCBI, create one and pass it here '--sbt'")
9999
else:
100100
SBT = args.sbt
101+
102+
#check other input files
103+
if not os.path.isfile(SBT):
104+
lib.log.error("SBT file not found, exiting")
105+
os._exit(1)
106+
if args.antismash:
107+
if not os.path.isfile(args.antismash):
108+
lib.log.error("Antismash GBK file not found, exiting")
109+
os._exit(1)
101110

102111
if not args.skip_iprscan:
103112
if not args.iprscan and not args.email:
@@ -256,6 +265,7 @@ def runIPRpython(Input):
256265
#run signalP if installed, have to manually install, so test if exists first, then run it if it does
257266
signalp_out = os.path.join(outputdir, 'annotate_misc', 'annotations.signalp.txt')
258267
if lib.which('signalp'):
268+
lib.log.info("Predicting secreted proteins with SignalP")
259269
if not lib.checkannotations(signalp_out):
260270
lib.signalP(Proteins, os.path.join(outputdir, 'annotate_misc'), signalp_out)
261271
num_annotations = lib.line_count(signalp_out)
@@ -601,5 +611,7 @@ def runIPRpython(Input):
601611
os.makedirs(os.path.join(outputdir, 'logfiles'))
602612
os.rename(log_name, os.path.join(outputdir, 'logfiles', log_name))
603613

614+
#final wrap up message
615+
lib.log.info("Funannotate annotate has completed successfully!")
604616

605617

bin/funannotate-predict.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ def __init__(self,prog):
170170
RepeatMasker = os.path.abspath(RepeatMasker)
171171
MaskGenome = os.path.abspath(MaskGenome)
172172

173-
#final output for augustus hints
173+
#final output for augustus hints, declare ahead of time for checking portion of script
174+
hintsE = os.path.join(args.out, 'predict_misc', 'hints.E.gff')
175+
hintsP = os.path.join(args.out, 'predict_misc', 'hints.P.gff')
174176
hints_all = os.path.join(args.out, 'predict_misc', 'hints.PE.gff')
175177

176178
#check for masked genome here
@@ -235,7 +237,6 @@ def __init__(self,prog):
235237
blat_filt = os.path.join(args.out, 'predict_misc', 'blat.filt.psl')
236238
blat_sort1 = os.path.join(args.out, 'predict_misc', 'blat.sort.tmp.psl')
237239
blat_sort2 = os.path.join(args.out, 'predict_misc', 'blat.sort.psl')
238-
hintsE = os.path.join(args.out, 'predict_misc', 'hints.E.gff')
239240
maxINT = '-maxIntron='+str(args.max_intronlen)
240241
lib.log.info("Aligning transcript evidence to genome with BLAT")
241242
if not os.path.isfile(hints_all):
@@ -289,7 +290,6 @@ def __init__(self,prog):
289290
Exonerate = os.path.abspath(Exonerate)
290291
#now run exonerate2 hints for Augustus
291292
exonerate2hints = os.path.join(AUGUSTUS_BASE, 'scripts', 'exonerate2hints.pl')
292-
hintsP = os.path.join(args.out, 'predict_misc', 'hints.P.gff')
293293
e2h_in = '--in='+p2g_out
294294
e2h_out = '--out='+hintsP
295295
e2h_minINT = '--minintronlen='+str(args.min_intronlen)

funannotate.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def fmtcols(mylist, cols):
3131
for i in range(0,num_lines))
3232
return "\n".join(lines)
3333

34-
version = '0.2.5'
34+
version = '0.2.6'
3535

3636
default_help = """
3737
Usage: funannotate <command> <arguments>

lib/library.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,6 @@ def fasta2chunks(input, chunks, tmpdir, output):
613613
handle.close()
614614

615615
def signalP(input, tmpdir, output):
616-
log.info("Predicting secreted proteins with SignalP")
617616
FNULL = open(os.devnull, 'w')
618617
#split input file into chunks, 20 should mean < 200 proteins per chunk
619618
fasta2chunks(input, 40, tmpdir, 'signalp_tmp')
@@ -1255,8 +1254,11 @@ def gb2proteinortho(input, folder, name):
12551254
for record in SeqRecords:
12561255
for f in record.features:
12571256
if f.type == 'CDS':
1258-
protID = f.qualifiers['protein_id'][0]
12591257
locusID = f.qualifiers['locus_tag'][0]
1258+
try: #saw in a genome downloaded from Genbank that a few models don't have protID? fix if missing to avoid error
1259+
protID = f.qualifiers['protein_id'][0]
1260+
except KeyError:
1261+
protID = 'ncbi:'+locusID+'-T1'
12601262
start = f.location.nofuzzy_start
12611263
end = f.location.nofuzzy_end
12621264
strand = f.location.strand

0 commit comments

Comments
 (0)