Error:Celltype

27 views
Skip to first unread message

Surati Kumari

unread,
Dec 21, 2025, 8:04:40 PM12/21/25
to FUMA GWAS users
Hi,

Screenshot 2025-12-22 061033.png

I tried to perform Celltype analysis for all of my SNP2GENE dataset, however, other than 2 datast all of them returned error. I checked all three warnings for Error:Celltype : 
  1. Does your selected SNP2GENE job have MAGMA output? If you can see manhattan plot for gene-based test, this should not be the problem.

  2. Is your uploaded file an output of MAGMA gene analysis with an extension "genes.raw"?

  3. Does your file contain Ensembl gene ID? Otherwise, don't forget to UNCHECK the option to indicate that you are using Ensembl gene ID.


however, I can see Manhatttan plot for gene-based test for all dataset. Since I selected input directly from SNP2GENE module, I believe it has taken genes.raw file only, and even though I tried to perform the celltype analysis by manually passing magma.genes.raw (Job ID :690718), it still gave an error. 

Please help.

Thanks in advance.
 

Surati Kumari

unread,
Jan 6, 2026, 5:38:30 AMJan 6
to FUMA GWAS users
Hi, 

I made other attempts to understand this error. What I realized is that, when I perform celltype analysis by selecting all three steps, i.e. Step 1, Step 2 and Step 3, then Error:Celltype is thrown, however I tried to run one single steps at a time, and Step 1 did not throw any error. As soon as I select step 2 and step 3, the error returns.

1. 691152 : Step 1 only (Got results)
2. 691296 : Step 1&2 (Error)
3. 691234 : Step 1,2&3 (Error)

Can you please help me out? I am getting confused here.

Tanya Phung

unread,
Jan 7, 2026, 11:29:54 AMJan 7
to FUMA GWAS users
Hi, 

When step 2 and step 3 were run, it was the case that in step 2, which is the within dataset conditional analysis, MAGMA failed for reason such as variables are collinear with each other:

MAGMA error in step 2: 
WARNING: analysis failed for model 1; could not invert variable design matrix: variables are collinear with each other
ERROR - running gene-level regression: analysis failed for all variables/models

In this case, because of this failure on certain datasets, step 2 is terminated. 

You may wish to remove certain datasets that cause this problem. The only of doing this on FUMA Cell type is to test with a few datasets first and check which ones cause the error by trial and errors. 

Otherwise, you can try to implement FUMA cell type locally. 
I provided scripts for this here: https://github.com/tanyaphung/FUMA_Celltype_cmd
You can download the processed data on FUMA site: https://fuma.ctglab.nl/downloadPage

Best,
Tanya

Surati Kumari

unread,
2:48 AM (13 hours ago) 2:48 AM
to FUMA GWAS users
Hi, 

Thanks for responding. Though I have certain doubts. I am trying both ways, to run it via web server individually for different datasets and locally as well. 

Issue in trial and error method :
For example, for one of the gwas file (trait A) I ran celltype per scRNA-seq dataset  for step 1, 2 & 3 and could figure out the which datasets were throwing error. And since I am doing a comparative analysis I am supposed to chose similar scRNA-seq datasets for all my gwas files. And thus I ran celltype analysis for my other gwas file (trait B) with only those scRNA-seq datasets which successfully returned results for trait A. However, what was surprising for me was this job failed because of Error:Timeout. I thought maybe its because I'm choosing all three steps, so I ran same gwas file just for step 1 (Job ID : 707563), and it still failed with same Error:Timeout, but when I ran the same gwas file for all the scRNA-seq datasets (Brain) without excluding anything (Job ID : 707698) it produced results without any error. How can taking less number of celltype datasets take more time compared to larger set of celltype datasets?

Doubts while running locally :
At first I tried to run Step 1 via web server since step 1 was producing results without throwing any error when all Brain celltype dataset were selected, and then using those {ds}.gsa.out files to run step 2&3 locally. I was trying to run step 2&3 locally from step 1 outputs already generated by FUMA web-server. Since I already had {ds}.gsa.out files, I ran fuma_celltype_postStep1.R which returned magma_celltype_Step1.txt and magma_celltype_Step1_sig.txt for all the scRNA-seq dataset of interest altogether. 

Screenshot from 2026-02-13 12-34-20.png
step1_outputs : had all {ds}.gsa.out files
magmadir : had magma executable
celltype_filtered : all the preprocessed scRNA-seq datasets of interest (excluding problematic datasets from trait A trials)
datasets_used.txt : a list of datasets used to create celltype_filtered 
(ls step1_outputs/magma_celltype_*.gsa.out | sed 's/.*magma_celltype_//' | sed 's/.gsa.out//' > datasets_used.txt)

Now I am confused if I had to run fuma_celltype_postStep1.R for each region as listed in FUMA web-server e.g. Allocortex, Cerebellum, Hippocampus etc., since the flowchart mentions {per region} and then to run combine_step1_all_regions.py. Can't I use my fuma_celltype_postStep1.R outputs for create_parent_ds_input.py directly?

Also  does this mean I have to keep processed scRNA-seq dataset in sub-directories as per FUMA web-server and not all celltype datasets in single directory like I did in celltype_filtered ?
i.e. am I supposed to do this?
base_dir/
 └── TRAIT_A/
      ├── forebrain/                           # {ds}.gsa.out for celltype datasets in forebrain
      │    ├ magma_celltype_step1_sig.txt
      │    └ celltype/*.txt                      # filtered pre-processed celltype datasets 
      ├── thalamus/                           # {ds}.gsa.out for celltype datasets in thalamus
      │    ├ magma_celltype_step1_sig.txt
      │    └ celltype/*.txt                      # filtered pre-processed celltype datasets
      └── ... 


Currently I have :
fuma_celltype/
 ├ step1_outputs/                           # {ds}.gsa.out for all brain celltype datasets
 ├ celltype_filtered/                        # filtered pre-processed celltype datasets

alt text

I would really appreciate a bit of guidance here. Thanks beforehand for the time and consideration.
Reply all
Reply to author
Forward
0 new messages