Regarding MAGMA

1,052 views
Skip to first unread message

parveen...@gmail.com

unread,
May 27, 2021, 10:23:59 AM5/27/21
to FUMA GWAS users
Hello ,

I am using magma for gene-based analysis. I am pasting here my,codes, files and errors:

CODES:
STEP -1 Annotation
./magma --annotate --snp-loc YKL40ForMagma.txt --gene-loc NCBI38.gene.loc --out 1_YKL40_emagma
This step gives me "1_YKL40_emagma.genes.annot".
STEP-2 Gene-Based Analysis
./magma --bfile  --pval PVAL_FILE N=275 --gene-annot 1_YKL40_emagma.genes.annot --out 2_YKL40_emagma

FILES:
NCBI38.gene.loc

PVAL_FILE (My file after performing GWAS, it is GWAS summary statistics):
SNP     P
chr1:727242:G:A 0.159351
chr1:733014:AG:A        0.669175
chr1:740738:C:T 0.868716
chr1:758245:T:C 0.941788

g1000_eur FILE : 
g1000_eur.bed
g1000_eur.fam 
g1000_eur.bim 
g1000_eur.synonyms

N=275 because my dataset has 275 samples.

My errors are : 

Welcome to MAGMA v1.09a (linux)
Using flags:
        --bfile g1000_eur
        --pval PVAL_FILE N=275
        --gene-annot 1_YKL40_emagma.genes.annot
        --out 2_YKL40_emagma

Start time is 16:06:23, Thursday 27 May 2021

Loading PLINK-format data...
Reading file g1000_eur.fam... 503 individuals read
Reading file g1000_eur.bim... 22665064 SNPs read
Preparing file g1000_eur.bed...

Reading SNP synonyms from file g1000_eur.synonyms (auto-detected)
        read 6016767 mapped synonyms from file, mapping to 3921040 SNPs in the data
        WARNING: detected 133 synonymous SNP pairs in the data
                 skipped all synonym entries involved, synonymous SNPs are kept in analysis
                 writing list of detected synonyms in data to supplementary log file
Reading SNP p-values from file PVAL_FILE...
        detected 2 variables in file
        using variable: SNP (SNP id)
        using variable: P (p-value)

ERROR - reading p-value file: no valid p-values found for any SNPs in the data

Terminating program.

I am not understanding this error. Could you please help me resolving this issue.

Thanking you in anticipation
Sincerely,
Kayenat Parveen

Judit Cabana Dominguez

unread,
Sep 20, 2021, 8:36:36 AM9/20/21
to FUMA GWAS users
Hi,

I guess you already solved this issue, otherwise I think that the error is due to your SNPid. You don't have rsid in your data, so MAGMA cannot calculate LD with g1000 data (it has rsid). You should first convert your SNPid to rsid and then run MAGMA again.

Best,

Judit

victor lin

unread,
Sep 24, 2024, 1:27:22 PM9/24/24
to FUMA GWAS users
Hi, 

I'm running in issues with the gene-based analysis using MAGMA. Wondering if I could get advice on what is going wrong, if this is still an active group? 

CODE:

Magma --bfile /Users/viclin/Desktop/GWPA_Pain/g1000_eur --pval /Users/viclin/Update_SNP_Loc_File_2-pval N=N --gene-annot /users/viclin/Desktop/GWPA_Pain/AOS_Gene_Annotation2.genes.annot --out /Users/viclin/Desktop/GWPA_Pain

After running, I get this error:


Welcome to MAGMA v1.10 (custom)

Using flags:

                  --bfile /Users/viclin/Desktop/GWPA_Pain/g1000_eur

                  --pval /Users/viclin/Update_SNP_Loc_File_2-pval N=N

                  --gene-annot /users/viclin/Desktop/GWPA_Pain/AOS_Gene_Annotation2.genes.annot

                  --out /Users/viclin/Desktop/GWPA_Pain

 Start time is 21:35:04, Sunday 22 Sep 2024

ERROR - parsing arguments: file '/Users/viclin/Desktop/GWPA_Pain/g1000_eur.bed' specified in --bfile does not exist or is not a file.


Any help or advice would be appreciated. Thank you!

Best regards,

Victor


Marijn Schipper

unread,
Sep 25, 2024, 6:01:51 AM9/25/24
to FUMA GWAS users
Hi Victor,

It seems that the path you specified; ' /Users/viclin/Desktop/GWPA_Pain/g1000_eur ' is not the full path to the data. 
Please make sure this is the correct full path to the file.

Let me know if that solves your issue.

Best,
Marijn


Op dinsdag 24 september 2024 om 19:27:22 UTC+2 schreef victor lin:

victor lin

unread,
Oct 4, 2024, 1:49:07 PM10/4/24
to FUMA GWAS users
Hi Marijn,

Thank you for the tip on the previous post.  I needed an additional piece to my prefix path. 

I have since ran the gene-based analysis producing the genes.raw and genes.out files.  However, I am now running into issues with the gene-set analysis, specifically the problem below.  I'm not sure what the issues is because the entrez gene ID found in my genes.out file can be found in the Syngo dataset when I manually search for it. Is it a formatting issue of the input files? In my Syngo geneset file I have it as a row-based input file with my first column as dataset name (Syngo) and second column as gene Entrez ID.  Able to help? Thanks in advance!

Welcome to MAGMA v1.10 (custom)

Using flags:

--gene-results /Users/viclin/Desktop/GWPA_Pain.genes.raw

--set-annot /Users/viclin/Desktop/GWPA_Pain/Syngo GeneSet_EntrezID.txt

--out /Users/viclin/Desktop/GWPA_Pain_gene_set_results


Start time is 09:49:39, Thursday 03 Oct 2024


Reading file /Users/viclin/Desktop/GWPA_Pain.genes.raw... 

19286 genes read from file

Loading gene-set annotation...

Reading file /Users/viclin/Desktop/GWPA_Pain/Syngo GeneSet_EntrezID.txt... 

WARNING: gene set syngo contains no genes defined in genotype data

WARNING: gene set syngo contains no genes defined in genotype data

WARNING: gene set syngo contains no genes defined in genotype data

WARNING: gene set syngo contains no genes defined in genotype data

WARNING: gene set syngo contains no genes defined in genotype data

WARNING: gene set syngo contains no genes defined in genotype data

WARNING: gene set syngo contains no genes defined in genotype data


ERROR - reading gene-set annotation file: file contained 1 duplicate gene-set names; writing list of IDs to supplementary log file


Terminating program.


Tanya Phung

unread,
Oct 5, 2024, 1:50:37 AM10/5/24
to FUMA GWAS users
Hello, 

Here, it looks like you are running MAGMA on the command line. For this reason, please see the MAGMA website for questions relating to MAGMA: https://cncr.nl/research/magma/. This support forum is for FUMA, and we can support questions related to MAGMA if it was run within the FUMA platform. 

I highly suggest that you follow the MAGMA tutorial closely (maybe try with an example file). If the issue still persists, please try emailing the contact that is listed on the MAGMA page with detailed information about the command you ran and what the issue is. 

I hope that we have informed you well and good luck. 
FUMA Team

Reply all
Reply to author
Forward
0 new messages