Mercurial > repos > iuc > gemini_comp_hets
comparison test-data/util/build-gemini-testdata.sh @ 4:62647e2637f6 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/gemini commit 283362494058ed64143b1f27afb447b8a1cb4313
author | iuc |
---|---|
date | Fri, 14 Dec 2018 12:49:22 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
3:7cf9bc210044 | 4:62647e2637f6 |
---|---|
1 cd "$(dirname "$0")" | |
2 | |
3 export GEMINI_CONFIG=../test-cache | |
4 OUT_PTH=$GEMINI_CONFIG/gemini/data | |
5 GENOMIC_REGION=3:187000000-187500000 | |
6 | |
7 | |
8 if [ -n "$1" ]; then | |
9 | |
10 IN_PTH="$1" | |
11 # downsample all vcf and bed annotation files to the region of interest and reindex | |
12 for vcf in `ls $IN_PTH/*.gz | grep -v hprd_interaction_edges.gz -` | |
13 do | |
14 python ./shrink_tabix.py $vcf -r $GENOMIC_REGION -o $OUT_PTH/`basename $vcf` | |
15 done | |
16 | |
17 # downsample gene_table files to the region of interest | |
18 echo "$IN_PTH/summary_gene_table_v75 -> $OUT_PTH/summary_gene_table_v75" | |
19 python ./shrink_simple_tab.py $IN_PTH/summary_gene_table_v75 -r chr$GENOMIC_REGION -c 0 8 9 -n 1 -o $OUT_PTH/summary_gene_table_v75 | |
20 | |
21 echo "$IN_PTH/detailed_gene_table_v75 -> $OUT_PTH/detailed_gene_table_v75" | |
22 python ./shrink_simple_tab.py $IN_PTH/detailed_gene_table_v75 -r chr$GENOMIC_REGION -c 0 11 12 -n 1 -o $OUT_PTH/detailed_gene_table_v75 | |
23 | |
24 # filter kegg_pathway files to retain only records of the genes listed | |
25 # in the downsampled summary_gene_table | |
26 for kegg in `ls $IN_PTH/kegg_pathways_*` | |
27 do | |
28 echo "$kegg -> $OUT_PTH/`basename $kegg`" | |
29 cut -f2 $OUT_PTH/summary_gene_table_v75 | grep -Fv None | grep -Fwf - $kegg > $OUT_PTH/`basename $kegg` | |
30 done | |
31 | |
32 # filter hprd_interaction file to retain only records of the genes listed | |
33 # in the downsampled summary_gene_table | |
34 echo "$IN_PTH/hprd_interaction_edges.gz -> $OUT_PTH/hprd_interaction_edges.gz" | |
35 bgzip -dc $IN_PTH/hprd_interaction_edges.gz > $OUT_PTH/hprd_interaction_edges | |
36 cut -f2 $OUT_PTH/summary_gene_table_v75 | grep -Fv None | grep -Ff - $OUT_PTH/hprd_interaction_edges | bgzip > $OUT_PTH/hprd_interaction_edges.gz | |
37 rm $OUT_PTH/hprd_interaction_edges | |
38 | |
39 # filter cancer_gene_census file to retain only records of the genes listed | |
40 # in the downsampled summary_gene_table; | |
41 # TO DO: make the filter stricter by looking for matches only in the first | |
42 # column of the cancer_gene_census file (but the file is relatively small anyway) | |
43 echo "$IN_PTH/cancer_gene_census.20140120.tsv -> $OUT_PTH/cancer_gene_census.20140120.tsv" | |
44 cut -f2 $OUT_PTH/summary_gene_table_v75 | grep -Fv None | grep -Fwf - $IN_PTH/cancer_gene_census.20140120.tsv > $OUT_PTH/cancer_gene_census.20140120.tsv | |
45 | |
46 else | |
47 echo "no path to gemini annotation files provided - only building test databases" | |
48 fi | |
49 | |
50 | |
51 # now use gemini load to build the test databases | |
52 echo "Building gemini test databases" | |
53 echo "Test databases for gemini_load" | |
54 gemini --annotation-dir $OUT_PTH load --skip-cadd --skip-gerp-bp -v build-data/gemini_load_input.vcf -t snpEff ../gemini_load_result1.db | |
55 gemini --annotation-dir $OUT_PTH load --skip-cadd --skip-gerp-bp -v build-data/gemini_load_input.vcf -t snpEff --skip-gene-tables --no-load-genotypes ../gemini_load_result2.db | |
56 echo "Test database for gemini_amend" | |
57 gemini --annotation-dir $OUT_PTH load --skip-cadd --skip-gerp-bp -v build-data/test.auto_rec.vcf -t snpEff ../gemini_amend_input.db | |
58 echo "Test database for gemini_annotate" | |
59 bgzip -c build-data anno.bed > build-data/anno.bed.gz | |
60 tabix --force -p bed build-data/anno.bed.gz | |
61 cp ../gemini_load_result1.db ../gemini_annotate_result.db | |
62 gemini --annotation-dir $OUT_PTH annotate -f build-data/anno.bed.gz -c anno5 -a count ../gemini_annotate_result.db | |
63 echo "Test database for gemini_set_somatic" | |
64 cp ../gemini_load_result1.db ../gemini_is_somatic_result.db | |
65 gemini set_somatic --min-somatic-score 5.65 ../gemini_is_somatic_result.db | |
66 echo "Test database for gemini_de_novo and gemini_mendel_errors" | |
67 gemini --annotation-dir $OUT_PTH load --skip-cadd --skip-gerp-bp -v build-data/test.de_novo.vcf -p build-data/test.de_novo.ped -t snpEff ../gemini_de_novo_input.db | |
68 echo "Test database for gemini_comp_hets" | |
69 gemini --annotation-dir $OUT_PTH load --skip-cadd --skip-gerp-bp -v build-data/test.comp_het.vcf -p build-data/test.comp_het.ped -t snpEff ../gemini_comphets_input.db | |
70 echo "Test databases for gemini_autosomal" | |
71 gemini --annotation-dir $OUT_PTH load --skip-cadd --skip-gerp-bp -v build-data/test.auto_rec.vcf -p build-data/test.auto_rec.ped -t snpEff ../gemini_auto_rec_input.db | |
72 gemini --annotation-dir $OUT_PTH load --skip-cadd --skip-gerp-bp -v build-data/test.auto_dom.vcf -p build-data/test.auto_dom.ped -t snpEff ../gemini_auto_dom_input.db |