annotate commandline_sample_STR-FM_estimate_mininum_informative_Read_Depth @ 7:3c05abb4452e default tip

add missing files
author devteam@galaxyproject.org
date Wed, 22 Apr 2015 12:22:50 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
1 ## This is a sample PBS script for profiling STR from reference genome using STR-FM
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
2 ##
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
3 ##requirement
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
4 ##1 STR error rates (can be downloaded from https://usegalaxy.org/u/guru%40psu.edu/h/error-rates-files) --> errorrate.bymajorallele
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
5 ##
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
6 echo " "
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
7 echo " "
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
8 echo "Job started on `hostname` at `date`"
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
9 cd /working/directory/
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
10 echo ${MOTIF}
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
11 echo ${OUTPUT}
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
12 echo " "
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
13 echo "Generate all possible combination of STR length profile" ## See detail in profilegenerator.xml on https://github.com/Arkarachai/STR-FM
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
14 python profilegenerator.py errorrate.bymajorallele ${MOTIF} 30 > ${OUTPUT}.30
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
15
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
16 echo "remove duplicated profiles"
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
17 cat ${OUTPUT}.30 | sort | uniq > ${OUTPUT}.30.sort
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
18
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
19 echo "genotyping using error correction model" ## See detail in GenotypingSTR.xml on https://github.com/Arkarachai/STR-FM
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
20 python GenotypeTRcorrection.py ${OUTPUT}.30.sort errorrate.bymajorallele ${OUTPUT}.30.prob 0.5
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
21
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
22 echo "select only full motif different --> need to replace 4 with motif size (1-6)"
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
23 cat ${OUTPUT}.30.prob | grep hetero | awk '(($7-$8)==4) || (($8-$7)==4) {print $0}' > ${OUTPUT}.30.prob.screen
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
24
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
25 echo "Evaluate the probability of the allele combination to generate read profile" ## See detail in probvalueforhetero.xml on https://github.com/Arkarachai/STR-FM
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
26 python heteroprob.py ${OUTPUT}.30.prob.screen ${INPUT} > ${OUTPUT}.30.bino
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
27
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
28 echo "formatting"
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
29 cat ${OUTPUT}.30.bino | sort -k 12n,12 -k 6n,6 > ${OUTPUT}.30.bino.sort
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
30
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
31 echo "Combine read profile probabilities" ## See detail in combineprobforallelecombination.xml on https://github.com/Arkarachai/STR-FM
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
32 python combinedprobforallelecombination.py ${OUTPUT}.30.bino.sort > ${OUTPUT}.30.bino.sort.plot
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
33
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
34
3c05abb4452e add missing files
devteam@galaxyproject.org
parents:
diff changeset
35 echo "Job end on `hostname` at `date`"