DEG_limma.R 差异基因分析limma

DEG_limma.R 差异基因分析limma

使用方法:

$Rscript DEG_limma.R -h
usage: DEG_limma.R [-h] -e filepath -m filepath -t treatname --control CONTROL
                   --case CASE [-f fdr] [-c fc] [-s size] [-a alpha]
                   [-X x.lab] [-Y y.lab] [-T title] [-H height] [-W width]
                   [-o path] [-p prefix]

limma analysis: https://www.omicsclass.com/article/1519

optional arguments:
  -h, --help            show this help message and exit
  -e filepath, --expr filepath
                        input read count file[required]
  -m filepath, --metadata filepath
                        input metadata file[required]
  -t treatname, --treatname treatname
                        treat colname in group file[required]
  --control CONTROL     set control group name[required]
  --case CASE           set case group name[required]
  -f fdr, --fdr fdr     set fdr threshold[default 0.05]
  -c fc, --fc fc        set fold change threshold[default 2]
  -s size, --size size  point size[optional,default:0.7]
  -a alpha, --alpha alpha
                        point transparency[0-1][optional,default:1]
  -X x.lab, --x.lab x.lab
                        the label for x axis[optional,default:log2FC]
  -Y y.lab, --y.lab y.lab
                        the label for y axis[optional,default:-log10(FDR)]
  -T title, --title title
                        the label for main title[optional,default:Volcano]
  -H height, --height height
                        the height of pic inches[default:5]
  -W width, --width width
                        the width of pic inches[default:5]
  -o path, --outdir path
                        output file directory[default:/share/work/fangs]
  -p prefix, --prefix prefix
                        out file name prefix[default:Volcano]


参数说明:

-e 输入基因表达矩阵文件,必须为count表达文件:
ID
TCGA-LN-A9FP-01A-31R-A38D-31
TCGA-LN-A4MQ-01A-11R-A28J-31
TCGA-IG-A3YB-01A-11R-A36D-31
TCGA-IC-A6RF-01A-13R-A336-31
TCGA-VR-A8EX-01A-11R-A36D-31
TCGA-L5-A88S-01A-11R-A36D-31
TCGA-IG-A6QS-01A-12R-A336-31
TSPAN6
1447324713192943346211091475
TNMD
18012020
DPM1
2084280727982888268318394146
SCYL3
1164233913291271941622899
C1orf112
5531686273516582355639
FGR
958136770546164570410
CFH
27342216420731757217099532956


-m metadata文件路径,样本的分组信息,第一列必须和表达文件的样本名称对应:
barcode
subtype.hclust
StromalScore
ImmuneScore
ESTIMATEScore
TumourPurity
TCGA-LN-A9FP-01A-31R-A38D-31
S1
1270.5
680.4
1951
0.62835621
TCGA-LN-A4MQ-01A-11R-A28J-31
S2
-1238
-1102
-2340
0.965989711
TCGA-IG-A3YB-01A-11R-A36D-31
S2
18.661
910.1
928.7
0.737583434
TCGA-IC-A6RF-01A-13R-A336-31
S2
-944.6
432.3
-512
0.737583434
TCGA-VR-A8EX-01A-11R-A36D-31
S2
-1693
370.8
-1323
0.91679028
TCGA-L5-A88S-01A-11R-A36D-31
S1
1282
681.7
1964
0.626899035
TCGA-IG-A6QS-01A-12R-A336-31
S1
-322.6
946.1
623.5
0.767082658


-t subtype.hclust   --case S1 --control  S2
指定metadata 分组列名,分组里面的比较组名字,如果分组名字有空格,应该用引号引起来:"Stage IA"

--fdr 0.05 --fc 2
设置差异基因的筛选条件:显著性和差异倍数(默认fdr=0.05,fold change=2)


使用举例:

$$Rscript DEG_limma.R -e TCGA-ESCA_gene_expression_Counts.tsv \
> --fdr 0.05 --fc 2 -m metadata.group.tsv -t subtype.hclust \
> --case S1 --control S2 -p S1_vs_S2.limma


结果展示:

火山图:attachments-2021-07-fisDbbpa610214beaef52.png

  • 发表于 2021-07-29 10:41
  • 阅读 ( 2410 )
  • 分类:转录组

0 条评论

请先 登录 后评论
fangs
fangs

16 篇文章

作家榜 »

  1. omicsgene 691 文章
  2. 安生水 340 文章
  3. Daitoue 167 文章
  4. 生物女学霸 120 文章
  5. 红橙子 78 文章
  6. xun 76 文章
  7. rzx 74 文章
  8. CORNERSTONE 72 文章