You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: file_formats.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# File Formats
2
2
3
-
This lecture is aimed at making you discover the most popular file formats used in bioinforatics. You're expected to have basic working knowledge of linux to be able to follow the lesson.
3
+
This lecture is aimed at making you discover the most popular file formats used in bioinformatics. You're expected to have basic working knowledge of Linux to be able to follow the lesson.
4
4
5
5
## Table of Contents
6
6
*[The fasta format](#the-fasta-format)
@@ -11,7 +11,7 @@ This lecture is aimed at making you discover the most popular file formats used
11
11
12
12
### The fasta format
13
13
14
-
The fasta format was invented in 1988 and designed to represent nucleotide or peptide sequences. It originates from the [FASTA](https://en.wikipedia.org/wiki/FASTA) software package, but is now a standard in the world of bioinformatics
14
+
The fasta format was invented in 1988 and designed to represent nucleotide or peptide sequences. It originates from the [FASTA](https://en.wikipedia.org/wiki/FASTA) software package, but is now a standard in the world of bioinformatics.
15
15
16
16
The first line in a FASTA file starts with a ">" (greater-than) symbol followed by the description or identifier of the sequence. Following the initial line (used for a unique description of the sequence) is the actual sequence itself in standard one-letter code.
A fasta file can contain multiple sequence. Each sequence will be separated by their "header" line, starting by ">"
34
+
A fasta file can contain multiple sequence. Each sequence will be separated by their "header" line, starting by ">".
35
35
36
36
Example:
37
37
@@ -49,7 +49,7 @@ SQFIGYPITLFVEK
49
49
50
50
### The fastq format
51
51
52
-
The fastq format is also a text based format to represent nucleotide sequences, but also contains the coresponding quality of each nucleotide. It is the standard for storing the output of high-throughput sequencing instruments such as the Illumina machines.
52
+
The fastq format is also a text based format to represent nucleotide sequences, but also contains the corresponding quality of each nucleotide. It is the standard for storing the output of high-throughput sequencing instruments such as the Illumina machines.
The quality, also called phred scores is the probability that the corresponding basecall is incorrect.
72
+
The quality, also called phred score, is the probability that the corresponding basecall is incorrect.
73
73
74
-
Phred scores use a logarithmic scale, and are represented by ASCII characters, mapping to a quality usually going from 0 to 40
74
+
Phred scores use a logarithmic scale, and are represented by ASCII characters, mapping to a quality usually going from 0 to 40.
75
75
76
76
| Phred Quality Score | Probability of incorrect base call | Base call accuracy
77
77
| --- | --- | ---
@@ -90,9 +90,9 @@ SAM (file format) is a text-based format for storing biological sequences aligne
90
90
91
91
The SAM format consists of a header and an alignment section. The binary representation of a SAM file is a BAM file, which is a compressed SAM file.[1] SAM files can be analysed and edited with the software SAMtools.
92
92
93
-
The SAM format has a really extensive and complex specification that you can find [here](https://samtools.github.io/hts-specs/SAMv1.pdf)
93
+
The SAM format has a really extensive and complex specification that you can find [here](https://samtools.github.io/hts-specs/SAMv1.pdf).
94
94
95
-
In brief it consists in a header section and reads (with other information) in tab delimited format.
95
+
In brief it consists of a header section and reads (with other information) in tab delimited format.
the vcf is also a text-based file format. VCF stands for Variant Call Format and is used to store gene sequence variations (SNVs, indels). The format hs been developped for genotyping projects, and is the standard to represent variations in the genome of a species.
114
+
The vcf format is also a text-based file format. VCF stands for Variant Call Format and is used to store gene sequence variations (SNVs, indels). The format has been developped for genotyping projects, and is the standard to represent variations in the genome of a species.
115
115
116
-
A vcf is a tab-delimited file with 9 columns, described [here](https://samtools.github.io/hts-specs/VCFv4.2.pdf)
116
+
A vcf is a tab-delimited file, described [here](https://samtools.github.io/hts-specs/VCFv4.2.pdf).
117
117
118
118
#### VCF Example
119
119
@@ -163,9 +163,9 @@ chr2 215634055 . C T
163
163
164
164
### the gff format
165
165
166
-
The general feature format (gff) is another text file format. used for describing genes and other features of DNA, RNA and protein sequences. It is the standrad for annotation of genomes.
166
+
The general feature format (gff) is another text file format, used for describing genes and other features of DNA, RNA and protein sequences. It is the standard for annotation of genomes.
167
167
168
-
A gff file should, as a vcf, conatins 9 columns described [here](https://github.com/The-Sequence-Ontology/Specifications/blob/master/gff3.md)
168
+
A gff file should contain 9 columns, described [here](https://github.com/The-Sequence-Ontology/Specifications/blob/master/gff3.md)
Copy file name to clipboardExpand all lines: qc.md
+14-8Lines changed: 14 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ The sequencing was done as paired-end 2x150bp.
7
7
8
8
## Downloading the data
9
9
10
-
The Raw data were deposited at the European nucleotide archive, under the accession number SRR957824, go the the ENA [website](http://www.ebi.ac.uk/ena) and search for the run with the accession SRR957824. Download the two fastq files associated with the run:
10
+
The raw data were deposited at the European Nucleotide Archive, under the accession number SRR957824. Go to the ENA [website](http://www.ebi.ac.uk/ena) and search for the run with the accession SRR957824. Download the two fastq files associated with the run:
To check the quality of the sequence data we will use a tool called FastQC. With this you can check things like read length distribution, quality distribution across the read length, sequencing artifacts and much more.
20
20
21
-
FastQC has a graphical interface and can be downloaded and ran on a Windows or LINUX computer without installation. It is available [here](http://www.bioinformatics.babraham.ac.uk/projects/fastqc/).
21
+
FastQC has a graphical interface and can be downloaded and run on a Windows or Linux computer without installation. It is available [here](http://www.bioinformatics.babraham.ac.uk/projects/fastqc/).
22
22
23
-
However, FastQC is also available as a command line utility on the training server you are using. You can load the module and execute the program as follow:
23
+
However, FastQC is also available as a command line utility on the training server you are using. You can load the module and execute the program as follows:
24
24
25
25
```
26
-
module load fastqc
26
+
module load FastQC
27
27
fastqc $read1 $read2
28
28
```
29
29
30
30
which will produce both a .zip archive containing all the plots, and a html document for you to look at the result in your browser.
31
31
32
-
Open the html file with your favourite web browser, and try to interpret them
32
+
Open the html file with your favourite web browser, and try to interpret them.
33
33
34
34
Pay special attention to the per base sequence quality and sequence length distribution. Explanations for the various quality modules can be found [here](http://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/3%20Analysis%20Modules/). Also, have a look at examples of a [good](http://www.bioinformatics.babraham.ac.uk/projects/fastqc/good_sequence_short_fastqc.html) and a [bad](http://www.bioinformatics.babraham.ac.uk/projects/fastqc/bad_sequence_fastqc.html) illumina read set for comparison.
35
35
@@ -49,7 +49,9 @@ cd scythe
49
49
make all
50
50
```
51
51
52
-
Then, copy or move "scythe" to a directory in your $PATH.
52
+
Then, copy or move "scythe" to a directory in your $PATH, for example like this:
53
+
54
+
`cp scythe $HOME/bin/`
53
55
54
56
Scythe can be run minimally with:
55
57
@@ -73,6 +75,10 @@ cd sickle
73
75
make
74
76
```
75
77
78
+
Copy sickle to a directory in your $PATH:
79
+
80
+
`cp sickle $HOME/bin/`
81
+
76
82
Sickle has two modes to work with both paired-end and single-end reads: sickle se and sickle pe.
77
83
78
84
Running sickle by itself will print the help:
@@ -95,8 +101,8 @@ What did the trimming do to the per-base sequence quality, the per sequence qual
95
101
96
102
What is the sequence duplication levels graph about? Why should you care about a high level of duplication, and why is the level of duplication very low for this data?
97
103
98
-
Based on the FastQC report, there seems to be a population of shorter reads that are technical artefacts. We will ignore them for now as they will not interfere with our analysis.
104
+
Based on the FastQC report, there seems to be a population of shorter reads that are technical artifacts. We will ignore them for now as they will not interfere with our analysis.
99
105
100
106
## Extra exercises
101
107
102
-
Perform quality control on the extra datasets given by your instructors
108
+
Perform quality control on the extra datasets given by your instructors.
Copy file name to clipboardExpand all lines: rna_seq.md
+38-36Lines changed: 38 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,10 +3,10 @@
3
3
## Load salmon
4
4
5
5
```
6
-
module load salmon
6
+
module load Salmon
7
7
```
8
8
9
-
## Downloading the data.
9
+
## Downloading the data
10
10
11
11
For this tutorial we will use the test data from [this](http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1004393) paper:
12
12
@@ -27,7 +27,7 @@ So to summarize we have:
27
27
* HBR + ERCC Spike-In Mix2, Replicate 2
28
28
* HBR + ERCC Spike-In Mix2, Replicate 3
29
29
30
-
You can download the data from [here](http://139.162.178.46/files/tutorials/toy_rna.tar.gz)
30
+
You can download the data from [here](http://139.162.178.46/files/tutorials/toy_rna.tar.gz).
31
31
32
32
Unpack the data and go into the toy_rna directory
33
33
@@ -36,13 +36,13 @@ tar xzf toy_rna.tar.gz
36
36
cd toy_rna
37
37
```
38
38
39
-
## indexing transcriptome
39
+
## Indexing transcriptome
40
40
41
41
```
42
42
salmon index -t chr22_transcripts.fa -i chr22_index
43
43
```
44
44
45
-
## quantify reads using salmon
45
+
## Quantify reads using salmon
46
46
47
47
```bash
48
48
foriin*_R1.fastq.gz
@@ -64,9 +64,9 @@ Salmon exposes many different options to the user that enable extra features or
64
64
65
65
After the salmon commands finish running, you should have a directory named `quant`, which will have a sub-directory for each sample. These sub-directories contain the quantification results of salmon, as well as a lot of other information salmon records about the sample and the run. The main output file (called quant.sf) is rather self-explanatory. For example, take a peek at the quantification file for sample `HBR_Rep1` in `quant/HBR_Rep1/quant.sf` and you’ll see a simple TSV format file listing the name (Name) of each transcript, its length (Length), effective length (EffectiveLength) (more details on this in the documentation), and its abundance in terms of Transcripts Per Million (TPM) and estimated number of reads (NumReads) originating from this transcript.
66
66
67
-
## import read counts using tximport
67
+
## Import read counts using tximport
68
68
69
-
Using the tximport R package, you can import salmon’s transcript-level quantifications and optionally aggregate them to the gene level for gene-level differential expression analysis
69
+
Using the tximport R package, you can import salmon’s transcript-level quantifications and optionally aggregate them to the gene level for gene-level differential expression analysis.
70
70
71
71
First, open up your favourite R IDE and install the necessary packages:
72
72
@@ -86,59 +86,57 @@ library(GenomicFeatures)
86
86
library(readr)
87
87
```
88
88
89
-
Salmon did the quantifiation of the transcript level. We want to see which genes are differentially expressed, so we need to link the transcripts name to the gene names. We can use our .gtf annotation for that, and the GenomicFeatures package:
89
+
Salmon did the quantifiation of the transcript level. We want to see which genes are differentially expressed, so we need to link the transcript names to the gene names. We can use our .gtf annotation for that, and the GenomicFeatures package:
Now we can import the salmon quantification. First, download the file with sample descriptions from [here](https://raw.githubusercontent.com/HadrienG/tutorials/master/data/samples.txt) and put it in the toy_rna directory. Then, use that file to load the corresponding quantification data.
Instantiate the DESeqDataSet and generate result table. See ?DESeqDataSetFromTximport and ?DESeq for more information about the steps performed by the program.
129
-
127
+
Instantiate the DESeqDataSet and generate result table. See `?DESeqDataSetFromTximport` and `?DESeq` for more information about the steps performed by the program.
run the `summary` command to have an idea of how many genes are up and down-regulated between the two conditions
135
+
Run the `summary` command to get an idea of how many genes are up- and downregulated between the two conditions:
138
136
139
137
`summary(res)`
140
138
141
-
DESeq uses a negative binomial distribution. Such distribution has two parameters: mean and dispersion. The dispersion is a parameter describing how much the variance deviates from the mean.
139
+
DESeq uses a negative binomial distribution. Such distributions have two parameters: mean and dispersion. The dispersion is a parameter describing how much the variance deviates from the mean.
142
140
143
141
You can read more about the methods used by DESeq2 in the [paper](https://genomebiology.biomedcentral.com/articles/10.1186/s13059-014-0550-8) or the [vignette](https://www.bioconductor.org/packages/devel/bioc/vignettes/DESeq/inst/doc/DESeq.pdf)
144
142
@@ -218,17 +216,17 @@ library(gageData)
218
216
Let’s use the `mapIds` function to add more columns to the results. The row.names of our results table has the Ensembl gene ID (our key), so we need to specify `keytype=ENSEMBL`. The column argument tells the `mapIds` function which information we want, and the `multiVals` argument tells the function what to do if there are multiple possible values for a single input value. Here we ask to just give us back the first one that occurs in the database. Let’s get the Entrez IDs, gene symbols, and full gene names.
We’re going to use the [gage](http://bioconductor.org/packages/release/bioc/html/gage.html) package for pathway analysis, and the [pathview](http://bioconductor.org/packages/release/bioc/html/pathview.html) package to draw a pathway diagram.
241
-
238
+
We’re going to use the [gage](https://bioconductor.org/packages/release/bioc/html/gage.html) package for pathway analysis, and the [pathview](https://bioconductor.org/packages/release/bioc/html/pathview.html) package to draw a pathway diagram.
242
239
243
240
The gageData package has pre-compiled databases mapping genes to KEGG pathways and GO terms for common organisms:
244
241
245
242
```R
246
243
data(kegg.sets.hs)
247
244
data(sigmet.idx.hs)
248
-
kegg.sets.hs=kegg.sets.hs[sigmet.idx.hs]
245
+
kegg.sets.hs<-kegg.sets.hs[sigmet.idx.hs]
249
246
head(kegg.sets.hs, 3)
250
247
```
251
248
252
-
Run the pathway analysis. See help on the gage function with ?gage. Specifically, you might want to try changing the value of same.dir
249
+
Run the pathway analysis. See help on the gage function with `?gage`. Specifically, you might want to try changing the value of same.dir.
pull out the top 5 upregulated pathways, then further process that just to get the IDs. We’ll use these KEGG pathway IDs downstream for plotting.
258
+
Pull out the top 5 upregulated pathways, then further process that just to get the IDs. We’ll use these KEGG pathway IDs downstream for plotting. The `dplyr` package is required to use the pipe (`%>%`) construct.
Finally, the pathview() function in the pathview package makes the plots. Let’s write a function so we can loop through and draw plots for the top 5 pathways we created above.
276
+
Finally, the `pathview()` function in the pathview package makes the plots. Let’s write a function so we can loop through and draw plots for the top 5 pathways we created above.
0 commit comments