comparison VCF2Hapmap/vcf2FastaAndHapmap.sh @ 1:420b57c3c185 draft

Uploaded
author dereeper
date Fri, 10 Jul 2015 04:39:30 -0400
parents
children 10627af23f10
comparison
equal deleted inserted replaced
0:3e19d0dfcf3e 1:420b57c3c185
1 #!/bin/bash
2
3 tool_path=$(dirname $0)
4
5
6
7 filein=$1
8 fileout_label=$2
9 fileout=$3
10 option=$4
11
12 option_text=''
13
14
15 if [ "$option" != "none" ]
16 then fileout_seq=$5
17 fileout_fa1=$6
18 filefasta=$7
19 if [ "$option" == "fasta_gff" ]
20 then filegff=$8
21 fi
22 fi
23
24 if [ "$option" == "fasta" ]
25 then option_text="--reference $filefasta"
26 fi
27
28 if [ "$option" == "fasta_gff" ]
29 then option_text="--reference $filefasta --gff $filegff"
30 fi
31
32
33 perl $tool_path/VCF2FastaAndHapmap.pl --vcf $filein --out $fileout_label $option_text
34
35
36 cp $fileout_label.hapmap $fileout ; rm $fileout_label.hapmap
37
38 if [ "$option" == "fasta_gff" ]
39 then cp $fileout_label.flanking.txt $fileout_seq ; rm $fileout_label.flanking.txt ; cp $fileout_label.gene_alignment.fas $fileout_fa1 ; rm $fileout_label.gene_alignment.fas ;
40 fi
41
42 if [ "$option" == "fasta" ]
43 then cp $fileout_label.flanking.txt $fileout_seq ; rm $fileout_label.flanking.txt ;
44 fi
45