Question: Changing values in cummeRbund CuffSet-class in R
0
gravatar for irritable_phd_syndrom
2.7 years ago by
irritable_phd_syndrom60 wrote:

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 • 664 views
ADD COMMENTlink modified 2.7 years ago by geek_y9.4k • written 2.7 years ago by irritable_phd_syndrom60
0
gravatar for geek_y
2.7 years ago by
geek_y9.4k
Barcelona/CRG/London/Imperial
geek_y9.4k wrote:

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 COMMENTlink written 2.7 years ago by geek_y9.4k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1859 users visited in the last hour