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

Uploaded
author dereeper
date Fri, 10 Jul 2015 04:39:30 -0400
parents
children 10627af23f10
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/VCF2Hapmap/vcf2FastaAndHapmap.sh	Fri Jul 10 04:39:30 2015 -0400
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+tool_path=$(dirname $0)
+
+
+
+filein=$1
+fileout_label=$2
+fileout=$3
+option=$4
+
+option_text=''
+
+
+if [ "$option" != "none" ]
+then fileout_seq=$5 
+	fileout_fa1=$6 
+	filefasta=$7
+	if [ "$option" == "fasta_gff" ]
+		then filegff=$8
+	fi
+fi
+
+if [ "$option" == "fasta" ]
+then option_text="--reference $filefasta"
+fi
+
+if [ "$option" == "fasta_gff" ]
+then option_text="--reference $filefasta --gff $filegff"
+fi
+
+
+perl $tool_path/VCF2FastaAndHapmap.pl --vcf $filein --out $fileout_label $option_text
+
+
+cp  $fileout_label.hapmap $fileout ; rm $fileout_label.hapmap
+
+if [ "$option" == "fasta_gff" ]
+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 ;
+fi
+
+if [ "$option" == "fasta" ]
+then cp  $fileout_label.flanking.txt $fileout_seq ; rm $fileout_label.flanking.txt ;
+fi
+