Документ взят из кэша поисковой машины. Адрес оригинального документа : http://kodomo.fbb.msu.ru/hg/allpy/raw-rev/6a735d0e920c
Дата изменения: Unknown
Дата индексирования: Tue Oct 2 08:18:36 2012
Кодировка:

# HG changeset patch
# User boris (kodomo)
# Date 1310718441 -14400
# Node ID 6a735d0e920c74410e09ff830048d11a95ebdbc0
# Parent 6adcfe433ce211104a4dae8cb6589fff37dde95c
pair_cores: more information in exceptions when reading input and loading pdb

diff -r 6adcfe433ce2 -r 6a735d0e920c pair_cores/pair_cores.py
--- a/pair_cores/pair_cores.py Fri Jul 15 12:23:35 2011 +0400
+++ b/pair_cores/pair_cores.py Fri Jul 15 12:27:21 2011 +0400
@@ -37,8 +37,9 @@
raise Exception("Provide input alignment or markup file")
try:
alignment = Alignment().append_file(input_file, format=input_file_format)
- except:
- raise Exception("Can not read input file %s" % input_file)
+ except Exception, e:
+ raise Exception("Can not read input file %s (%s: %s)" % \
+ (input_file, e.__class__, e))
unique_sequence_names = set([s.name for s in alignment.sequences])
if len(unique_sequence_names) != len(alignment.sequences):
raise Exception("Duplicate sequence names in %s" % input_file)
@@ -48,8 +49,9 @@
sequence.markups['pdb_resi'].add_pdb(download_pdb=pdb_getter, xyz_only=True)
else:
sequence.auto_pdb(xyz_only=True, pdb_getter=pdb_getter)
- except:
- raise Exception("Can't load structure for sequence %s from file %s" % (sequence.name, input_file))
+ except Exception, e:
+ raise Exception("Can't load structure for sequence %s from file %s (%s: %s)" % \
+ (sequence.name, input_file, e.__class__, e))
if len(alignment.sequences) < 2:
raise Exception("Alignment from file %s has too few sequences" % input_file)
block = Block.from_alignment(alignment)