def get_rarefaction_data(rarefaction_data, col_headers):
 rare_mat_raw = array(rarefaction_data)
 rare_mat_min = [rare_mat_raw[x][2:] for x in range(0, len(rare_mat_raw))]
 seqs_per_samp = [rare_mat_raw[x][0] for x in range(0, len(rare_mat_raw))]
 sampleIDs = col_headers[3:]
 rare_mat_trans = transpose(array(rare_mat_min)).tolist()
 return (rare_mat_trans, seqs_per_samp, sampleIDs)

def get_rarefaction_data ( rarefaction_data , col_headers ) : rare_mat_raw = array ( rarefaction_data ) rare_mat_min = [ rare_mat_raw [ x ] [ 2 : ] for x in range ( 0 , len ( rare_mat_raw ) ) ] seqs_per_samp = [ rare_mat_raw [ x ] [ 0 ] for x in range ( 0 , len ( rare_mat_raw ) ) ] sampleIDs = col_headers [ 3 : ] rare_mat_trans = transpose ( array ( rare_mat_min ) ) . tolist ( ) return ( rare_mat_trans , seqs_per_samp , sampleIDs )
this function takes a rarefaction file and converts it into an array .