parameters: (reference, profile, threshold)
return_statement: return alignedData
docstring: Align and merge reference and target profiles
docstring_summary: Align and merge reference and target profiles
docstring_tokens: Align and merge reference and target profiles
function: def alignData(reference, profile, threshold):
      ''' Align and merge reference and target profiles '''
  
      alignedData = []
      for ref in reference:
          prof = findAndRemove(profile, ref['name'])
  
          if prof:
              diff = (prof['averageMs'] / ref['averageMs'] - 1)*100
              if abs(diff) >= threshold:
                  alignedData.append(mergeRow(ref, prof, diff))
          else:
              alignedData.append(mergeRow(ref, None, None))
  
      for prof in profile:
          alignedData.append(mergeRow(None, prof, None))
  
      return alignedData
function_tokens: def alignData ( reference , profile , threshold ) : alignedData = [ ] for ref in reference : prof = findAndRemove ( profile , ref [ 'name' ] ) if prof : diff = ( prof [ 'averageMs' ] / ref [ 'averageMs' ] - 1 ) * 100 if abs ( diff ) >= threshold : alignedData . append ( mergeRow ( ref , prof , diff ) ) else : alignedData . append ( mergeRow ( ref , None , None ) ) for prof in profile : alignedData . append ( mergeRow ( None , prof , None ) ) return alignedData