text: user1194: I want to analyze RNA seq data using R package cummeRbund. Using this package I have a problem changing sample names. When I run this command in cummeRbund
  samples(cuff) 
  sample_index sample_name sample_name parameter value
  1            1          q1        <NA>      <NA>  <NA>
  2            2          q2        <NA>      <NA>  <NA>
  3            3          q3        <NA>      <NA>  <NA>
  4            4          q4        <NA>      <NA>  <NA>
  5            5          q5        <NA>      <NA>  <NA>
  
  It shows q1,q2,q3,q4 and q5 as sample names for the five samples but I want to change the sample names and put following names for the samples Batis, Blue_silver, Chakwal_50, Local_white and Syn_22 for q1,q2,q3,q4 ad q5 respectively. To accomplish this I ran following command:
  > samples(cuff) <- c("Batis", "Blue_silver","Chakwal_50","Local_white","Syn_22")
  Error in samples(cuff) <- c("Batis", "Blue_silver", "Chakwal_50", "Local_white",  : 
  could not find function "samples<-"
  
  but this command gave error as shown above.
  Also the BAM files have same names for all the samples as mentioned above. 
  How could I change the sample names to desired names in R using cummeRbund? 
  Or I need to re-run cuffdiff and change the names somewhere else?  
  
  user1194: Don't know which file was used by cummeRbund for sample names but replacing q1,q2,q3 and q4  with Batis, Blue_silver, Chakwal_50 and Syn_22 for all the files in the directory containing cuffdiff output worked for me. 
  I used sed language for this as shown below:
  sed -i 's/q4/Syn_22/g' *
  
  Or more generally you can use 
  sed -i 's/sample_name_shown/sample_name_to_change/g' *
  
  After that I deleted the sqlite object created by cummeRbund and again created this object using readCufflinks() in R.
  This time sample names are changed as desired:
  samples(cuff)
  sample_index sample_name sample_name parameter value
  1            1       Batis        <NA>      <NA>  <NA>
  2            2 Blue_silver        <NA>      <NA>  <NA>
  3            3  Chakwal_50        <NA>      <NA>  <NA>
  4            4      Syn_22        <NA>      <NA>  <NA>
  
  
original_text: 1194: <p>I want to analyze RNA seq data using R package <a href="https://bioconductor.org/packages/release/bioc/html/cummeRbund.html" rel="nofollow noreferrer">cummeRbund</a>. Using this package I have a problem changing sample names. When I run this command in cummeRbund</p>
  
  <pre><code>samples(cuff) 
  sample_index sample_name sample_name parameter value
  1            1          q1        &lt;NA&gt;      &lt;NA&gt;  &lt;NA&gt;
  2            2          q2        &lt;NA&gt;      &lt;NA&gt;  &lt;NA&gt;
  3            3          q3        &lt;NA&gt;      &lt;NA&gt;  &lt;NA&gt;
  4            4          q4        &lt;NA&gt;      &lt;NA&gt;  &lt;NA&gt;
  5            5          q5        &lt;NA&gt;      &lt;NA&gt;  &lt;NA&gt;
  </code></pre>
  
  <p>It shows q1,q2,q3,q4 and q5 as sample names for the five samples but I want to change the sample names and put following names for the samples Batis, Blue_silver, Chakwal_50, Local_white and Syn_22 for q1,q2,q3,q4 ad q5 respectively. To accomplish this I ran following command:</p>
  
  <pre><code>&gt; samples(cuff) &lt;- c("Batis", "Blue_silver","Chakwal_50","Local_white","Syn_22")
  Error in samples(cuff) &lt;- c("Batis", "Blue_silver", "Chakwal_50", "Local_white",  : 
  could not find function "samples&lt;-"
  </code></pre>
  
  <p>but this command gave error as shown above.</p>
  
  <p>Also the BAM files have same names for all the samples as mentioned above. </p>
  
  <p>How could I change the sample names to desired names in R using cummeRbund? </p>
  
  <p>Or I need to re-run cuffdiff and change the names somewhere else?  </p>
   1194: <p>Don't know which file was used by cummeRbund for sample names but replacing q1,q2,q3 and q4  with Batis, Blue_silver, Chakwal_50 and Syn_22 for all the files in the directory containing cuffdiff output worked for me. </p>
  
  <p>I used sed language for this as shown below:</p>
  
  <pre><code>sed -i 's/q4/Syn_22/g' *
  </code></pre>
  
  <p>Or more generally you can use </p>
  
  <pre><code>sed -i 's/sample_name_shown/sample_name_to_change/g' *
  </code></pre>
  
  <p>After that I deleted the sqlite object created by cummeRbund and again created this object using <strong>readCufflinks()</strong> in R.
  This time sample names are changed as desired:</p>
  
  <pre><code>samples(cuff)
  sample_index sample_name sample_name parameter value
  1            1       Batis        &lt;NA&gt;      &lt;NA&gt;  &lt;NA&gt;
  2            2 Blue_silver        &lt;NA&gt;      &lt;NA&gt;  &lt;NA&gt;
  3            3  Chakwal_50        &lt;NA&gt;      &lt;NA&gt;  &lt;NA&gt;
  4            4      Syn_22        &lt;NA&gt;      &lt;NA&gt;  &lt;NA&gt;
  </code></pre>
  