thelovelab / tximeta

Transcript quantification import with automatic metadata detection
https://thelovelab.github.io/tximeta/
66 stars 11 forks source link

SummarizedExperiment or DESeqDataSet Leves Null #71

Closed lulumagic7 closed 1 year ago

lulumagic7 commented 1 year ago

Hi Mike,

I tried to follow the workflow (https://bioconductor.org/packages/release/workflows/vignettes/rnaseqGene/inst/doc/rnaseqGene.html) to analyze my own RNA-seq data. Now I’m at step 3, my coldata (gse) dataframe is liike this:

DataFrame with 13 rows and 3 columns sampleName type names

Glu237.IN Glu237.IN control Glu237.IN GluC31.IN GluC31.IN control GluC31.IN GluU1_4.IN GluU1_4.IN control GluU1_4.IN GluU2_2.IN GluU2_2.IN control GluU2_2.IN GluU3_9.IN GluU3_9.IN control GluU3_9.IN ... ... ... ... Glu230.IN Glu230.IN fxs Glu230.IN GluF1_6.IN GluF1_6.IN fxs GluF1_6.IN GluF2_6.IN GluF2_6.IN fxs GluF2_6.IN GluF3_3.IN GluF3_3.IN fxs GluF3_3.IN GluF5_3.IN GluF5_3.IN fxs GluF5_3.IN And then I: > gse$type [1] "control" "control" "control" "control" "control" "control" "control" "fxs" "fxs" "fxs" [11] "fxs" "fxs" "fxs" > levels(gse$type) NULL So there is nothing in levels(gse$type), do you know how to fix it? R version is 4.1.3 tximeta version is 1.17.1 Thanks so much in advance for your help! Lu
mikelove commented 1 year ago

It doesn’t have levels if it isn’t a factor. Try to use class() to learn what you’ve got and if you want it to be a factor then change it to factor.

lulumagic7 commented 1 year ago

Got you, thanks so much!