Answers.Body: <p>You are right, <code>samples.txt</code> is not generated by Salmon (or any other transcript abundance quantifiers). From <a href="https://bioconductor.org/packages/devel/data/experiment/vignettes/tximportData/inst/doc/tximportData.html" rel="noreferrer">documentation</a>, you can find a <a href="http://www.geuvadis.org/web/geuvadis" rel="noreferrer">link</a> to an example of how <code>samples.txt</code> should look like. </p>
  
  <p>Note: At the moment, the server is unavailable (I got an <code>Error 503: Service Temporarily Unavailable</code>) - I'd suggest you get directly in contact with the owners / <a href="https://bioconductor.org/packages/devel/data/experiment/vignettes/tximportData/inst/doc/tximportData.html" rel="noreferrer">authors</a>.</p>
  
  <p>Luckily, there is a call of the function importing <code>samples.txt</code> file in the <a href="https://bioconductor.org/packages/devel/data/experiment/vignettes/tximportData/inst/doc/tximportData.html" rel="noreferrer">doc</a> itself (variable <code>samples</code>), so you can get an idea of ow you have to structure it: </p>
  
  <pre><code>&gt; samples
  
  ##   pop center                assay    sample experiment       run
  ## 1 TSI  UNIGE NA20503.1.M_111124_5 ERS185497  ERX163094 ERR188297
  ## 2 TSI  UNIGE NA20504.1.M_111124_7 ERS185242  ERX162972 ERR188088
  ## 3 TSI  UNIGE NA20505.1.M_111124_6 ERS185048  ERX163009 ERR188329
  ## 4 TSI  UNIGE NA20507.1.M_111124_7 ERS185412  ERX163158 ERR188288
  ## 5 TSI  UNIGE NA20508.1.M_111124_2 ERS185362  ERX163159 ERR188021
  ## 6 TSI  UNIGE NA20514.1.M_111124_4 ERS185217  ERX163062 ERR188356
  </code></pre>
  
  <p>As an alternate workaround, find the <code>samples.txt</code> format directly from <a href="https://bioconductor.org/packages/release/data/experiment/html/tximportData.html" rel="noreferrer">tximportData Bioconductor page</a>:</p>
  
  <ol>
  <li>download <a href="https://bioconductor.org/packages/release/data/experiment/src/contrib/tximportData_1.6.0.tar.gz" rel="noreferrer">source code</a></li>
  <li>extract</li>
  <li>navigate to: <code>[...]/tximportData 2/inst/extdata</code></li>
  <li>read content of <code>samples.txt</code>.</li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-09T09:29:20.213Z
Answers.LastActivityDate: 2018-04-09T09:29:20.213Z
Answers.UserDisplayName: aechchiki
Body: <p>I ran bulk <code>RNA-seq</code> experiment and got <code>quant.sf</code> file. Now, I am struggling with understanding what <code>tximport</code> package does and how to use it correctly. My ultimate goal is to feed the data into <code>DESeq2</code> for differential expression analysis. In the documentation:</p>
  
  <p><a href="http://bioconductor.org/packages/release/bioc/manuals/tximport/man/tximport.pdf" rel="nofollow noreferrer">http://bioconductor.org/packages/release/bioc/manuals/tximport/man/tximport.pdf</a></p>
  
  <p>We have:</p>
  
  <pre><code>samples &lt;- read.table(file.path(dir,"samples.txt"), header=TRUE)
  files &lt;- file.path(dir,"salmon", samples$run, "quant.sf")
  </code></pre>
  
  <p>I do not understand what are these <code>samples.txt</code>. It is not generated by <code>salmon</code>, so I suppose that I need to write it myself. How then? What is the correct format for the file? And what if I want to feed just one sample in? That is actually what I want initially: process each sample separately. Could anyone explain step by step how we could utilize <code>tximport</code> when we have just one <code>quant.sf</code> file to get to raw count matrix to feed it into <code>DeSeq2</code>?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-09T09:34:01.447Z
Comments.Text: I suppose you could write a `samples.txt` file with a single sample, but there's not much point in processing the samples separately because the first step of `DESeq2` is to calculate size factors, which requires comparisons across samples.
Comments.UserDisplayName: heathobrien
Tags: <rna-seq><deseq2><tximport>
Title: Salmon tximport
ThreadText: # Salmon tximport
  
  (Asked by: username_0 on 2018-04-09)
  
  I ran bulk `RNA-seq` experiment and got `quant.sf` file. Now, I am struggling with understanding what `tximport` package does and how to use it correctly. My ultimate goal is to feed the data into `DESeq2` for differential expression analysis. In the documentation:
  
  <http://bioconductor.org/packages/release/bioc/manuals/tximport/man/tximport.pdf>
  
  We have:
  
  ```
  samples <- read.table(file.path(dir,"samples.txt"), header=TRUE)
  files <- file.path(dir,"salmon", samples$run, "quant.sf")
  
  ```
  
  I do not understand what are these `samples.txt`. It is not generated by `salmon`, so I suppose that I need to write it myself. How then? What is the correct format for the file? And what if I want to feed just one sample in? That is actually what I want initially: process each sample separately. Could anyone explain step by step how we could utilize `tximport` when we have just one `quant.sf` file to get to raw count matrix to feed it into `DeSeq2`?
  
  **Tags:** rna-seq, deseq2, tximport
  
  > **Comments:**
  > **username_1**: I suppose you could write a `samples.txt` file with a single sample, but there's not much point in processing the samples separately because the first step of `DESeq2` is to calculate size factors, which requires comparisons across samples.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-04-09. Score: 5 | Accepted answer
  
  You are right, `samples.txt` is not generated by Salmon (or any other transcript abundance quantifiers). From [documentation](https://bioconductor.org/packages/devel/data/experiment/vignettes/tximportData/inst/doc/tximportData.html), you can find a [link](http://www.geuvadis.org/web/geuvadis) to an example of how `samples.txt` should look like.
  
  Note: At the moment, the server is unavailable (I got an `Error 503: Service Temporarily Unavailable`) - I'd suggest you get directly in contact with the owners / [authors](https://bioconductor.org/packages/devel/data/experiment/vignettes/tximportData/inst/doc/tximportData.html).
  
  Luckily, there is a call of the function importing `samples.txt` file in the [doc](https://bioconductor.org/packages/devel/data/experiment/vignettes/tximportData/inst/doc/tximportData.html) itself (variable `samples`), so you can get an idea of ow you have to structure it:
  
  ```
  > samples
  
  ##   pop center                assay    sample experiment       run
  ## 1 TSI  UNIGE NA20503.1.M_111124_5 ERS185497  ERX163094 ERR188297
  ## 2 TSI  UNIGE NA20504.1.M_111124_7 ERS185242  ERX162972 ERR188088
  ## 3 TSI  UNIGE NA20505.1.M_111124_6 ERS185048  ERX163009 ERR188329
  ## 4 TSI  UNIGE NA20507.1.M_111124_7 ERS185412  ERX163158 ERR188288
  ## 5 TSI  UNIGE NA20508.1.M_111124_2 ERS185362  ERX163159 ERR188021
  ## 6 TSI  UNIGE NA20514.1.M_111124_4 ERS185217  ERX163062 ERR188356
  
  ```
  
  As an alternate workaround, find the `samples.txt` format directly from [tximportData Bioconductor page](https://bioconductor.org/packages/release/data/experiment/html/tximportData.html):
  
  1. download [source code](https://bioconductor.org/packages/release/data/experiment/src/contrib/tximportData_1.6.0.tar.gz)
  2. extract
  3. navigate to: `[...]/tximportData 2/inst/extdata`
  4. read content of `samples.txt`.
  
  
  ---
  
  