1. 软件下载structure
2. 安装指南Windows 直接双击安装包, 进行安装即可. 安装完成后, 桌面上有快捷方式: Mac OS X 下载软件包, 解压进入软件包文件夹, 会有 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 出现下面代码, 说明运行成功: (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. 示例数据示例数据, 这里我们使用admixture的数据, 数据格式是SNP数据格式, 详见: Admixture使用说明文档cookbook
4. plink数据格式转化为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的数据进行测试查看数据: (base) [dengfei@localhost test]$ ls hapmap3.bed hapmap3.bim hapmap3.fam hapmap3.map 使用plink进行格式转化: plink --bfile hapmap3 --recode structure --out test_structure 生成 数据格式如下: rs10458597 rs12562034 rs2710875 rs11260566 rs1312568 rs35154105 rs16824508 rs2678939 rs7553178 rs133763 -1 203827 209332 200465 206966 213697 200280 201401 204163 202132 226411 200445 201484 200329 205708 20 NA19916 1 2 2 2 2 1 1 2 2 2 2 2 2 1 2 1 2 2 2 1 2 2 2 2 2 1 1 2 2 2 2 2 2 2 2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 2 2 2 2 1 6. 导入数据到structure软件中双击打开软件 定义好之后:点击Next 定义行
定义列: 读入数据成功: 7. 定义参数
开始运行: 8. 查看结果结果文件: 9. 使用 admixture hapmap3.bed 3 |
|