-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path07_HTSeq.sh
55 lines (44 loc) · 1.88 KB
/
07_HTSeq.sh
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
49
50
51
52
53
54
55
#!/bin/bash
echo " This script is to Analysing high-throughput sequencing data"
echo " HTSeq software and Homo_sapiens.GRCh38.99.gtf file used as a ANNOTATION"
echo " This script will read the file from mapped/ directories"
echo " Please provide run accession: SRR975xxx number "
echo " Example: SRR975552 "
mkdir -p analysis
cd analysis
## READ the SRR file
echo "***********************************"
echo " "
read -p ' SRR FILE to Download and press Enter key: ' SRR
echo " "
RAW_HITS="../mapped/${SRR}_RAW_FASTQ/accepted_hits.bam"
TRIMMED_HITS="../mapped/${SRR}_TRIMMED_FASTQ/accepted_hits.bam"
## Analysing high-throughput from RAW Mapped file
if [ ! -f ${RAW_HITS} ]; then
echo " ${RAW_HITS} file doesn't exist "
break ;
else ## Execute Trimming on the Fastq files.
module load htseq/0.11.1
echo "Analysing high-throughput sequencing data from RAW mapping read file"
ANNOTATION=/ibex/reference/KSL/hg38/Gene_annotation/Homo_sapiens.GRCh38.99.gtf
sbatch --time=04:00:00 --mem=16GB --wrap="htseq-count -f bam -s yes -i gene_id \
${RAW_HITS} \
$ANNOTATION \
> ${SRR}_RawMapped_Genes_count.txt"
echo " $SRR_RawMapped_Genes_count.txt will be generated at analysis/ directory"
fi
## Analysing high-throughput from Trimmed Mapped file
if [ ! -f ${TRIMMED_HITS} ]; then
echo " ${TRIMMED_HITS} file doesn't exist "
break ;
else ## Execute Trimming on the Fastq files.
module load htseq/0.11.1
echo "Analysing high-throughput sequencing data from TRIMMED mapping read file"
ANNOTATION=/ibex/reference/KSL/hg38/Gene_annotation/Homo_sapiens.GRCh38.99.gtf
sbatch --time=04:00:00 --mem=16GB --wrap="htseq-count -f bam -s yes -i gene_id \
${TRIMMED_HITS} \
$ANNOTATION \
> ${SRR}_TrimmedMapped_Genes_count.txt"
echo " $SRR_TrimmedMapped_Genes_count.txt will be generated at analysis/ directory"
fi
echo "***********************************"