File tree Expand file tree Collapse file tree 3 files changed +21
-14
lines changed
Expand file tree Collapse file tree 3 files changed +21
-14
lines changed Original file line number Diff line number Diff line change 1- __version__ = "1.0"
1+ __version__ = "1.0.1 "
Original file line number Diff line number Diff line change @@ -275,18 +275,25 @@ def process_data(self, bamfile):
275275 self .gff_dbm .clear_caches ()
276276
277277 # second pass: process ambiguous alignment groups
278- if self .require_ambig_bookkeeping ():
279- t0 = time .time ()
280-
281- ambig_aln = self ._read_ambiguous_alignments (ambig_dumpfile )
282- n_align = self ._process_ambiguous_aln_groups (ambig_aln )
278+ if ambig_dumpfile :
279+ if os .path .isfile (ambig_dumpfile ) and os .stat (ambig_dumpfile ).st_size > 0 :
280+ t0 = time .time ()
283281
284- if not DEBUG :
285- os . remove ( ambig_dumpfile )
282+ ambig_aln = self . _read_ambiguous_alignments ( ambig_dumpfile )
283+ n_align = self . _process_ambiguous_aln_groups ( ambig_aln )
286284
287- t1 = time .time ()
288- print ("Processed {n_align} secondary alignments in {n_seconds:.3f}s." .format (
289- n_align = n_align , n_seconds = t1 - t0 ), flush = True )
285+ t1 = time .time ()
286+ print ("Processed {n_align} secondary alignments in {n_seconds:.3f}s." .format (
287+ n_align = n_align , n_seconds = t1 - t0 ), flush = True )
288+ else :
289+ print ("Warning: ambig-mode chosen, but bamfile does not contain secondary alignments." )
290+ self .overlap_counter .has_ambig_counts = True # we expect ambig cols in the outfile!
291+
292+ try :
293+ if not DEBUG :
294+ os .remove (ambig_dumpfile )
295+ except :
296+ pass
290297
291298 self .overlap_counter .annotate_counts (self .bamfile )
292299 self .overlap_counter .unannotated_reads += unannotated_ambig
Original file line number Diff line number Diff line change 88import re
99import sys
1010
11-
11+ from gffquant import __version__ as gffquant_version
1212here = path .abspath (path .dirname ("__file__" ))
1313
1414with open (path .join (here , "DESCRIPTION.md" ), encoding = "utf-8" ) as description :
1515 description = long_description = description .read ()
1616
1717 name = "gffquant"
18- version = [ line . strip (). split ( " " )[ - 1 ] for line in open ( "gffquant/__init__.py" ) if line . startswith ( "__version__" )][ 0 ]
18+ version = gffquant_version
1919
2020 if sys .version_info .major != 3 :
2121 raise EnvironmentError ("""{toolname} is a python module that requires python3, and is not compatible with python2.""" .format (toolname = name ))
3333 "Development Status :: 4 - Beta" ,
3434 "Topic :: Scientific Engineering :: Bio/Informatics" ,
3535 "License :: OSI Approved :: MIT License" ,
36- "Operating System :: POSIX :: Linux" ,
36+ "Operating System :: POSIX :: Linux" ,
3737 "Programming Language :: Python :: 3.7"
3838 ],
3939 zip_safe = False ,
You can’t perform that action at this time.
0 commit comments