Hot answers tagged

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 ...
gringer's user avatar
  • 13k
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 ...
Emily_Ensembl's user avatar
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 ...
Devon Ryan's user avatar
  • 19.5k
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 ...
juod's user avatar
  • 463
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 ...
Devon Ryan's user avatar
  • 19.5k
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 ...
terdon's user avatar
  • 9,352
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 ...
gringer's user avatar
  • 13k
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.
Christopher Chang's user avatar
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 ...
Eric C.'s user avatar
  • 208
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 ...
Sarah's user avatar
  • 465
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. : ...
zx8754's user avatar
  • 1,042
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 @...
gringer's user avatar
  • 13k
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 ...
Steve's user avatar
  • 2,706
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 ...
benn's user avatar
  • 3,561
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 ...
Vivek's user avatar
  • 393
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 ...
finswimmer's user avatar
  • 1,332
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.
Christopher Chang's user avatar
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 ...
Christopher Chang's user avatar
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 ...
Sarah's user avatar
  • 465
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 ).
Christopher Chang's user avatar
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: ...
user438383's user avatar
  • 1,443
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 ...
PPK's user avatar
  • 858
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 ...
Phoenix Mu's user avatar
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-...
gringer's user avatar
  • 13k
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 ...
Phoenix Mu's user avatar
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
Dan Bolser's user avatar
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: ...
user438383's user avatar
  • 1,443
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 ...
Giulio Centorame's user avatar
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-...
CoderGuy123's user avatar
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
andrewb's user avatar
  • 11

Only top scored, non community-wiki answers of a minimum length are eligible