How to save the DEXSeq results
1
0
Entering edit mode
Sara • 0
@95b4edca
Last seen 7 days ago
Belgium

Hi,

after all the step of DEXSeq I wanted to save my results in a tsv, csv, ... but nothing helped me I also followed the other similar questions related to this issue but nothing helped. May you please kindly help how to save the results

results <- DEXSeqResults(dx)

> class(results)
[1] "DEXSeqResults"
attr(,"package")
[1] "DEXSeq"

> write.table(results, "dexseq.tsv", sep="\t", quote=F, row.names=F)
Error in write.table(results, "dexseq.tsv", sep = "\t", quote = F, row.names = F) : 
  unimplemented type 'list' in 'EncodeElement'

then I converted to dataframe, but still can't save the results:

df_results <- as.data.frame(results)

> write.table(df_results , "dexseq.tsv", sep="\t", quote=F, row.names=F)
Error in write.table(df_results, "dexseq.tsv", sep = "\t", quote = F,  : 
  unimplemented type 'list' in 'EncodeElement'

Then just tried to get the significant ones, but still, I can't save it:

dxr1.sig <- as.data.frame(results[results$padj < 0.1 & !is.na(results$padj),])

> write.table(dxr1.sig, "Results.tsv", quote=FALSE, sep="\t", dec=".")
Error in write.table(dxr1.sig, "Results.tsv", quote = FALSE, sep = "\t",  : 
  unimplemented type 'list' in 'EncodeElement'

Looking forward for solutions. Many thanks!

DEXSeq • 462 views
ADD COMMENT
3
Entering edit mode
@mikelove
Last seen 3 days ago
United States

If you look at the output here:

https://bioconductor.org/packages/release/bioc/vignettes/DEXSeq/inst/doc/DEXSeq.html#4_Testing_for_differential_exon_usage

You can see there are some columns that are different than the others, e.g. <GRanges>, <matrix>, and <list>.

You can instead select just the standard columns:

> d <- DataFrame(x = 1:10, y=letters[1:10])
> d$z <- as.list(1:10)
> d
DataFrame with 10 rows and 3 columns
           x           y      z
   <integer> <character> <list>
1          1           a      1
2          2           b      2
3          3           c      3
4          4           d      4
5          5           e      5
6          6           f      6
7          7           g      7
8          8           h      8
9          9           i      9
10        10           j     10
> d |> as_tibble() |> select_if(~is.character(.x) | is.numeric(.x))
# A tibble: 10 × 2
       x y
   <int> <chr>
 1     1 a
 2     2 b
 3     3 c
 4     4 d
 5     5 e
 6     6 f
 7     7 g
 8     8 h
 9     9 i
10    10 j

Another option would be to flatten the list column before removing the others (matrix/GRanges).

ADD COMMENT

Login before adding your answer.

Traffic: 912 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