Author: bugman Date: Mon Feb 2 09:11:41 2015 New Revision: 27435 URL: http://svn.gna.org/viewcvs/relax?rev=27435&view=rev Log: Fix for the lib.sequence_alignment.msa.msa_residue_skipping() function. The sequences argument for passing in the one letter codes has been removed. The per molecule loop should be over the alignment strings rather than one letter codes, otherwise the loop will be too short. Modified: trunk/lib/sequence_alignment/msa.py trunk/pipe_control/structure/main.py Modified: trunk/lib/sequence_alignment/msa.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/sequence_alignment/msa.py?rev=27435&r1=27434&r2=27435&view=diff ============================================================================== --- trunk/lib/sequence_alignment/msa.py (original) +++ trunk/lib/sequence_alignment/msa.py Mon Feb 2 09:11:41 2015 @@ -293,11 +293,9 @@ return strings, gaps -def msa_residue_skipping(sequences=None, strings=None, gaps=None): +def msa_residue_skipping(strings=None, gaps=None): """Create the residue skipping data structure. - @keyword sequences: The list of residue sequences as one letter codes. - @type sequences: list of str @keyword strings: The list of alignment strings. @type strings: list of str @keyword gaps: The gap matrix. @@ -309,12 +307,12 @@ # initialise. skip = [] - num_mols = len(sequences) + num_mols = len(strings) # Loop over each molecule. for mol_index in range(num_mols): skip.append([]) - for i in range(len(sequences[0])): + for i in range(len(strings[0])): # Create the empty residue skipping data structure. if strings == None: skip[mol_index].append(0) Modified: trunk/pipe_control/structure/main.py URL: http://svn.gna.org/viewcvs/relax/trunk/pipe_control/structure/main.py?rev=27435&r1=27434&r2=27435&view=diff ============================================================================== --- trunk/pipe_control/structure/main.py (original) +++ trunk/pipe_control/structure/main.py Mon Feb 2 09:11:41 2015 @@ -178,7 +178,7 @@ strings, gaps = msa_residue_numbers(one_letter_codes, residue_numbers=res_num_list) # Create the residue skipping data structure. - skip = msa_residue_skipping(sequences=one_letter_codes, strings=strings, gaps=gaps) + skip = msa_residue_skipping(strings=strings, gaps=gaps) # Assemble and return the atomic coordinates and common atom information. coord, mol_name_common, res_name_common, res_num_common, atom_name_common, element_common = assemble_coord_array(atom_pos=atom_pos, mol_names=mol_names, res_names=res_names, res_nums=res_nums, atom_names=atom_names, elements=elements, sequences=one_letter_codes, skip=skip)