Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: No 'SNP' column found #39

Open
mehrnooshshokouhi opened this issue Apr 24, 2024 · 3 comments
Open

ERROR: No 'SNP' column found #39

mehrnooshshokouhi opened this issue Apr 24, 2024 · 3 comments

Comments

@mehrnooshshokouhi
Copy link

mehrnooshshokouhi commented Apr 24, 2024

Hi, please have a look at my config. file bellow:
SCHEME STDERR
GENOMICCONTROL ON
AVERAGEFREQ ON
MINMAXFREQ ON
VERBOSE OFF
CUSTOMVARIABLE TotalSampleSize
LABEL TotalSampleSize as N

SEPARATOR TAB
MARKER SNP
ALLELE EffectAllele OtherAllele
FREQ MAF
EFFECT Beta
STDERR SE
WEIGHT N
PVALUE Pvalue
PROCESS /DATA/users/m.shokouhi/projects/GWAS-for-CBC/metal/meta_analysis/icogs.txt
PROCESS /DATA/users/m.shokouhi/projects/GWAS-for-CBC/metal/meta_analysis/onco.txt

OUTFILE /DATA/users/m.shokouhi/projects/GWAS-for-CBC/metal/meta_analysis/icogs_onco_meta. tbl
ANALYZE HETEROGENEITY
QUIT

Also, please have a look at the collumn name of my input data bellow:

colnames(icogs)
[1] "SNP" "CHR" "BP" "EffectAllele" "OtherAllele" "SE" "Pvalue" "N" "Beta" "Z_STAT"
[11] "MAF"
colnames(onco)
[1] "SNP" "CHR" "BP" "EffectAllele" "OtherAllele" "SE" "Pvalue" "N" "Beta" "Z_STAT"
[11] "MAF"

Why I still have the error of No 'SNP' column found?!

Looking forward to hearing from you.

@mehrnooshshokouhi
Copy link
Author

Hi again,
I have another issue as well.
I realized if I write the name of column within "" (for example "SNP"), then the meta analysis would work.
But I am not sure if it works correctly.
This is because I found that the first and second alleles swap in many SNPs!
I do not know how to fix it.
I would appreciate any guide.
Cheers,
Mehrnoosh

@welchr
Copy link
Member

welchr commented Apr 24, 2024

When writing out icogs.txt, it may be that R quoted the column names, which is why you need to then keep the quotations in the METAL config file. If instead you do write.table(..., quote=F) then R will not keep the quotation marks.

In regards to allele swaps - METAL will keep track of which alleles were provided by each study and flip accordingly so that effect sizes are relative to the same reference allele. See also:

@mehrnooshshokouhi
Copy link
Author

mehrnooshshokouhi commented Apr 25, 2024

Thank you for your prompt reply.
I am still confused about flipping alleles! Please check the table bellow. You see that the input data (two studies) consider the effect allele clearly. While in metal, it flipped the alleles and gave the beta for the reference allele, and of course showed the negative direction of the input studies for their reference allele. Additionally, it did not flip alleles for some other SNPs. What is the logic behind of this?
Best, Mehrnoosh

SNP/ Effect.a.x/ Other.a.x/ Beta.x/ Effect.a.y/ Other.a.y/ Beta.y/ Allele1/ Allele2/ Effect/ Direction

rs112149573:52581245:G:T / T / G / 0.149 / T / G / 0.129 / g / t / -0.1387 / --
rs12600239:52538900:C:T / T / C / 0.139 / T / C / 0.112 / c / t / -0.1247 / --
rs132289:29551872:A:G / G / A / 0.511 / G / A / 0.127 / a / g / -0.3547 / --

16:52582774:TAA:TA / TA / TAA / 0.137 / TA / TAA / 0.106 / ta / taa / 0.120 / ++
rs113333861:52614695:TA:T / T / TA / 0.166 / T / TA / 0.101 / t / ta / 0.130 / ++
rs132365:29599486:G:C / C / G / 0.598 / C / G / 0.096 / c / g / 0.395 / ++

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants