@@ -446,7 +446,7 @@ def check_bedtools_version(bt_path):
446
446
found_ver = parse_version (vstr )
447
447
req_ver = parse_version ("2.30.0" )
448
448
return found_ver >= req_ver
449
- except subprocess . CalledProcessError as err :
449
+ except Exception as err :
450
450
# in this case couldn't even run subprocess
451
451
logging .warning (f" Cannot check bedtools version. The error message was: { err } " )
452
452
return False
@@ -608,7 +608,7 @@ def make_splici_txome(
608
608
# load gtf
609
609
try :
610
610
gr = pr .read_gtf (gtf_path )
611
- except ValueError as err :
611
+ except Exception as err :
612
612
# in this case couldn't even read the GTF file
613
613
logging .error (
614
614
"" .join (
@@ -774,13 +774,13 @@ def make_splici_txome(
774
774
if tid2strand [prev_rec .id ] == "-" :
775
775
prev_rec = prev_rec .reverse_complement (id = True , description = True )
776
776
SeqIO .write (prev_rec , out_handle , "fasta" )
777
- # shutil.rmtree(temp_dir, ignore_errors=True)
777
+ shutil .rmtree (temp_dir , ignore_errors = True )
778
778
except Exception as err :
779
779
no_bt = True
780
780
logging .warning (
781
781
f" Bedtools failed; Using biopython instead. The error message was: \n { err } "
782
782
)
783
- # shutil.rmtree(temp_dir, ignore_errors=True)
783
+ shutil .rmtree (temp_dir , ignore_errors = True )
784
784
785
785
if no_bt :
786
786
with open (out_fa , "w" ) as out_handle :
@@ -1015,7 +1015,7 @@ def make_spliceu_txome(
1015
1015
"" .join (
1016
1016
[
1017
1017
" PyRanges failed to parse the input GTF file." ,
1018
- " Please check the PyRanges documentation for " ,
1018
+ " Please check the PyRanges documentation for" ,
1019
1019
" the expected GTF format constraints at" ,
1020
1020
" https://pyranges.readthedocs.io/en/latest/autoapi/pyranges/readers/index.html?highlight=read_gtf#pyranges.readers.read_gtf ." ,
1021
1021
f" The error message was: { str (err )} " ,
@@ -1137,7 +1137,7 @@ def make_spliceu_txome(
1137
1137
logging .warning (
1138
1138
f" Bedtools failed; Using biopython instead. The error message was: { err } "
1139
1139
)
1140
- # shutil.rmtree(temp_dir, ignore_errors=True)
1140
+ shutil .rmtree (temp_dir , ignore_errors = True )
1141
1141
1142
1142
if no_bt :
1143
1143
with open (out_fa , "w" ) as out_handle :
0 commit comments