generated from 10adavis/Rmarkdown_Template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
1.03_Gather-and-Tidy-Data.Rmd
48 lines (38 loc) · 1.7 KB
/
1.03_Gather-and-Tidy-Data.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
title: "1.03_Gather-and-Tidy-Data"
author: ""
date: "`r format(Sys.time(), '%d %B %Y')`"
output:
rmarkdown::html_document:
toc: TRUE
---
## CHANGE ME!!!
In order to run this pipeline on your data please add your counts and metadata to the [Input](../Input) folder. One will have to modify the directory paths to the counts and metadata files below. By default this pipeline will run on the data in the [test_data](../test_data).
# Objectives:
In this script the user will read in the raw counts and metadata that will be used as input for the DESeq2 analysis.
## Read in the raw counts associated with this experiment:
This table should be a csv file, where the first column corresponds to gene names (ENSEMBL Gene IDs), and the columns correspond to the counts associated for each sample in the experiment. Note that the order of the columns need to be in the same as the order of the sample names in the metadata table below.
### Read in counts
```{r}
counts<-read.table('../Example_data/counts.tsv',header=TRUE,row.names = 1)
head(counts)
```
### Read in metadata:
```{r}
# Create data frame
metadata <- read.table("../Example_data/metadata.tsv",row.names=1,header=TRUE)
head(metadata)
```
## Check that the rows of metadata are in the same order as the columns in counts:
The row names of the metadata needs to be in the same order of the colnames of your raw counts data.
```{r}
# This can be checked with:
all(rownames(metadata) == colnames(counts))
```
### Next step:
Proceed to run the .Rmd script: [2.03-DESeq2.Rmd](2.03-DESeq2.Rmd) summarized in [2.03-DESeq2.html](../Results/2.03-DESeq2.html)
### Session information
```{r session_info_103}
sessionInfo()
```
This document was processed on: `r Sys.Date()`.