Entering edit mode
2.5 years ago
akilabioinfo
▴
10
Hello all,
I have used dropletutils to identify the empty droplet. Now i would like to add FDR information in the adata.obs.
But all the values are "NaN" when i try to copy the FDR values to adata.obs
enter code here
adata=anndata.read_h5ad("/home/akila/data/adata.h5ad")
#metadata includes the FDR information from droplet utils e_out
metadata=pd.read_csv("/home/akila/data/metadata.csv")
adata.obs["FDR"]=metadata["FDR"]
`I have also tried to replace "NaN" values with "1" and proceed the same but still these float values are replaced with Nan while copying into adata.obs
How to fix this.Help me
I have attached the sample output
please post some example data from both the data frames. check the dtype of the dataframe esp FDR column in each of the data frame.
"Join" the data using a matching column instead of doing this blind assignment operation.
I have done that too!! its not working. I couldnt able to copy from my metadata to anndata adata.obs(returns NAN values)
Follow cpad0112's advice. In the meantime, please do not paste screenshots of plain text content, it is counterproductive. You can copy paste the content directly here (using the code formatting option shown below), or use a GitHub Gist if the content volume exceeds allowed length here.
Fixed it
Index are different and aligned the index!! It Works