Open nnekaede opened 6 years ago
From the data you showed I am not sure if this is only for "Y" or you have more elements in column ['f0']. If it is only for "Y", you can write "chrs_plot=['Y']", or if there are other elements in that list you can write "chrs_plot=np.unique(manhattan_plot_data['f0'].astype(str))" (line 4).
My data looks a little different than the one from the tutorial. I converted it from a pandas DataFrame to a NumPy array using this line of code:
# convert dataframe to numpy array for assocplots manhattan_plot_data = manhattan_plot_df.values
My data looks like such when it is a np array:
[['Y' 15016019.0 'ENSG00000000419' 0.11661291909180488] ['Y' 15016019.0 'ENSG00000000457' 0.3375253528924895] ['Y' 15016019.0 'ENSG00000000938' 0.7934988001982753] ... ['Y' 15016019.0 'ENSG00000107929' 0.0015774481443468435] ['Y' 15016019.0 'ENSG00000184743' 0.024884285526804023] ['Y' 15016019.0 'ENSG00000169895' 0.0021853699533324845]]
When I run this line of code:
manhattan_plot_data['f3'], manhattan_plot_data['f1'], manhattan_plot_data['f0'].astype(str)
I get the following error:
Could you please tell me what I am doing wrong?