https://github.com/razielar/r-scripts
https://github.com/razielar/r-scripts
bioinformatics gene-ontology ggplot2
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/razielar/r-scripts
- Owner: razielar
- License: mit
- Created: 2018-05-15T09:12:09.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-11-06T12:24:54.000Z (over 4 years ago)
- Last Synced: 2025-01-11T14:48:36.829Z (4 months ago)
- Topics: bioinformatics, gene-ontology, ggplot2
- Language: Jupyter Notebook
- Size: 1.51 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# R scripts:
### Content:
1. [Obtaining.metadata.R](#Obtaining)
2. [Pie plot](#pie)
3. [Count Bar plot](#bar)
4. [Shannon's entropy and Isoform ratio](#entropy)
5. [Venn Diagram](#venn)
6. [Boxplots Area Pixels](#image_pixels)
7. [GO enrichment](#go)AS: *Alternative splicing*
List_of_AS_events.txt:
| AS event | Sample 1 | Sample 2 | dPSI |
|----------|:-------------:|------:| ------:|
| DmeINT0025681 | 14.9588 | 0.5367 | 14.9409 |
| DmeINT0006388 | 8.3756 | 1.1523 | 7.0302|
| DmeALTD0001672-1/2 | 11.6038 | 4.3211 | 6.1084 |Usage:
```{r}
./Obtaining.metadata.R List_of_AS_events.txt
```
There are three types of usage:
**a)** Default usage: the input file is the standard input:
```{r}
awk -F "\t" '{print $2}' Input.file.txt | ./Pie.plot.R
```
**b)** Specifying some features:
```{r}
./Pie.plot.R --input=Input.file.txt --header=TRUE --output="trial.pdf" --title="Example"
```
**c)** Specifying a specific color palette:```{r}
awk -F "\t" '{print $2}' Input.file.txt |\
./Pie.plot.R --selectColor=TRUE --palette=/nfs/users2/rg/ramador/R/palettes/example.palette.txt```
Same features as *Pie.plot.R*
Usage:
```{r}
cat list_of_elements | ./Bar.ggplot.R --title="Desired title" --x_axis_rotation=TRUE
```
## 4) Shannons.entropy.and.isoform.ratio.R
Description:
This script needs **two input** files, a transcript expression matrix in TPM/RPKM/FPMK and a GTF file with the **specific order**: *Gene_ID, Transcript_ID, Gene_Name and Transcript_name* the rest of information within the GTF will be ignored.
Example of GTF file:
| Gene ID | Transcript ID | Gene Name | Transcript Name |
|----------|:-------------:|------:| ------:|
| FBgn0031208 | FBtr0300689 | CG11023 | CG11023-RB |
| FBgn0031208 | FBtr0300690 | CG11023 | CG11023-RC|
| FBgn0031208 | FBtr0330654 | CG11023 | CG11023-RD |Features:
* Handling command-flags: *available*
* Handling standard input: *not available*```{r}
./Shannons.entropy.and.isoform.ratio.R --input_matrix=/Folder/Transcription.matrix.TPM.tsv --annotation=/Folder/GTF.file.txt
```
Description:
Receives a tsv file and returns a Venn Diagram and a file with the intersections of the items of input file.
Features:
* Handling command-flags: *available*
* Handling standard input: *available*Description:
Receives a *csv file* and returns Boxplots (ggplot2) in pdf, in x-axis the different phenotypes and y-axis relative wing area in pixels.
```{r}
cat file.csv | ./Bar.ggplot.R
```
*Requires R > 3.6* for the Bioconductor libraries: GO.db, GOstats and biomart