1

Hi I have a nested object which I think contains tables. I used str to see how it looks like,

> str(test)
Formal class 'CuffData' [package "cummeRbund"] with 5 slots
  ..@ DB     :Formal class 'SQLiteConnection' [package "RSQLite"] with 5 slots
  .. .. ..@ Id                 :<externalptr> 
  .. .. ..@ dbname             : chr "C:/temp/cuffData.db"
  .. .. ..@ loadable.extensions: logi TRUE
  .. .. ..@ flags              : int 6
  .. .. ..@ vfs                : chr ""
  ..@ tables :List of 6
  .. ..$ mainTable     : chr "genes"
  .. ..$ dataTable     : chr "geneData"
  .. ..$ expDiffTable  : chr "geneExpDiffData"
  .. ..$ featureTable  : chr "geneFeatures"
  .. ..$ countTable    : chr "geneCount"
  .. ..$ replicateTable: chr "geneReplicateData"
  ..@ filters: list()
  ..@ type   : chr "genes"
  ..@ idField: chr "gene_id"

however when I tried to to read the table mainTable all I get is this,

> test@tables$mainTable
[1] "genes"
  • is there any way I can read what is in this table?
  • Not sure if I'm even interpreting the str output correctly though. I'm a newbie at this and I'm also wondering if there is a good tutorial on how to interpret objects like these in R? Examples would be even better.

thanks you much in advance. Ahdee

hrbrmstr
  • 77,368
  • 11
  • 139
  • 205
Ahdee
  • 4,679
  • 4
  • 34
  • 58
  • 1
    According the the `str()`, `test@tables$mainTable` is just listed as the literal value "genes". There seems to be a reference to a database involved. Since you're dealing with a proper S4 class, it's probably not a good idea to go poking about in its structure. How are you creating this object? What library are you using? It would be better to check official documentation to see what public methods are available to you. As always, a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) would be very helpful. – MrFlick Jan 22 '15 at 18:31
  • 2
    _CummeRbund takes the various output files from a cuffdiff run and creates a SQLite database of the results describing appropriate relationships betweeen genes, transcripts, transcription start sites, and CDS regions. Once stored and indexed, data for these features, even across multiple samples or conditions, can be retrieved very efficiently and allows the user to explore subfeatures of individual genes, or genesets as the analysis requires. - See more at: http://compbio.mit.edu/cummeRbund/#sthash.nls28QNv.dpuf``_. Is `test` the result of a call to `readdCufflinks`? – hrbrmstr Jan 22 '15 at 18:35
  • 1
    _CuffData Class The CuffData class is also a pointer class to the SQL backend, but each instance is specific for a data subtype (genes, isoforms, TSS, CDS). Again, there is an DB slot (accessible using DB()) that contains the RSQLite connection object. There are several accessor, setter, and plotting methods that allow for global analysis of all features within a CuffData class. - See more at: http://compbio.mit.edu/cummeRbund/manual_2_0.html#tth_sEc3.2_ – hrbrmstr Jan 22 '15 at 18:37
  • 1
    (apologies for the massive text extractions). You'll need to either use the SQLite connection to retrieve the individual tables or use the method provided by the package to extract and plot the data. – hrbrmstr Jan 22 '15 at 18:38
  • hi @hrbrmstr and MrFlick: thanks it makes sense now, especially with the SQLite connection recommendations. I considered this answered! thanks again. – Ahdee Jan 22 '15 at 18:42

0 Answers0