+ minor changes in the paths
[qpalma.git] / tools / run_specific_scripts / transcriptome_analysis / createGenefindingInfo.sh
1 #!/bin/bash
2
3 for((idx=1;idx<2;idx++))
4 do
5 current_dir=/fml/ag-raetsch/share/projects/qpalma/thaliana_4_lanes/lane_${idx}/spliced
6 input=$current_dir/alignment
7 result=$current_dir/alignment/alignmentInfo.genefinding
8 result2=$current_dir/alignment/alignmentInfo.genefinding.chr1_only
9 result3=$current_dir/alignment/alignmentInfo.genefinding.chr1_only.sorted
10 intron_stops=$current_dir/alignment/intron_stops
11 intron_starts=$current_dir/alignment/intron_starts
12 intron_info=$current_dir/alignment/intron_info
13
14 python createExonInfoForGenefinding.py $input $result
15
16 #cat $result | grep '^1' > $result2
17 #cat $result2 | sort > $result3
18
19 for((chromo=1;chromo<6;chromo++))
20 do
21 for strand in "+" "-"
22 do
23 full_intron_stops=${intron_stops}_chr${chromo}_${strand}
24 full_intron_starts=${intron_starts}_chr${chromo}_${strand}
25 full_intron_info=${intron_info}_chr${chromo}_${strand}
26 cat $result | grep "^$chromo" | grep " $strand " | cut -f3 | sed -e '/[,]\{1,1\}/!d' | cut -d ',' -f2 > $full_intron_stops
27 cat $result | grep "^$chromo" | grep " $strand " | cut -f4 | sed -e '/[,]\{1,1\}/!d' | cut -d ',' -f1 > $full_intron_starts
28 paste --delimiters=" " $full_intron_starts $full_intron_stops > $full_intron_info
29 rm $full_intron_stops $full_intron_starts
30 done
31 done
32 done