1. 軟件下載structure
2. 安裝指南Windows 直接雙擊安裝包, 進(jìn)行安裝即可. 安裝完成后, 桌面上有快捷方式: Mac OS X 下載軟件包, 解壓進(jìn)入軟件包文件夾, 會有 wget https://web./group/pritchardlab/structure_software/release_versions/v2.3.4/release/structure_linux_console.tar.gz tar zxvf structure_linux_console.tar.gz cd console/ ./structure 出現(xiàn)下面代碼, 說明運(yùn)行成功: (base) [dengfei@localhost console]$ ./structure
---------------------------------------------------- STRUCTURE by Pritchard, Stephens and Donnelly (2000) and Falush, Stephens and Pritchard (2003) Code by Pritchard, Falush and Hubisz Version 2.3.4 (Jul 2012) ----------------------------------------------------
Reading file "mainparams". datafile is infile Reading file "extraparams". Note: RANDOMIZE is set to 1. The random number generator will be initialized using the system clock, ignoring any specified value of SEED. Unable to open the file infile.
Exiting the program due to error(s) listed above. 3. 示例數(shù)據(jù)示例數(shù)據(jù), 這里我們使用admixture的數(shù)據(jù), 數(shù)據(jù)格式是SNP數(shù)據(jù)格式, 詳見: Admixture使用說明文檔cookbook
4. plink數(shù)據(jù)格式轉(zhuǎn)化為structure.recode.strct_in (Structure format) Produced by "--recode structure", for use by Structure. This format cannot be loaded by PLINK.
A text file with two header lines: the first header line lists all V variant IDs, while each entry in the second line is the difference between the current variant's base-pair coordinate and the previous variant's bp coordinate (or -1 when the current variant starts a new chromosome). This is followed by one line per sample with the following 2V+2 fields:
1. Within-family ID 2. Positive integer, unique for each FID 3-(2V+2). Genotype calls, with the A1 allele coded as '1', A2 = '2', and missing = '0' 用法:
還可以使用 https://watson.hgen./docs/conversions/frame_ext_structure.html 5. 使用admixture的數(shù)據(jù)進(jìn)行測試查看數(shù)據(jù): (base) [dengfei@localhost test]$ ls hapmap3.bed hapmap3.bim hapmap3.fam hapmap3.map 使用plink進(jìn)行格式轉(zhuǎn)化: plink --bfile hapmap3 --recode structure --out test_structure 生成 數(shù)據(jù)格式如下: rs10458597 rs12562034 rs2710875 rs11260566 rs1312568 rs35154105 rs16824508 rs2678939 r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 2 2 2 2 1 2 2 2 1 2 2 2 2 2 2 2 2 2 0 0 NA19917 1 2 2 2 2 1 2 2 2 2 2 2 2 2 2 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 6. 導(dǎo)入數(shù)據(jù)到structure軟件中雙擊打開軟件 定義好之后:點(diǎn)擊Next 定義行
定義列: 讀入數(shù)據(jù)成功: 7. 定義參數(shù)
開始運(yùn)行: 8. 查看結(jié)果結(jié)果文件: 9. 使用 admixture hapmap3.bed 3 |
|