I am relatively new to Python and Scanpy and recently i have generated a list of differentially expressed genes by using the
sc.tl.rank_genes_groups
function in scanpy.. I can then get these genes to be listed in the console, by carrying out this command set
result = adata_subset.uns['rank_genes_groups']
` groups = result['names'].dtype.names
pd.DataFrame(
{group + '_' + key[:1]: result[key][group]
for group in groups for key in ['names','logfoldchanges','pvals','pvals_adj']})'
However, i want this to be accessible via a csv file, as this list doesnt show all the genes... Any help would be much appreciated! Thanks in advance