stageWiseAdjustment error
Closed this issue · 4 comments
I am trying to work through the stageR example from the DRIMSeq vignette, Section 5.2.6 Two Stage Test, using stageR_1.4.0, and I am getting an error with the stageWiseAdjustment command:
stageRObj <- stageRTx(pScreen = pScreen, pConfirmation = pConfirmation, pScreenAdjusted = FALSE, tx2gene = tx2gene)
stageRObj <- stageWiseAdjustment(object = stageRObj, method = "dtu",alpha = 0.05, allowNA=TRUE)
Removing 21 features with NA screening hypothesis p-values.
Error in pConfirmation[id, ] : incorrect number of dimensions
My input elements are the following:
- pScreen with the p-values per gene:
head(pScreen)
ENSMUSG00000025911.14 ENSMUSG00000043716.13 ENSMUSG00000079658.9
0.0361578872 0.5675120072 0.0000435527
ENSMUSG00000025940.6 ENSMUSG00000117310.1 ENSMUSG00000061518.11
0.4874760847 0.7263951440 0.7593573916
length(pScreen)
[1] 1091
- pConfirmation with the p-values per transcript:
head(pConfirmation)
[,1]
ENSMUST00000144177.7 3.615789e-02
ENSMUST00000027044.14 3.615789e-02
ENSMUST00000058437.13 5.675120e-01
ENSMUST00000141217.1 5.675120e-01
ENSMUST00000188641.6 4.303451e-01
ENSMUST00000115352.9 1.577954e-06
length(pConfirmation)
[1] 3212
- tx2gene mapping:
head(tx2gene)
feature_id gene_id
1 ENSMUST00000144177.7 ENSMUSG00000025911.14
2 ENSMUST00000027044.14 ENSMUSG00000025911.14
3 ENSMUST00000058437.13 ENSMUSG00000043716.13
4 ENSMUST00000141217.1 ENSMUSG00000043716.13
5 ENSMUST00000188641.6 ENSMUSG00000079658.9
6 ENSMUST00000115352.9 ENSMUSG00000079658.9
Is this the correct input?
I am a bit onfused, as in the example under ?stageRTx, pConfirmationTx has only one column:
pConfirmationTx
[,1]
[1,] 0.798831611
[2,] 0.784575267
[3,] 0.009429905
[4,] 0.779065883
[5,] 0.729390652
[6,] 0.630131853
[7,] 0.480910830
[8,] 0.156636851
[9,] 0.008215520
[10,] 0.452458394
... whereas pConfirmation has 3 columns:
[,1] [,2] [,3]
gene1 0.502813046 0.64881812 0.67028204
gene2 0.871043414 0.75859317 0.29774178
gene3 0.006300784 0.13710608 0.10072158
gene4 0.072057124 0.39658459 0.07190410
gene5 0.164211225 0.22498533 0.88044057
gene6 0.770334074 0.05795856 0.75424740
gene7 0.735184306 0.39589269 0.81660589
gene8 0.971875636 0.06492830 0.98214037
gene9 0.466472377 0.22588643 0.10359964
gene10 0.074384513 0.05462911 0.09904183
Any hint as to where I am going wrong will be very much appreciated.
Thanks and best, Sophia
Hi,
Thank you for reporting.
Can you provide a reproducible working example such that I can figure out what's wrong?
In stageRTx
we indeed expect a one-column object as you are correctly providing.
Thank you @koenvandenberge for looking into this.
I am attaching 2 files, the gene and transcript level output from DRIMSeq which I used as input for stageR.
From the gene level table, pScreen was extracted (columns gene_id and pvalue).
From the transcript level table, pConfirmation and tx2gene were extracted.
Is this useful for you ?
Thanks, best, Sophia
DRIMSeq_results_transcriptlevel.csv.gz
DRIMSeq_results_genelevel.csv.gz
There was indeed a bug if NA p-values were present in a stageRTx
object. This should now be fixed, if you update stageR
to the latest version using devtools::install_github("statOmics/stageR")
.
Let me know if it works out for you.
Thanks I lot, with the fix, I was able to run stageWiseAdjustment
, getSignificantGenes
and getSignificantTx
now for my data set.