Mercurial > repos > dereeper > sniplay
comparison VCF2Hapmap/vcf2FastaAndHapmap.sh @ 9:98c37a5d67f4 draft
Uploaded
author | dereeper |
---|---|
date | Wed, 07 Feb 2018 22:08:47 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
8:6bf69b40365c | 9:98c37a5d67f4 |
---|---|
1 #!/bin/bash | |
2 | |
3 tool_path=$(dirname $0) | |
4 | |
5 | |
6 | |
7 filein=$1 | |
8 fileout_label=$(date "+%Y%m%d%H%M%S") | |
9 fileout=$2 | |
10 option=$3 | |
11 | |
12 option_text='' | |
13 | |
14 | |
15 if [ "$option" != "none" ] | |
16 then fileout_seq=$4 | |
17 fileout_fa1=$5 | |
18 filefasta=$6 | |
19 if [ "$option" == "fasta_gff" ] | |
20 then filegff=$7 | |
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 |