Hey!
I have problems to read a .txt file in Plink (I am completely new to this software). I want to clump SNPs and used the following code:
plink --bfile ../Post --clump IQ.txt --clump-kb 250 --clump-r2 0.1 --clump-p1 0.5 --clump-p2 0.005 --out Final
Post is my data file (.bed, .fam, .bim) and IQ.txt is a txt file containing GWAS data. I have all files in the same folder (including the plink.exe), and I can read the Post file, but then I always get the error that there exists no IQ.txt file... I don´t understand why, or how to change the code??
Would be really happy if someone can help!
Hey! Thanks for your answer. But it is strange, I tried different things and sometimes it works and in most cases not! And everytime when plink reads the txt, the program crashes. Has anyone any idea what I can do? I need this GWAS txt data to clump....
Can you paste samples of your data so that I can test? Include all headers that may be in your files.
Also, on which operating system (OS) are you trying to execute this?; and from which OS did you obtain your files? Sometimes there can be annoying issues with character encoding, such as end-line characters.
First: Really thank you for your help! I wanted to use this GWAS data: https://ctg.cncr.nl/software/summary_statistics (I think it is easiest for you to see when you have a look at that) I renamed some headers, so that they are "SNP" and "P", like it is needed for Plink (done that in R). My study data (Post) is in .bid + .bed + .fam format. The 4 files are all in the plink folder. Plink can find the Post data, but has often (but as I said not always) problems to read the txt data, and if yes the program crashes. I use Windows 7 64 bit...
and here is one example from one txt file... HR SNP BP A1 A2 INFO OR SE P 1 rs202152658 751343 A T 0.884 1.03118 0.0221 0.1654 1 rs143225517 751756 T C 0.884 0.96977 0.0221 0.1654
You mention that it functions sometimes but then crashes? I think that this is most likely an issue with your OS having too little RAM, or something like that.
Do you have any other options in terms of operating system and running Plink?
Yeah right.. Hmm I´ve tried it on 2 different computers, same issue. But then there remains also the question why it can´t even find the txt files in some cases... I tried things like ./ ../ before and so on, but as I said it often says that there are no files... Do you have any other idea what I can try?
Hello again!
There has to be logical reasons for why it functions one minute and then not function the next. Computers don't 'do' randomness and are fundamentally base on logic (even when they claim to calculate random numbers). My hands are extremely limited here because I cannot see what you are trying each time.
Some tips:
Do not use relative paths (e.g. ../../) - use absolute (i.e. full) file paths. The use of absolute file paths will mitigate issues that you may have based on your current working directory, meaning that you can run your command from any location in your directory structure. If my current working directory is
/home/TinaTurner/Analysis/
and my file is located in/home/TinaTurner/
, then:Relative path:
../file
Absolute path:
/home/TinaTurner/file
Monitor your resource use each time that you execute the program to ensure that there are indeed no issues with RAM
Hey! Thanks for your patience! I go always over: shift key& right mouse click to open the folder/ command window. and directly in there I have my data and write my output file to this. This should be okay, right? But then I should not use this ../ The write access should not be the problem as I create a new output file? And could you explain how I can monitor my resource use or may even how I check writing access? Really sorry for all this questions but I have never worked with this before..
I am confident that I could resolve this if I was there! Can you o me a big favour and make the exact files that you are using available for download?; or, just paste small samples of them here so that I can test.
I do not have time, unfortunately, to look through the link that you mentioned (https://ctg.cncr.nl/software/summary_statistics) and to download data from there.
Grazie / Gracias / Obrigado / Danke (?)