kaizhang / SnapATAC2

Single-cell epigenomics analysis tools
https://kzhang.org/SnapATAC2/
197 stars 20 forks source link

add_cor_scores could only selects capitalized genes? #260

Open zkcao opened 4 months ago

zkcao commented 4 months ago

Hi Kai,

While I was running add_cor_scores for some mouse data, I found that the select argument could only take capitalized gene names. I used network = snap.tl.init_network_from_annotation(regions, anno_file = snap.genome.mm10, upstream=500000, downstream=500000, id_type='gene_name', coding_gene_only=True) to set up the network. As I ran snap.tl.add_cor_scores(network, gene_mat = expr, peak_mat = damage, select = variable_gene, overwrite = True) only one gene would get selected. Adding var_upper = [gene.upper() for gene in variable_gene] would pass all the genes I wanted to the add_cor_scores function. Thanks for the help in advance!

kaizhang commented 4 months ago

Yes, the current implementation is case-sensitive. I'll look into this and see if it can implemented differently.