Mercurial > repos > dereeper > sniplay
diff GetHaplotypesFromPhasedVCF/GetHaplotypesFromPhasedVCF.pl @ 12:88748d846a20 draft
planemo upload commit 11382afe87364aaafb19973470d5066229a6e34f
author | dereeper |
---|---|
date | Tue, 14 Aug 2018 08:21:55 -0400 |
parents | ebb0ac9b6fa9 |
children |
line wrap: on
line diff
--- a/GetHaplotypesFromPhasedVCF/GetHaplotypesFromPhasedVCF.pl Fri Apr 20 09:04:25 2018 -0400 +++ b/GetHaplotypesFromPhasedVCF/GetHaplotypesFromPhasedVCF.pl Tue Aug 14 08:21:55 2018 -0400 @@ -7,6 +7,7 @@ open(O1,">$out.haplo.fas"); open(O2,">$out.distinct_haplotypes.txt"); +open(O3,">$out.distinct_haplotypes.fa"); my %indiv; my %genes; @@ -96,13 +97,15 @@ my $nb = $haplos{$gene}{$haplo}; my $ind = $haplotypes2{$gene}{$haplo}; print O2 $haplo_name.":$nb:".$haplotypes2{$gene}{$haplo}."\n".$haplo."\n"; - if ($nb > 1){ - #print "$nb \n"; + if ($nb >= 1){ + print O3 ">".$haplo_name."|$nb\n"; + print O3 $haplo."\n"; } } } close(O1); -close(O1); +close(O2); +close(O3); #print scalar keys(%haplos);