<commit_before># HTSeq-tools

This repository hosts scripts and tools for analysis of high throughput sequencing data.

## Tools

#### ensref

*Made for SLURM*

This is the script we use for downloading genome assemblies from ENSEMBL and 
build the respective indexes and folders structure. 
 
For usage check the help output: 
```
./ensref --help
```

The former script ENSref is deprecated and will be dropped from the repository and
further development/maintenance.

#### CCG

this script takes a wget command from CCG donwload instructions, 
downloads the respective files to a destination of choice checking file integrity afterwards.

usage: 
```
CCG -l "wget ..." -o destination_folder
```

#### getChromosome

This script allows you to generate a fasta file for a chromosome contained in a multifasta file.

Usage:
```
getChromosome -h
# For >2 dna:chromosome chromosome:GRCm38:2:1:182113224:1 REF use:
getChromosome -i GRCm38.dna.primary_assembly.fa -o output_folder -c 2
```

### tuxedo-slurm.sh

*Made for SLURM & Environment Modules Project*

This script runs a full RNAseq pipeline under a slurm jobs distribution system

* fastQC - quality control 
* flexbar - adapters and quality trimming 
* tophat - aligner 
* cufflinks - transcripts assembly and quantification 
* cuffmerge - merging of assemblies 
* cuffcompare - corrrection of lost protein ids 
* cuffquant - transcript expression profiles 
* cuffdiff - differential expression analysis 

Please read the instructions inside the script for usage.

### tuxedo_v3-slurm.sh

*Made for SLURM & Environment Modules Project*

This script runs a full RNAseq pipeline under a slurm jobs distribution system 
using about 18 processes per file allowing full analysis of 20 libraries with 
50 - 150 M reads per library to complete under 12h 

* fastQC - quality control 
* flexbar - adapters and quality trimming 
* hisat - aligner 
* stringtie - transcripts assembly and quantification 
* cuffmerge - merging of assemblies 
* cuffquant - transcript expression profiles 
* cuffdiff - differential expression analysis 

Please read the instructions inside the script for usage. 

####  aDiff

This python script takes cuffdiff results as inputs and generates excel report 
tables for each parallel comparison. It annotates each gene with the respective 
GO and KEGG term. It also uses DAVID to perform GO enrichment analysis of biological process, 
cellular components, molecular function and other DAVID annotations using significantly changed genes, 
transcripts, promoter usage, splicing, CDS.

Usage: 

```
aDiff -h
```

#### QC.R

This R script performs a minimal quality control analysis on cuffdiff outputs. 
The output folder needs to be created before using this script. 
Not all plot allways perform with every dataset - you might therefore need to 
comment out some plots.

This R scripts requires the `cummeRbund` package. To install it, run the following
in an `R` console:

```
source('http://www.bioconductor.org/biocLite.R')
biocLite('cummeRbund', ask=FALSE)
```

Usage:

```
mkdir cummeRbund_output_folder
Rscript QC.R cuffdiff_output_folder cummeRbund_output_folder<commit_msg>README: added mart<commit_after># HTSeq-tools

This repository hosts scripts and tools for analysis of high throughput sequencing data.

## Tools

#### ensref

*Made for SLURM*

This is the script we use for downloading genome assemblies from ENSEMBL and 
build the respective indexes and folders structure. 
 
For usage check the help output: 
```
./ensref --help
```

The former script ENSref is deprecated and will be dropped from the repository and
further development/maintenance.

#### CCG

this script takes a wget command from CCG donwload instructions, 
downloads the respective files to a destination of choice checking file integrity afterwards.

usage: 
```
CCG -l "wget ..." -o destination_folder
```

#### getChromosome

This script allows you to generate a fasta file for a chromosome contained in a multifasta file.

Usage:
```
getChromosome -h
# For >2 dna:chromosome chromosome:GRCm38:2:1:182113224:1 REF use:
getChromosome -i GRCm38.dna.primary_assembly.fa -o output_folder -c 2
```

#### tuxedo-slurm.sh

*Made for SLURM & Environment Modules Project*

This script runs a full RNAseq pipeline under a slurm jobs distribution system

* fastQC - quality control 
* flexbar - adapters and quality trimming 
* tophat - aligner 
* cufflinks - transcripts assembly and quantification 
* cuffmerge - merging of assemblies 
* cuffcompare - corrrection of lost protein ids 
* cuffquant - transcript expression profiles 
* cuffdiff - differential expression analysis 

Please read the instructions inside the script for usage.

#### tuxedo_v3-slurm.sh

*Made for SLURM & Environment Modules Project*

This script runs a full RNAseq pipeline under a slurm jobs distribution system 
using about 18 processes per file allowing full analysis of 20 libraries with 
50 - 150 M reads per library to complete under 12h 

* fastQC - quality control 
* flexbar - adapters and quality trimming 
* hisat - aligner 
* stringtie - transcripts assembly and quantification 
* cuffmerge - merging of assemblies 
* cuffquant - transcript expression profiles 
* cuffdiff - differential expression analysis 

Please read the instructions inside the script for usage. 

####  aDiff

This python script takes cuffdiff results as inputs and generates excel report 
tables for each parallel comparison. It annotates each gene with the respective 
GO and KEGG term. It also uses DAVID to perform GO enrichment analysis of biological process, 
cellular components, molecular function and other DAVID annotations using significantly changed genes, 
transcripts, promoter usage, splicing, CDS.

Usage: 

```
aDiff -h
```

#### mart

A command line tool to annotate ids in a column of tables (.tsv, .csv, .xls[x] format)
with the R/biomaRt tool and optionally merge the result with the original table.

Dependencies:
* python >= 2.7
* python/argparse
* R (tested on version 3.2)
* R/WriteXLS
* R/argparse
* R/biomaRt
* R/plyr
* R/readxl

Usage:
```
mart -h
```

#### QC.R

This R script performs a minimal quality control analysis on cuffdiff outputs. 
The output folder needs to be created before using this script. 
Not all plot allways perform with every dataset - you might therefore need to 
comment out some plots.

This R scripts requires the `cummeRbund` package. To install it, run the following
in an `R` console:

```
source('http://www.bioconductor.org/biocLite.R')
biocLite('cummeRbund', ask=FALSE)
```

Usage:

```
mkdir cummeRbund_output_folder
Rscript QC.R cuffdiff_output_folder cummeRbund_output_folder
{'fraction_non_alphanumeric': 0.06415264423076923, 'fraction_numerical': 0.009615384615384616, 'mean_word_length': 4.359903381642512, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1384607', 'n_tokens_mistral': 2035, 'n_tokens_neox': 1817, 'n_words': 844}