-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcountdata.sh
More file actions
43 lines (23 loc) · 1.09 KB
/
countdata.sh
File metadata and controls
43 lines (23 loc) · 1.09 KB
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
# Stop this script on any error.
set -euo pipefail
# The gene feature file
GTFSRR=srr/SRR.gff
GTFLRR=lrr/LRR.gff
# Collect the output of commands here.
RUNLOG=runlog.txt
echo "*** Counting features with: $GTFSRR"
featureCounts -T 14 -a $GTFSRR -g gene_name -o LRR_Cuffcounts.txt bam/LRR_C*.bam bam/LRR_T*.bam 2>> $RUNLOG
featureCounts -T 16 -a merged.gtf -g gene_id -o mergedcounts.txt SRR/bam/SRR_*.bam LRR/bam/LRR_*.bam
#simple counts
cat LRR_Cuffcounts.txt | cut -f 1,7-12 > simpleLRR_Cuffcounts.txt
echo "*** Generating simple counts."
cat counts.txt | cut -f 1,7-12 > simple_counts.txt
echo "*** Running DESeq1."
curl -s -O http://data.biostarhandbook.com/rnaseq/code/deseq1.r
cat simple_counts.txt | Rscript deseq1.r 3x3 > results_deseq1.txt 2>> $RUNLOG
echo "*** Running DESeq2."
curl -s -O http://data.biostarhandbook.com/rnaseq/code/deseq2.r
cat simple_counts.txt | Rscript deseq2.r 3x3 > results_deseq2.txt 2>> $RUNLOG
echo "*** Running EdgeR."
curl -s -O http://data.biostarhandbook.com/rnaseq/code/edger.r
cat simple_counts.txt | Rscript edger.r 3x3 > results_edger.txt 2>> $RUNLOG