Plink提取tagSNPs

Plink提取tagSNPs

1)識別haplotype block

在提取tagSNPs之前需要先識別haplotype block,這一步的代碼很多教程里都給了出來:

plink --file mydata --blocks

這里的mydata是由vcf文件經(jīng)過plink轉(zhuǎn)換來的,

如果是ped/map格式的文件(mydata.ped/mydata.map),就用–file

如果是bed/fam格式的文件(mydata.bed/mydata.fam),就用–bfile

當(dāng)我自己運行的時候出現(xiàn)了小問題(好像是因為表型的問題),文件不能正確的輸出,根據(jù)軟件給出的的提示加入?yún)?shù):no-pheno-req

修改后的代碼為:

plink --file mydata --blocks no-pheno-req

這一步輸出兩個文件,分別是plink.blocks和plink.blocks.det

plink.blocks文件:

plink.blocks.det文件:

2)提取tagSNPs

網(wǎng)上的教程和官方文檔也給出了相應(yīng)的代碼:

plink --bfile mydata --show-tags mysnps.txt

這里的mysnps.txt是從plink.blocks文件中提取出來的snp編號(一行一個):

但是運行結(jié)束后只得到了一個plink.tag文件,以為是哪里出錯了,于是查閱官網(wǎng),官方的解釋:

plink.tags

that lists all the SNPs in the dataset that tag the SNPs in mysnps.txt (including the SNPs in the original file). A message is also written to the LOG file that indicates how many new SNPs were added

If the option

–list-all

is also added, then an additional file is generated that gives some more details for each target SNP (i.e. each SNP listed in mysnps.txt, in the above example) regarding how many and which tags were set for it. The file is named

plink.tags.list

就是說如果用上述代碼,最后只會輸出一個plink.tag文件,如果再加上–list-all,則會再輸出一個plink.tags.list文件,修改后代碼為:

plink --file mydata --list-all --show-tags mysnps.txt

plink.tag文件和mysnp.txt文件類似,plink.tag,list文件結(jié)果如下:

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容