scDRS

作者: 大魔王鱼鱼鱼 | 来源:发表于2023-05-22 16:46 被阅读0次

MAGMA安装

image.png

下载linux版本,在服务器解压即可使用。

数据准备

  • gene location数据


    image.png
  • reference data


    image.png
  • snp数据
wget http://hgdownload.cse.ucsc.edu/goldenPath/hg38/database/snp151.txt.gz
gzip snp151.txt.gz -d
  • GWAS数据
    从GWAS Catalog网址下载目标疾病的GWAS summary文件
    根据snp151.txt和GWAS summary数据,将snp位置对应到rs号,输出SNP ID和P值的一个文件,第一列为ID,第二列为P值,不要表头。
    示例如下:


    image.png
  • 单细胞数据
    seurat object转h5ad格式,后面作为scDRS的输入使用
library(SeuratDisk)
SaveH5Seurat(cm.object,filename="cm.h5Seurat")
Convert("cm.h5Seurat",dest="h5ad")

分析

参考 https://www.cnblogs.com/chenwenyan/p/14628970.html

step1:基因注释

magma --annotate --snp-loc ../MAGMA/g1000_eur/g1000_eur.bim --gene-loc ../MAGMA/NCBI38/NCBI38.gene.loc --out g1000_eur

得到g1000_eur.genes.annot文件


image.png

step2:gene-base分析

magma --bfile ../MAGMA/g1000_eur/g1000_eur --pval snp_p.txt N=387930 --gene-annot g1000_eur.genes.annot --out gene_based

得到gene_based.genes.out,和gene_based.genes.raw


image.png

step3. Convert a .tsv GWAS gene statistics file to an scDRS .gs file.

scdrs munge-gs \
    --out-file processed_gene.zscore.gs \
        --zscore-file gene.zscore \
            --weight zscore

step4. Compute scDRS scores.

scdrs compute-score \
    --h5ad-file <h5ad_file>\
    --h5ad-species mouse\
    --gs-file <gs_file>\
    --gs-species human\
    --out-folder <out_folder>\
    --cov-file <cov_file>\
    --flag-filter-data True\
    --flag-raw-count True\
    --n-ctrl 1000\
    --flag-return-ctrl-raw-score False\
    --flag-return-ctrl-norm-score True

step5. scDRS downstream analyses

scdrs perform-downstream \
    --h5ad-file <h5ad_file>\
    --score-file <score_file>\
    --out-folder <out_folder>\
    --group-analysis cell_type \
    --corr-analysis causal_variable,non_causal_variable,covariate\
    --gene-analysis\
    --flag-filter-data True\
    --flag-raw-count True

结果解读

https://martinjzhang.github.io/scDRS/file_format.html#trait-scdrs-group-annot

相关文章

网友评论

      本文标题:scDRS

      本文链接:https://www.haomeiwen.com/subject/tjtbsdtx.html