Author: bugman Date: Wed Aug 31 14:50:56 2011 New Revision: 14548 URL: http://svn.gna.org/viewcvs/relax?rev=14548&view=rev Log: Fix for the reading of the sequence from generic formatted files with None in some of the columns. The generic_fns.mol_res_spin.generate_spin_id_data_array() fn now checks for when the data list contains 'None'. Modified: 1.3/generic_fns/mol_res_spin.py Modified: 1.3/generic_fns/mol_res_spin.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/mol_res_spin.py?rev=14548&r1=14547&r2=14548&view=diff ============================================================================== --- 1.3/generic_fns/mol_res_spin.py (original) +++ 1.3/generic_fns/mol_res_spin.py Wed Aug 31 14:50:56 2011 @@ -1569,17 +1569,17 @@ id = id + "#" + data[mol_name_col-1] # Residue data. - if res_num_col and data[res_num_col-1] != None: + if res_num_col and data[res_num_col-1] not in [None, 'None']: id = id + ":" + str(data[res_num_col-1]) - if (res_num_col and data[res_num_col-1] != None) and (res_name_col and data[res_name_col-1]): + if (res_num_col and data[res_num_col-1] not in [None, 'None']) and (res_name_col and data[res_name_col-1]): id = id + "&:" + data[res_name_col-1] elif res_name_col and data[res_name_col-1]: id = id + ":" + data[res_name_col-1] # Spin data. - if spin_num_col and data[spin_num_col-1] != None: + if spin_num_col and data[spin_num_col-1] not in [None, 'None']: id = id + "@" + str(data[spin_num_col-1]) - if (spin_num_col and data[spin_num_col-1] != None) and (spin_name_col and data[spin_name_col-1]): + if (spin_num_col and data[spin_num_col-1] not in [None, 'None']) and (spin_name_col and data[spin_name_col-1]): id = id + "&@" + data[spin_name_col-1] elif spin_name_col and data[spin_name_col-1]: id = id + "@" + data[spin_name_col-1]