Apologies is this is a very basic question, but as a newcomer I have been scouring forums and help documentation for hours and would appreciate some guidance if anybody has time.
I have a SCE object created using the constructor in scater 1.6.3 which I am using for QC but would like to explore the biotype of the features. I initially envisioned this as a simple task of cbinding the relevant data into the object.
The only way I have thus far managed to integrate the biotype data into the SCE object is by ensuring it is in the annotations file and reconstructing the object from scratch using the annotations as Rowdata in the constructor.
str(sce) excerpt below:
@elementMetadata:Formal class 'DataFrame' [package "S4Vectors"] with 6 slots .. .. .. .. ..@ rownames : NULL .. .. .. .. ..@ nrows : int 27590 .. .. .. .. ..@ listData :List of 18 .. .. .. .. .. ..$ GeneID : Factor w/ 52005 levels "EGFP Etc etc etc .. .. .. .. .. ..$ biotype : chr [1:27590] "protein_coding"
What I think I need are the data as a column however so I can assign colour/shapes to the biotype in visualizations etc . Thus far, I’m unable to merge or cbind the annotation file or even newly created simple dataframes derived from it or cbind the matched rows.
Error in as.vector(x) : no method for coercing this S4 class to a vector
Some stack exchange posts discussing this error more generically have discussed adding NAMESPACE to objects, but this is never specific to scater or SCE. I would appreciate any direction that could be given
Again, apologies if the question is not specific enough to the field of bioinformatics for the forum.
> sessionInfo() R version 3.4.3 (2017-11-30) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200) Matrix products: default locale:  LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252  LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C  LC_TIME=English_United Kingdom.1252 attached base packages:  stats4 parallel stats graphics grDevices utils datasets methods base other attached packages:  BiocInstaller_1.28.0 dplyr_0.7.4 magrittr_1.5 refGenome_1.7.3  RSQLite_2.0 doBy_4.5-15 scater_1.6.3 limma_3.34.9  SingleCellExperiment_1.0.0 SummarizedExperiment_1.8.1 DelayedArray_0.4.1 matrixStats_0.53.1  GenomicRanges_1.30.0 GenomeInfoDb_1.14.0 IRanges_2.12.0 S4Vectors_0.16.0  ggplot2_2.2.1 Biobase_2.38.0 BiocGenerics_0.24.0 loaded via a namespace (and not attached): ....