Plink recode option to get genomic position?
1
Is there a command to pull SNPs IDs and loci out of a bfile using plink? maybe something along the lines of the --recode option?
plink
SNP
locus
• 1.9k views
•
link
updated 5.7 years ago by
zx8754
12k
•
written 5.7 years ago by
RNAseqer
▴
280
Plink binary format output has 3 files:
- bed - binary for genotypes
- bim - plain text map file for SNPs
- fam - plain text for samples.
2nd column of bim file is SNP id:
- Chromosome code (either an integer, or 'X'/'Y'/'XY'/'MT'; '0' indicates unknown) or name
- Variant identifier
- Position in morgans or centimorgans (safe to use dummy value of '0')
- Base-pair coordinate (1-based; limited to 231-2)
- Allele 1 (corresponding to clear bits in .bed; usually minor)
- Allele 2 (corresponding to set bits in .bed; usually major)
So we can get the second column, for example, using cut
as:
cut -f2 myBim.bim > mySNPs.txt
Login before adding your answer.
Is it not possible with plain
awk
? Is the bfile a binary file?It is a binary file yes.