annotate isoem_wrapper.sh @ 7:aa9875d90894 draft

Uploaded
author saharlcc
date Mon, 19 Sep 2016 22:09:12 -0400
parents 4c4d42f3e28e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
1 #!/bin/bash
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
2
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
3
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
4 echo $@
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
5 echo pwd
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
6 pwd
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
7 isoEMDir=/home/projects/isoem2/isoem-workingversion
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
8 tmapPath=/usr/local/bin
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
9 bedtoolsPath=/usr/local/bin
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
10 hisat2Path=/usr/local/bin
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
11 tempDir=/tmp
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
12
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
13
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
14 isoem2Path=${isoEMDir}/bin
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
15
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
16 #exit;
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
17
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
18 arg=($*)
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
19 i=0
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
20 for a in ${arg[*]}
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
21 do
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
22 ((i++))
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
23 if [ "$a" == "--input1" ]; then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
24 RNAseq_1=${arg[i]}
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
25 fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
26
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
27 if [ "$a" == "--input2" ]; then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
28 RNAseq_2=${arg[i]}
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
29 fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
30
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
31 if [ "$a" == "--GTF" ]; then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
32 GTF_file=${arg[i]}
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
33 fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
34
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
35 if [ "$a" == "--TMAP_INDEX" ]; then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
36 TMAP_INDEX_file=${arg[i]}
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
37 fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
38
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
39 if [ "$a" == "--HISAT2_INDEX" ]; then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
40 HISAT2_INDEX_file=${arg[i]}
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
41 fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
42
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
43 if [ "$a" == "--Cluster" ]; then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
44 Cluster_file=${arg[i]}
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
45 fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
46
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
47 if [ "$a" == "-m" ]; then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
48 M=${arg[i]}
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
49 fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
50
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
51 if [ "$a" == "-d" ]; then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
52 D=${arg[i]}
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
53 fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
54
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
55 if [ "$a" == "--out_gene_fpkm" ]; then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
56 out_gene_fpkm=${arg[i]}
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
57 fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
58
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
59 if [ "$a" == "--out_gene_tpm" ]; then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
60 out_gene_tpm=${arg[i]}
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
61 fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
62
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
63 if [ "$a" == "--out_iso_fpkm" ]; then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
64 out_iso_fpkm=${arg[i]}
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
65 fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
66
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
67 if [ "$a" == "--out_iso_tpm" ]; then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
68 out_iso_tpm=${arg[i]}
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
69 fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
70
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
71 if [ "$a" == "--out_bootstrap" ]; then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
72 out_bootstrap=${arg[i]}
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
73 fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
74
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
75 if [ "$a" == "--RNA_type" ]; then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
76 RNAseqType=${arg[i]}
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
77 fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
78
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
79 if [ "$a" == "--fastaFile" ]; then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
80 FastaFile=${arg[i]}
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
81 fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
82 done
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
83
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
84
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
85
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
86 if [ "${RNAseqType}" == "Ion-Torrent-Proton" ]
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
87 then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
88 echo ${TMAP_INDEX_file}
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
89 echo Align the RNAseq_sample fastq to transcriptome using TMAP
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
90
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
91 f=$(basename ${RNAseq_1})
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
92 # file_type=`echo $f | tail -c 9`
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
93
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
94 # if [ "$file_type" == "fastq.gz" ]; then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
95
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
96 # echo "Unzip fastq files"
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
97
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
98 # gunzip -c ${RNAseq_1} > RNAseq_1.fastq
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
99 # ${tmapPath}/tmap map4 -a 2 -g 3 -n 8 -f ${TMAP_INDEX_file} -r RNAseq_1.fastq -s RNAseq_transcriptome.sam
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
100 # fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
101
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
102 file_type=`echo $f | tail -c 6`
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
103
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
104 if [ "$file_type" == "fastq" ]; then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
105
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
106 ${tmapPath}/tmap map4 -a 2 -g 3 -n 8 -f ${TMAP_INDEX_file} -r ${RNAseq_1} -s RNAseq_transcriptome.sam
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
107 fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
108
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
109 file_type=`echo $f | tail -c 4`
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
110
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
111 if [ "$file_type" == "bam" ]; then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
112
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
113 echo "Convert BAM to fastq"
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
114
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
115 ${bedtoolsPath}/bedtools bamtofastq -i ${RNAseq_1} -fq RNAseq_1.fastq
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
116 ${tmapPath}/tmap map4 -a 2 -g 3 -n 8 -f ${TMAP_INDEX_file} -r RNAseq_1.fastq -s RNAseq_transcriptome.sam
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
117 fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
118
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
119
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
120 elif [ "${RNAseqType}" == "Illumina-paired-end" ]
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
121 then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
122 f=$(basename ${RNAseq_1})
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
123 # file_type=`echo $f | tail -c 9`
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
124
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
125 # if [ "$file_type" == "fastq.gz" ]; then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
126
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
127 # echo "Unzip fastq files"
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
128
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
129 # gunzip -c ${RNAseq_1} > RNAseq_1.fastq
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
130 # gunzip -c ${RNAseq_2} > RNAseq_2.fastq
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
131 # /usr/local/bin/hisat2 -x ${HISAT2_INDEX_file} -1 RNAseq_1.fastq -2 RNAseq_2.fastq --no-discordant --no-mixed --sensitive --no-unal -p 8 > RNAseq_transcriptome.sam
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
132 # fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
133
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
134 file_type=`echo $f | tail -c 6`
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
135
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
136 if [ "$file_type" == "fastq" ]; then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
137
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
138 ${hisat2Path}/hisat2 -x ${HISAT2_INDEX_file} -1 ${RNAseq_1} -2 ${RNAseq_2} --no-discordant --no-mixed --sensitive --no-unal -p 8 > RNAseq_transcriptome.sam
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
139 fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
140
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
141 file_type=`echo $f | tail -c 4`
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
142
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
143 if [ "$file_type" == "bam" ]; then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
144
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
145 echo "Convert BAM to fastq"
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
146
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
147 ${bedtoolsPath}/bedtools bamtofastq -i ${RNAseq_1} -fq RNAseq_1.fastq
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
148 ${bedtoolsPath}/bedtools bamtofastq -i ${RNAseq_2} -fq RNAseq_2.fastq
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
149 ${hisat2Path}/hisat2 -x ${HISAT2_INDEX_file} -1 RNAseq_1.fastq -2 RNAseq_2.fastq --no-discordant --no-mixed --sensitive --no-unal -p 8 > RNAseq_transcriptome.sam
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
150 fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
151
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
152
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
153 else
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
154 f=$(basename ${RNAseq_1})
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
155 # file_type=`echo $f | tail -c 9`
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
156
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
157 # if [ "$file_type" == "fastq.gz" ]; then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
158
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
159 # echo "Unzip fastq files"
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
160
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
161 # gunzip -c ${RNAseq_1} > RNAseq_1.fastq
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
162 # /usr/local/bin/hisat2 -x ${HISAT2_INDEX_file} -U RNAseq_1.fastq --no-discordant --no-mixed --sensitive --no-unal -p 8 > RNAseq_transcriptome.sam
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
163 # fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
164
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
165 file_type=`echo $f | tail -c 6`
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
166
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
167 if [ "$file_type" == "fastq" ]; then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
168
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
169 ${hisat2Path}/hisat2 -x ${HISAT2_INDEX_file} -U ${RNAseq_1} --no-discordant --no-mixed --sensitive --no-unal -p 8 > RNAseq_transcriptome.sam
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
170 fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
171
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
172 if [ "$file_type" == "bam" ]; then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
173
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
174 echo "Convert BAM to fastq"
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
175
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
176 ${bedtoolsPath}/bedtools bamtofastq -i ${RNAseq_1} -fq RNAseq_1.fastq
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
177 ${hisat2Path}/hisat2 -x ${HISAT2_INDEX_file} -U RNAseq_1.fastq --no-discordant --no-mixed --sensitive --no-unal -p 8 > RNAseq_transcriptome.sam
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
178 fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
179
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
180 fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
181
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
182
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
183 echo Sorting
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
184
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
185 LANG=C sort -T ${tempDir} -k 1,1 RNAseq_transcriptome.sam > aligned_reads_sorted.sam
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
186
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
187
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
188 if [ "${RNAseqType}" == "Illumina-paired-end" ]
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
189 then
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
190 echo IsoEM for RNAseq mapped to transcriptome
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
191 ${isoem2Path}/isoem2 -G ${GTF_file} -c ${Cluster_file} -C 95 -a aligned_reads_sorted.sam
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
192
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
193 else
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
194 echo IsoEM for RNAseq mapped to transcriptome
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
195 ${isoem2Path}/isoem2 -G ${GTF_file} -c ${Cluster_file} -C 95 -m ${M} -d ${D} aligned_reads_sorted.sam
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
196 fi
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
197
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
198 echo Join estimates files with ci files
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
199
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
200 echo ls
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
201 #ls ./aligned_reads_sorted/ -ltr
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
202
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
203 join ./aligned_reads_sorted/output/Genes/gene_fpkm_estimates ./aligned_reads_sorted/output/ConfidenceIntervals/gene_fpkm_ci >333
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
204 awk '{print $1 "\t" $2 "\t" $3 "\t" $4}' 333 > gene_fpkm
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
205 join ./aligned_reads_sorted/output/Genes/gene_tpm_estimates ./aligned_reads_sorted/output/ConfidenceIntervals/gene_tpm_ci |awk '{print $1 "\t" $2 "\t" $3 "\t" $4}' > gene_tpm
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
206 join ./aligned_reads_sorted/output/Isoforms/iso_fpkm_estimates ./aligned_reads_sorted/output/ConfidenceIntervals/iso_fpkm_ci |awk '{print $1 "\t" $2 "\t" $3 "\t" $4}' > iso_fpkm
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
207 join ./aligned_reads_sorted/output/Isoforms/iso_tpm_estimates ./aligned_reads_sorted/output/ConfidenceIntervals/iso_tpm_ci |awk '{print $1 "\t" $2 "\t" $3 "\t" $4}' > iso_tpm
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
208
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
209
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
210 #echo Adding output directory to bootstap archive
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
211 #
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
212 #echo ls
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
213 #ls ./aligned_reads_sorted/ -ltr
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
214 #
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
215 #cd aligned_reads_sorted
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
216 #echo ls
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
217 #ls -ltrh
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
218 #gunzip bootstrap.tar.gz
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
219 #tar rf bootstrap.tar output
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
220 #gzip bootstrap.tar
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
221 mv ./aligned_reads_sorted/bootstrap.tar.gz ${out_bootstrap}
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
222
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
223
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
224 #echo ls after gz
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
225 #ls -ltr
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
226 #
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
227 #cd ..
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
228 #pwd
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
229
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
230
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
231 #gunzip ./aligned_reads_sorted/bootstrap.tar.gz
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
232 #tar -rf ./aligned_reads_sorted/bootstrap.tar ./aligned_reads_sorted/output
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
233 #gzip ./aligned_reads_sorted/bootstrap.tar
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
234
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
235 echo ls after gz
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
236 ls -ltr
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
237
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
238 #4. Copy output files
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
239 #############################################################
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
240 mv gene_fpkm ${out_gene_fpkm}
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
241 mv gene_tpm ${out_gene_tpm}
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
242 mv iso_fpkm ${out_iso_fpkm}
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
243 mv iso_tpm ${out_iso_tpm}
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
244
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
245 #5.Remove files
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
246 #############################################################
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
247 rm RNAseq_transcriptome.sam
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
248 rm aligned_reads_sorted.sam
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
249 rm -rf aligned_reads_sorted
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
250
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
251 echo "done"
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
252 date
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
253
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
254
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
255
4c4d42f3e28e Uploaded
saharlcc
parents:
diff changeset
256