def detrend_pcoa(input_fp, map_fp=None, gradient_variable=None, suppress_prerotate=False, output_dir='.', HALT_EXEC=False):
 dt = Detrender(HALT_EXEC=HALT_EXEC)
 if (map_fp is not None):
  dt.Parameters['-m'].on(map_fp)
 if (gradient_variable is not None):
  dt.Parameters['-c'].on(gradient_variable)
 if suppress_prerotate:
  dt.Parameters['-r'].on()
 dt.Parameters['-o'].on(output_dir)
 app_result = dt(input_fp)
 return app_result

def detrend_pcoa ( input_fp , map_fp = None , gradient_variable = None , suppress_prerotate = False , output_dir = '.' , HALT_EXEC = False ) : dt = Detrender ( HALT_EXEC = HALT_EXEC ) if ( map_fp is not None ) : dt . Parameters [ '-m' ] . on ( map_fp ) if ( gradient_variable is not None ) : dt . Parameters [ '-c' ] . on ( gradient_variable ) if suppress_prerotate : dt . Parameters [ '-r' ] . on ( ) dt . Parameters [ '-o' ] . on ( output_dir ) app_result = dt ( input_fp ) return app_result
detrend pcoa scores in input_fp input_fp: path to pcoa file map_fp: path to metadata table gradient_variable: column header for gradient variable in metadata table suppress_prerotate: true including metadata but dont want prerotation output_dir: directory where output should be written halt_exec: halt just before running the formatdb command and .