From 8f719ab5ff65255170f17a163229ae52dd84ead7 Mon Sep 17 00:00:00 2001 From: Lukas Forer Date: Wed, 5 Sep 2018 15:45:47 +0200 Subject: [PATCH] Fix errors in write-ped - use correct prefix instead of creating out.ped - dereference `hevecs` array in order to join the PCs (now there is something like ARRAY(0x1234567) in out.ped) --- scripts/epacts-pca-plot | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/epacts-pca-plot b/scripts/epacts-pca-plot index 18f41eb..5f5ddec 100644 --- a/scripts/epacts-pca-plot +++ b/scripts/epacts-pca-plot @@ -120,7 +120,7 @@ if ( $writePed ) { } close EVECS; - open(OUT,">out.ped") || die "Cannot open $out.ped for writing\n"; + open(OUT,">$out.ped") || die "Cannot open $out.ped for writing\n"; while() { if ( /^#/ ) { chomp; @@ -138,7 +138,7 @@ if ( $writePed ) { print OUT $_; print OUT "\t"; - print OUT join("\t",$hevecs{$id}); + print OUT join("\t",@{$hevecs{$id}}); print OUT "\n"; } }