Skip to content

Commit

Permalink
updates to v0.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Palmer authored and Jon Palmer committed May 2, 2016
1 parent 50e39ca commit 8761d15
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 8 deletions.
4 changes: 2 additions & 2 deletions bin/funannotate-compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ def __init__(self,prog):
########################################################

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

Expand Down Expand Up @@ -800,10 +801,9 @@ def addlink(x):

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


############################################


Expand Down
12 changes: 12 additions & 0 deletions bin/funannotate-functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@ def runIPRpython(Input):
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'")
else:
SBT = args.sbt

#check other input files
if not os.path.isfile(SBT):
lib.log.error("SBT file not found, exiting")
os._exit(1)
if args.antismash:
if not os.path.isfile(args.antismash):
lib.log.error("Antismash GBK file not found, exiting")
os._exit(1)

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

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


6 changes: 3 additions & 3 deletions bin/funannotate-predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ def __init__(self,prog):
RepeatMasker = os.path.abspath(RepeatMasker)
MaskGenome = os.path.abspath(MaskGenome)

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

#check for masked genome here
Expand Down Expand Up @@ -235,7 +237,6 @@ def __init__(self,prog):
blat_filt = os.path.join(args.out, 'predict_misc', 'blat.filt.psl')
blat_sort1 = os.path.join(args.out, 'predict_misc', 'blat.sort.tmp.psl')
blat_sort2 = os.path.join(args.out, 'predict_misc', 'blat.sort.psl')
hintsE = os.path.join(args.out, 'predict_misc', 'hints.E.gff')
maxINT = '-maxIntron='+str(args.max_intronlen)
lib.log.info("Aligning transcript evidence to genome with BLAT")
if not os.path.isfile(hints_all):
Expand Down Expand Up @@ -289,7 +290,6 @@ def __init__(self,prog):
Exonerate = os.path.abspath(Exonerate)
#now run exonerate2 hints for Augustus
exonerate2hints = os.path.join(AUGUSTUS_BASE, 'scripts', 'exonerate2hints.pl')
hintsP = os.path.join(args.out, 'predict_misc', 'hints.P.gff')
e2h_in = '--in='+p2g_out
e2h_out = '--out='+hintsP
e2h_minINT = '--minintronlen='+str(args.min_intronlen)
Expand Down
2 changes: 1 addition & 1 deletion funannotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def fmtcols(mylist, cols):
for i in range(0,num_lines))
return "\n".join(lines)

version = '0.2.5'
version = '0.2.6'

default_help = """
Usage: funannotate <command> <arguments>
Expand Down
6 changes: 4 additions & 2 deletions lib/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,6 @@ def fasta2chunks(input, chunks, tmpdir, output):
handle.close()

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

0 comments on commit 8761d15

Please sign in to comment.