Hot answers tagged

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 ...
user avatar
7 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 ...
user avatar
  • 11.5k
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 ...
user avatar
  • 19.3k
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 ...
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 ...
user avatar
  • 19.3k
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 ...
user avatar
  • 7,957
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 ...
user avatar
  • 11.5k
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.
user avatar
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. : ...
user avatar
  • 1,052
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 ...
user avatar
  • 208
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 @...
user avatar
  • 11.5k
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 ...
user avatar
  • 722
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 ...
user avatar
  • 3,521
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 ...
user avatar
  • 393
2 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 ...
user avatar
  • 445
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 ...
user avatar
  • 1,322
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.
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 ...
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 ...
user avatar
  • 445
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 ).
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: ...
user avatar
  • 1,198
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 ...
user avatar
  • 788
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 ...
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-...
user avatar
  • 11.5k
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 ...
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: ...
user avatar
  • 1,198
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-...
user avatar
1 vote

How to calculate average minor allele frequency (MAF) difference between two populations (i.e. European, Hispanic)

You need to report allele frequencies using plink for some European samples Do the same for Hispanic samples Use a software to subtract the two allele frequencies ...
user avatar
  • 203
1 vote
Accepted

How to simulate phenotype from real genetic data for GWAS purpose?

The question has been answered in the bioStars forum: https://www.biostars.org/p/428314/ It was missing the param --simu-causal-loci. I created the ...
user avatar
1 vote
Accepted

Question: How to simulate 100k samples having 40 million SNPs in a proportion of case:control=30:70?

First comment: you should be using real data, rather than simulated data, as we are not very good at modelling genetic variation and recombination at a genome-wide scale. A way that this can be done ...
user avatar
  • 11.5k

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