Skip to content

Commit 58d2600

Browse files
author
Jon Palmer
committed
stage for v1.6.0 release
1 parent 16500bc commit 58d2600

File tree

4 files changed

+37
-27
lines changed

4 files changed

+37
-27
lines changed

bin/funannotate-test.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def __init__(self,prog):
1717
epilog="""Written by Jon Palmer (2016-2018) [email protected]""",
1818
formatter_class = MyFormatter)
1919
parser.add_argument('-t','--tests', required=True, nargs='+',
20-
choices=['all', 'clean', 'mask', 'predict', 'annotate', 'busco', 'rna-seq', 'compare'],
20+
choices=['all', 'clean', 'mask', 'predict', 'annotate', 'rna-seq', 'compare'],
2121
help='select which tests to run')
2222
parser.add_argument('--cpus', default=2, type=int, help='Number of CPUs to use')
2323
args=parser.parse_args()
@@ -165,7 +165,7 @@ def runPredictTest():
165165
print("#########################################################")
166166
#check results
167167
try:
168-
assert 1500 <= countGFFgenes(os.path.join(tmpdir, 'annotate', 'predict_results', 'Awesome_testicus.gff3')) <= 1700
168+
assert 1500 <= countGFFgenes(os.path.join(tmpdir, 'annotate', 'predict_results', 'Awesome_testicus.gff3')) <= 1800
169169
print('SUCCESS: `funannotate predict` test complete.')
170170
shutil.rmtree(tmpdir)
171171
except AssertionError:
@@ -182,7 +182,7 @@ def runBuscoTest():
182182
lib.log.error("$AUGUSTUS_CONFIG_PATH environmental variable not found, set to continue.")
183183
return
184184
if os.path.isdir(os.path.join(AUGUSTUS, 'species', 'awesome_busco')):
185-
shutil.rmtree(os.path.join(AUGUSTUS, 'species', 'awesome_busco'))
185+
shutil.rmtree(os.path.join(AUGUSTUS, 'species', 'awesome_busco'))
186186
tmpdir = 'test-busco_'+pid
187187
os.makedirs(tmpdir)
188188
inputFasta = 'test.softmasked.fa'
@@ -201,7 +201,7 @@ def runBuscoTest():
201201
print("#########################################################")
202202
#check results
203203
try:
204-
assert 1500 <= countGFFgenes(os.path.join(tmpdir, 'annotate', 'predict_results', 'Awesome_busco.gff3')) <= 1700
204+
assert 1500 <= countGFFgenes(os.path.join(tmpdir, 'annotate', 'predict_results', 'Awesome_busco.gff3')) <= 1800
205205
print('SUCCESS: `funannotate predict` BUSCO-mediated training test complete.')
206206
shutil.rmtree(tmpdir)
207207
except AssertionError:
@@ -259,7 +259,7 @@ def runCompareTest():
259259
shutil.copyfile(input3, os.path.join(tmpdir, input3))
260260
#run predict
261261
runCMD(['funannotate', 'compare',
262-
'-i', input1, input2, input3,
262+
'-i', input1, input2, input3,
263263
'-o', 'compare', '--cpus', str(args.cpus),
264264
'--run_dnds', 'estimate', '--outgroup', 'botrytis_cinerea.dikarya'], tmpdir)
265265
print("#########################################################")
@@ -273,7 +273,7 @@ def runCompareTest():
273273
except AssertionError:
274274
print('ERROR: `funannotate compare` test failed - check logfiles')
275275
print("#########################################################\n")
276-
276+
277277
def runRNAseqTest():
278278
print("#########################################################")
279279
print('Running funannotate RNA-seq training/prediction unit testing')
@@ -284,7 +284,7 @@ def runRNAseqTest():
284284
lib.log.error("$AUGUSTUS_CONFIG_PATH environmental variable not found, set to continue.")
285285
return
286286
if os.path.isdir(os.path.join(AUGUSTUS, 'species', 'awesome_rna')):
287-
shutil.rmtree(os.path.join(AUGUSTUS, 'species', 'awesome_rna'))
287+
shutil.rmtree(os.path.join(AUGUSTUS, 'species', 'awesome_rna'))
288288
tmpdir = 'test-rna_seq_'+pid
289289
os.makedirs(tmpdir)
290290
inputFasta = 'test.softmasked.fa'
@@ -296,7 +296,7 @@ def runRNAseqTest():
296296
download(download_links.get('rna-seq'), 'test-rna_seq.tar.gz')
297297
subprocess.call(['tar', '-zxf', 'test-rna_seq.tar.gz'])
298298
for f in [inputFasta, protEvidence, illumina, nanopore]:
299-
shutil.copyfile(f, os.path.join(tmpdir, f))
299+
shutil.copyfile(f, os.path.join(tmpdir, f))
300300
#run train
301301
runCMD(['funannotate', 'train', '-i', inputFasta,
302302
'--single', illumina, '--nanopore_mrna', nanopore,
@@ -313,7 +313,7 @@ def runRNAseqTest():
313313
print("#########################################################")
314314
print('Now running `funannotate update` to run PASA-mediated UTR addition and multiple transcripts')
315315
runCMD(['funannotate', 'update', '-i', 'rna-seq',
316-
'--cpus', str(args.cpus)], tmpdir)
316+
'--cpus', str(args.cpus)], tmpdir)
317317
print("#########################################################")
318318
#check results
319319
try:
@@ -332,11 +332,11 @@ def runRNAseqTest():
332332
runMaskTest()
333333
if 'predict' in args.tests or 'all' in args.tests:
334334
runPredictTest()
335-
if 'busco' in args.tests or 'all' in args.tests:
336-
runBuscoTest()
335+
#if 'busco' in args.tests or 'all' in args.tests:
336+
# runBuscoTest()
337337
if 'rna-seq' in args.tests or 'all' in args.tests:
338-
runRNAseqTest()
338+
runRNAseqTest()
339339
if 'annotate' in args.tests or 'all' in args.tests:
340-
runAnnotateTest()
340+
runAnnotateTest()
341341
if 'compare' in args.tests or 'all' in args.tests:
342-
runCompareTest()
342+
runCompareTest()

dockerbuild/Dockerfile-base

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ RUN wget --quiet https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86
3131
sudo /bin/bash ~/miniconda.sh -b -p /home/linuxbrew/conda && rm ~/miniconda.sh && sudo chown -R linuxbrew: /home/linuxbrew/conda && \
3232
conda update -y conda && conda config --add channels r && conda config --add channels defaults && \
3333
conda config --add channels etetoolkit && conda config --add channels conda-forge && conda config --add channels bioconda && \
34-
conda install -y numpy pandas scipy matplotlib seaborn natsort scikit-learn psutil biopython requests \
34+
conda install -y numpy pandas scipy matplotlib seaborn natsort scikit-learn psutil biopython requests snap glimmerhmm=3.0.4=pl526h0a44026_3 \
3535
goatools fisher bedtools blat hmmer exonerate diamond tbl2asn hisat2 ucsc-pslcdnafilter stringtie perl-dbd-sqlite \
3636
samtools raxml trimal mafft phyml kallisto bowtie2 infernal perl-threaded perl-db-file perl-bioperl perl-dbd-mysql \
3737
perl-app-cpanminus mummer ete3 ete_toolchain minimap2 salmon=0.9.1 jellyfish htslib nano perl-text-soundex perl-scalar-util-numeric && \
@@ -100,5 +100,5 @@ RUN wget --quiet https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86
100100

101101
COPY pasa_conf.txt /home/linuxbrew/PASApipeline/pasa_conf/conf.txt
102102

103-
RUN wget https://github.com/nextgenusfs/funannotate/archive/1.5.3.tar.gz && \
104-
tar -zxvf 1.5.3.tar.gz && rm 1.5.3.tar.gz && mv funannotate-1.5.3 funannotate
103+
RUN wget https://github.com/nextgenusfs/funannotate/archive/1.6.0.tar.gz && \
104+
tar -zxvf 1.6.0.tar.gz && rm 1.6.0.tar.gz && mv funannotate-1.6.0 funannotate

funannotate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ def fmtcols(mylist, cols):
421421
you cannot download from the machine funannotate is installed at - then download
422422
the 7 tar.gz files from https://osf.io/bj7v4/files/ and run script from directory
423423
424-
Arguments: -t, --tests Test sets to run. [all,clean,mask,predict,busco,rna-seq,annotate,compare]
424+
Arguments: -t, --tests Test sets to run. [all,clean,mask,predict,rna-seq,annotate,compare]
425425
--cpus Number of cpus to use. Default: 2
426426
427427
Written by Jon Palmer (2016-2018) [email protected]

util/check_modules.py

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ def check_version2(name):
9191
elif name == 'mafft':
9292
vers = subprocess.Popen([name, '--version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[1]
9393
vers = vers.strip()
94+
elif name == 'emapper.py':
95+
vers = subprocess.Popen([name, '--version'], stdout=subprocess.PIPE).communicate()[0].split('\n')[1].replace('emapper-', '')
9496
else:
9597
vers = subprocess.Popen([name, '--version'], stdout=subprocess.PIPE).communicate()[0].split('\n')[0]
9698
if 'exonerate' in vers:
@@ -158,11 +160,19 @@ def check_version5(name):
158160
vers = subprocess.Popen([name], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
159161
vers = 'no way to determine'
160162
elif name == 'CodingQuarry':
161-
vers = subprocess.Popen([name], stdout=subprocess.PIPE).communicate()
162-
v = vers[0].split('\n')
163-
for i in v:
164-
if 'CodingQuarry v.' in i:
165-
vers = i.split('v. ')[-1]
163+
vers = subprocess.Popen([name], stdout=subprocess.PIPE).communicate()
164+
v = vers[0].split('\n')
165+
for i in v:
166+
if 'CodingQuarry v.' in i:
167+
vers = i.split('v. ')[-1]
168+
elif name == 'snap':
169+
vtmp = subprocess.Popen(['snap'], stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].rstrip().split('\n')
170+
for i in vtmp:
171+
if i.startswith('SNAP'):
172+
vers = i.split('(version ')[-1].rstrip(')')
173+
elif name == 'glimmerhmm':
174+
vtmp = subprocess.Popen(['snap'], stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].rstrip().split('\n')
175+
vers = '3.0.4'
166176
except OSError as e:
167177
if e.errno == os.errno.ENOENT:
168178
return False
@@ -207,12 +217,12 @@ def check_version6(name):
207217

208218
programs1 = ['tblastn', 'makeblastdb', 'rmblastn', 'java'] #-version
209219
programs2 = ['exonerate', 'bedtools', 'bamtools', 'augustus',
210-
'samtools', 'gmap', 'hisat2', 'Trinity', 'nucmer',
211-
'tbl2asn', 'emapper.py', 'minimap2', 'mafft',
212-
'trimal', 'stringtie'] #--version
220+
'samtools', 'gmap', 'hisat2', 'Trinity', 'nucmer',
221+
'tbl2asn', 'emapper.py', 'minimap2', 'mafft',
222+
'trimal', 'stringtie', 'salmon'] #--version
213223
programs3 = ['RepeatModeler', 'RepeatMasker'] #-v
214224
programs4 = ['diamond', 'ete3', 'kallisto'] #version
215-
programs5 = ['gmes_petap.pl', 'blat', 'pslCDnaFilter', 'fasta', 'CodingQuarry'] #no version option at all, a$$holes
225+
programs5 = ['gmes_petap.pl', 'blat', 'pslCDnaFilter', 'fasta', 'CodingQuarry', 'snap', 'glimmerhmm'] #no version option at all, a$$holes
216226
programs6 = ['hmmsearch', 'hmmscan', 'tRNAscan-SE'] #-h
217227
programs7 = ['signalp'] # -V
218228

0 commit comments

Comments
 (0)