Error in plot + xlab(xlab) : non-numeric argument to binary operator
0
0
Entering edit mode
13 months ago
imran • 0

My Volcano plot is working fine for the argument on one shape for all as below;

EnhancedVolcano(res_df,
lab = res_df$gene_sym,
x = 'log2FoldChange',
y = 'pvalue',
title = 'MSC Cellular RNA vs MSC Exosome',
pCutoff = 0.05,
FCcutoff = 1,
pointSize = 3.0,
labSize = 6.0,
shape = 23,
colAlpha = 1)

But when I pass the argument for different shapes for my data it gives me the error;

Error in plot + xlab(xlab) : non-numeric argument to binary operator.

Code is as below

EnhancedVolcano(res_df,
lab = res_df$gene_sym,
x = 'log2FoldChange',
y = 'pvalue',
pCutoff = 0.05,
FCcutoff = 1,
cutoffLineType = 'twodash',
cutoffLineWidth = 0.8,
pointSize = 4.0,
labSize = 6.0,
shape = c(23,8,29),
colAlpha = 1,
legendLabels=c('Not sig.','Log (base 2) FC','p-value',
'p-value & Log (base 2) FC'),
legendPosition = 'right',
legendLabSize = 16,
legendIconSize = 5.0)

head(res_df, n = 20)
 baseMean log2FoldChange    lfcSE        stat    pvalue      padj sig  gene_sym
ENST00000003583.12 126.0788    -0.21325126 2.410631 -0.08846284 0.9295088 0.9869099  no     STPG1
ENST00000003912.7  420.2135    -1.30895409 2.511233 -0.52123967 0.6021998 0.9859208  no    NIPAL3
ENST00000009105.5  231.4948    -1.75115300 2.472340 -0.70829769 0.4787604 0.9859208  no    CAMK1G
ENST00000011700.10 651.5186    -0.85162939 2.248348 -0.37878013 0.7048511 0.9859208  no    VPS13D
ENST00000040877.2  339.6129    -0.90238534 1.968157 -0.45849246 0.6465987 0.9859208  no    TARBP1
ENST00000054666.11 209.4070    -0.84781944 1.510004 -0.56146826 0.5744784 0.9859208  no     VAMP3
ENST00000072644.7  136.7335    -1.16720108 2.189308 -0.53313708 0.5939387 0.9859208  no     YIPF1
ENST00000078527.8  150.9054    -0.68232223 1.899988 -0.35911930 0.7195058 0.9859208  no      PIGV
ENST00000164247.5  413.2861    -1.45587717 2.516066 -0.57863225 0.5628373 0.9859208  no    KCNAB2
ENST00000166244.8  237.0218    -0.38783566 2.470313 -0.15699862 0.8752459 0.9859208  no     EPHA8
ENST00000167825.5  221.8213    -0.84683015 2.259946 -0.37471257 0.7078742 0.9859208  no ARHGEF10L
ENST00000196061.5  438.2576    -0.13550066 1.473975 -0.09192872 0.9267547 0.9866210  no     PLOD1
ENST00000207157.7  205.4427    -0.58784413 1.960836 -0.29979257 0.7643354 0.9859208  no     TBX15
ENST00000209884.5  292.1704    -1.49140772 2.008418 -0.74257847 0.4577369 0.9859208  no    KLHL20
ENST00000209929.10 246.3748    -0.38738951 2.473644 -0.15660679 0.8755548 0.9859208  no      FMO2
ENST00000212355.9  426.0076    -0.50231649 1.772641 -0.28337187 0.7768918 0.9859208  no    TGFBR3
ENST00000234590.10 444.9738     0.96619560 2.055609  0.47002896 0.6383343 0.9859208  no      ENO1
ENST00000234626.11 164.4949    -0.79541498 2.258505 -0.35218656 0.7246984 0.9859208  no      CDC7
ENST00000234668.6  131.0738    -0.21179566 2.142843 -0.09883861 0.9212664 0.9862636  no     SYDE2
ENST00000234677.7  146.4957    -0.02758746 1.475394 -0.01869836 0.9850817 0.9965418  no      SARS

Please tell me what I am doing wrong, there are three sets in data Nonsignificant (NS), Log2Fc. pvalue, I want different shapes for all these in my volcano plot. Also how can I remove label enhanced volcano from the plot

Thanks

scRNA EnhancedVolcano DESeq2 • 679 views
ADD COMMENT
0
Entering edit mode

You have 4 categories in legendLabels so you need 4 shape values.

ADD REPLY

Login before adding your answer.

Traffic: 2034 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6