8
votes
Accepted
Converting VCF file to PLINK bed/bim/fam files
Given that Plink reads in VCF files natively, and Plink is your desired output format, I expect that plink --vcf <file> would be the best option.
As mentioned ...
8
votes
Accepted
Is there any difference between SNPs 'AG' and 'GA' in association analyses?
Could you please show us the context in which this appears, as you seem to be interpreting this differently to Devon.
If it's appearing as you say, GA and AG, then Devon is right, this usually means ...
5
votes
Convert rs ID of one hg build to rs IDs of another build
You can assume that the overwhelming majority of rsIDs are the same between GRCh37 and GRCh38 (they're semi-stable IDs). There are, however, a number of rsIDs that are present only in GRCh37, which ...
5
votes
Accepted
PLINK clump behavior on missing SNPs?
Most likely, the GWASs that generated your summary statistics used other imputation panels than 1000G, like HRC. Clearly, PLINK can't estimate the LD for SNPs that aren't found in the reference, and ...
4
votes
Is there any difference between SNPs 'AG' and 'GA' in association analyses?
Is "user5054" the same as "user5504"? No? Exactly. Not only does order matter, it's incredibly vitally important. AG and GA are ...
4
votes
Accepted
How do I remove allele annotations from SNP Ids in .bim file?
The simplest approach is to remove the first occurrence of a _ followed by a capital letter, another _ and another capital ...
3
votes
PLINK clump behavior on missing SNPs?
You can use imputation for guessing at what the missing SNPs might be based on known LD patterns in populations. This procedure will give you an idea of whether the recombinational history of genomic ...
3
votes
Plink 1.9 equivalent of --score sum in Plink 2.0
plink2 --score cols=+scoresums
See https://www.cog-genomics.org/plink/2.0/general_usage#colset and https://www.cog-genomics.org/plink/2.0/score for details.
3
votes
Accepted
Visualize PLINK pedigree files
We use kinship2 R package to visualize pedigree files (.fam plink files). For some reasons, some characters from plink ped aren't supported (like "-9" for unknown ...
3
votes
Converting VCF file to PLINK bed/bim/fam files
Additional tidbit I learned in the last year that I wanted to share with anyone else that's working on this.
Plink creates an extremely generic fam file for you, but if you are updating this fam file ...
3
votes
How to create artificial or dummy phenotype data
Using wakefield package it is pretty easy, here is an example from GitHub page. This will create 500 dummy variables for id, race, age, etc. :
...
3
votes
Is there any difference between SNPs 'AG' and 'GA' in association analyses?
Most association analyses are carried out at a single SNP level, so AG and GA are likely to indicate a heterozygous genotype at a particular location. However, the precise notation matters.
As @...
3
votes
Accepted
Nextflow: No signature of Method: chr() is applicable for argument types; unknown variable
The documation re conditional scripts is useful here:
Process scripts can contain conditional statements by simply prefixing
the script block with the keyword ...
2
votes
Accepted
Convert rs ID of one hg build to rs IDs of another build
Did you try the liftOver tool of UCSC? You'll need a BED file with your SNPs coordinates for this.
You can also do this in R with ...
2
votes
LD analysis in PLINK based on reference and a SNP list
It looks like the first command is calculating pairwise linkage disequilibrium r2 between your SNPs.
The second command is clumping your dataset based on a p-value over a file of association test ...
2
votes
Calculate average parental genotype
Beside the correct question by @Kamil, this sounds like a job for datamash.
First let's get the number of columns in the file
...
2
votes
Accepted
Parallel in PLINK for linear association for SNP effects
Try the latest plink 2.0 alpha build for this. It’s an incomplete program, but its implementation of —linear is far better than v1.9’s.
2
votes
Accepted
PLINK - Transposed BED file?
Yes, this exists, and can be efficiently generated by plink 2.0's --export ind-major-bed command. (The third byte is 0 instead of 1, and the specification is ...
2
votes
Accepted
Plink 1.9 --merge-list changing order of fam file
Thanks Christopher Chang for the great answer via the plink2 google group! (See here)
His answer was as follows:
"Yes, plink 1.9 did change the default merged sample order. However, you can request ...
2
votes
Accepted
Why my bim file doesn't match to my ped file as the Plink documentation suggests?
Responded in the plink2-users group (https://groups.google.com/forum/#!topic/plink2-users/zgJxdXxvdLo ).
2
votes
plink: --update-name vs. editing the BIM
I would reccomend using bcftools on the original vcf files before you convert them to plink, to fill in missing IDs using the command:
...
2
votes
Accepted
Converting aligned fasta to plink ped/bed
An alignment can be the result of two slightly different analyses:
There is multiple sequence alignment (which is what you get from MAFFT) where sequences are aligned so that similar regions are on ...
2
votes
Accepted
Lifting from hg38 to hg37
BED format can refer to the ".txt" file format that stores chromosomes and positions of genomic features as well as some other things like name. bed ...
2
votes
Interpreting GWAS results with different settings
Based on the QQ plots, filter out variants with p > 0.01, then display the beta statistic (or whatever other statistic you're using to demonstrate association). If you want to incorporate the p-...
2
votes
Making PLINK compatible files from VCF file without phenotype information
You can use --pheno to specify a phenotype file you want to use, the 1st and 2nd columns being FID and IID. These are just used on the fly and cannot be written to ...
2
votes
Convert SNP data from GEO into PED and MAP files?
Sadly the 'contact us' email at GEO didn't help at all.
I ended up probably re-inventing the wheel with this script:
https://gist.github.com/CholoTook/60968e3ab6d90cb8fd19be55a25592f1
YMMV
2
votes
Accepted
Error: "fewer tokens than expected" while using --update-name flag in plink
The reason is (likely) that plink is expecting a space separated file for the --update-name argument:
...
2
votes
How to extract a subset of individuals from a .bgen file?
You can use qctool for this. If you create a list of IDs in list.txt (one ID per line), you can filter the .bgen file(s) by running
...
1
vote
plink: --update-name vs. editing the BIM
I found this 2019 question on biostars in which user zx8754 mentions that plink2 has a command for this purpose --set-all-var-ids, from the plink2 docs:
Whole-...
1
vote
Plink 1.9 equivalent of --score sum in Plink 2.0
I don't have enough reputation for a comment but the place where the option to add scoresums is listed is here https://www.cog-genomics.org/plink/2.0/formats#sscore
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
plink × 58snp × 17
gwas × 13
vcf × 9
phylogenetics × 4
r × 3
python × 3
nextflow × 3
file-formats × 2
bed × 2
wgs × 2
format-conversion × 2
filtering × 2
pca × 2
genotyping × 2
qc × 2
polygenic-risk-score × 2
fasta × 1
bioconductor × 1
statistics × 1
genomics × 1
ngs × 1
normalization × 1
linux × 1
machine-learning × 1