Question: Changing values in cummeRbund CuffSet-class in R
gravatar for irritable_phd_syndrom
4.2 years ago by
irritable_phd_syndrom90 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.

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


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

However, this works :

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


   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 • 935 views
ADD COMMENTlink modified 4.2 years ago by geek_y11k • written 4.2 years ago by irritable_phd_syndrom90
gravatar for geek_y
4.2 years ago by
geek_y11k 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 4.2 years ago by geek_y11k
Please log in to add an answer.


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