Changing values in cummeRbund CuffSet-class in R
1
0
Entering edit mode
8.3 years ago

I recently completed cuffdiff on my data set and now I'm trying to work with the data using cummeRbund. I would like to be able to change some of the values in the default CuffSet data object.

library("cummeRbund")
cuffdat<-readCufflinks(dir = "../cuffdiff", gtfFile="../cuffmerge/merged.gtf", genome="GRCh38")
samples(cuffdat)$sample_name <- c("hello", "world")

returns

Error in samples(cuffdat)$sample_name <- c("hello", "world") : 
  could not find function "samples<-"

However, this works :

s<-samples(cuffdat)
s$sample_name<-c("hello", "world")
s

returns

   sample_index sample_name sample_name parameter value
1             1       hello        <NA>      <NA>  <NA>
2             2       world        <NA>      <NA>  <NA>
3             3       hello        <NA>      <NA>  <NA>
4             4       world        <NA>      <NA>  <NA>
5             5       hello        <NA>      <NA>  <NA>
6             6       world        <NA>      <NA>  <NA>
7             7       hello        <NA>      <NA>  <NA>
8             8       world        <NA>      <NA>  <NA>
9             9       hello        <NA>      <NA>  <NA>
10           10       world        <NA>      <NA>  <NA>
11           11       hello        <NA>      <NA>  <NA>
12           12       world        <NA>      <NA>  <NA>
13           13       hello        <NA>      <NA>  <NA>
14           14       world        <NA>      <NA>  <NA>
15           15       hello        <NA>      <NA>  <NA>
16           16       world        <NA>      <NA>  <NA>
17           17       hello        <NA>      <NA>  <NA>
18           18       world        <NA>      <NA>  <NA>

Why can't I change samples(cuffdat)$sample_name? It is a data frame just like s.

RNA-Seq R • 1.5k views
ADD COMMENT
0
Entering edit mode
8.3 years ago

What is cuffdat ?

A CuffSet object. A ’pointer’ class that allows interaction with cufflinks/cuffdiff data via a SQLite database backend.

The object s is a data frame but not cuffdat.

ADD COMMENT

Login before adding your answer.

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