用SNPRelate进行PCA分析: library(gdsfmt) library(SNPRelate) vcf.fn <- "test.vcf" snpgdsVCF2GDS(vcf.fn, "test.gds", method="biallelic.only") ###这一步将vcf格式转换为gds格式,以符合SNPRelate对数据格式的要求; genofile <- snpgdsOpen("test.gds") ###打开文件 pca <- snpgdsPCA(genofile, ...
这样就得到了hapmap计划涉及到的所有样本的基因型文件。 然后再学一下SNPRelate的用法: 说明书还比较好读:http://corearray.sourceforge.net/tutorials/SNPRelate/ 只有一个核心函数,就是用snpgdsPCA来对包含了GDS格式的基因型信息的文件做分析! 所以重点就是创建GDS格式的基因型文件! 有两种方式来创建GDS文件,被R...
R package: parallel computing toolset for relatedness and principal component analysis of SNP data (Development version only) - SNPRelate/src/genKING.cpp at 024e63a188d008ffa6a1147114e09ba9e4bba63d · zhengxwen/SNPRelate
这样就得到了hapmap计划涉及到的所有样本的基因型文件。 然后再学一下SNPRelate的用法: 说明书还比较好读:http://corearray./tutorials/SNPRelate/ 只有一个核心函数,就是用snpgdsPCA来对包含了GDS格式的基因型信息的文件做分析! 所以重点就是创建GDS格式的基因型文件! 有两种方式来创建GDS文件,被R包作者包装成了...
SNPRelate还设计用于多核对称多处理计算机体系结构的并行计算,加速SNP数据上的两个关键计算:主成分分析(PCA)和使用身份-下降测量的相关性分析。在S4类和泛型函数的支持下,GWASTools包也使用了SNP GDS格式。扩展的GDS格式在SeqArray包中实现,以支持单核苷酸变异(SNVs)、插入/删除多态性(indel)和结构变异调用的存储。
// // You should have received a copy of the GNU General Public License along // with SNPRelate. If not, see <http://www.gnu.org/licenses/>. #ifndef _HEADER_IBD_KING_ #define _HEADER_IBD_KING_ // Standard library header #include <cmath> #include <cfloat> #include <memory> #...