Closed kayihui closed 5 months ago
Hi,
It seems your .gs file doesn't have the correct format. Can you double check it to make sure it follows the same format as the example .gs file? https://martinjzhang.github.io/scDRS/file_format.html
Hi Martin,
Thank you for your quick reply. The .gs file is a subset of the .gs file from the paper. I visually inspected the file, and didn't seem to see a difference.
I have rerun using the original magma_10kb_top1000_zscore.74_traits.rv1.gs file. It's working without error.
I attached the code for subsetting the .gs file.
# Define the subset and the rename dictionary
subset_values = ["PASS_MDD_Howard2019", "PASS_BIP_Mullins2021", "PASS_SleepDuration_Dashti2019", "UKB_460K.other_MORNINGPERSON"]
rename_dict = {
"PASS_MDD_Howard2019": "MDD",
"PASS_BIP_Mullins2021": "BP",
"PASS_SleepDuration_Dashti2019": "SleepDuration",
"UKB_460K.other_MORNINGPERSON": "MorningPerson"
}
# Subset the DataFrame
subset_df = df_gs[df_gs['TRAIT'].isin(subset_values)]
# Rename the values in the "Trait" column
subset_df['TRAIT'] = subset_df['TRAIT'].replace(rename_dict)
subset_df.to_csv("processed_geneset.gs", sep="\t")
Thank you very much, Ka Yi
Can you remove the first indexing column from the gs file and try running the code again?
It worked without the error. However, here's the result:
Computing scDRS score:
trait=BP: skipped due to small size (n_gene=0, sys_time=2.8s)
trait=MDD: skipped due to small size (n_gene=3, sys_time=2.8s)
trait=SleepDuration: skipped due to small size (n_gene=0, sys_time=2.8s)
trait=MorningPerson: skipped due to small size (n_gene=1, sys_time=2.8s)
Why it looks like the number of gene in the list is not correct?
Yes, it seems scDRS didn't recognize the genes. Did you specify the genes to be human genes?
my dataset is mouse, do I have to convert the gene name in the list?
But I see all your genes are upper-case, suggesting the disease genes are human genes.
Use this argument to specify the genes to be human genes --gs-species human
scDRS will do the auto-conversion.
Great! Everything is working fine now. Thank you!
Hi scDRS team,
I got the following error message. Please let me know how to resolve this.
Thank you. Ka Yi