+ added convenient script
[qpalma.git] / tools / run_specific_scripts / transcriptome_analysis / createGenefindingInfo.sh
1 #!/bin/bash
2
3 for((idx=1;idx<4;idx++))
4 do
5 current_dir=/fml/ag-raetsch/home/fabio/tmp/vmatch_evaluation/spliced_${idx}
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 #cat $result | grep '^1' > $result2
16 #cat $result2 | sort > $result3
17
18 for((chromo=1;chromo<6;chromo++))
19 do
20 for strand in "+" "-"
21 do
22 full_intron_stops=${intron_stops}_chr${chromo}_${strand}
23 full_intron_starts=${intron_starts}_chr${chromo}_${strand}
24 full_intron_info=${intron_info}_chr${chromo}_${strand}
25 cat $result | grep "^$chromo" | grep " $strand " | cut -f3 | sed -e '/[,]\{1,1\}/!d' | cut -d ',' -f2 > $full_intron_stops
26 cat $result | grep "^$chromo" | grep " $strand " | cut -f4 | sed -e '/[,]\{1,1\}/!d' | cut -d ',' -f1 > $full_intron_starts
27 paste --delimiters=" " $full_intron_starts $full_intron_stops > $full_intron_info
28 rm $full_intron_stops $full_intron_starts
29 done
30 done
31 done