Add getPosWiseW2VCollocators -> json to API

Resolves #8

Change-Id: Id1eca2896fadc59bebb2786e45fd8a6b3efdca6c
diff --git a/script/derekovecs-server b/script/derekovecs-server
index 3811858..1930381 100755
--- a/script/derekovecs-server
+++ b/script/derekovecs-server
@@ -208,20 +208,24 @@
 
 any '*/getPosWiseW2VCollocators' => sub {
   my $self = shift;
-  $self->render(data => getPosWiseW2VCollocatorsAsTsv($self->param("w"),
+  my $format = $self->param("format") || 'json';
+  $self->render(data => getPosWiseW2VCollocators($self->param("w"),
                                             ($self->param("max")? $self->param("max") : 200),
                                             ($self->param("cutoff")? $self->param("cutoff") :750000),
-                                            ($self->param("threshold")? $self->param("threshold") : 0.2)),
-                                            format=>'tsv');
+                                            ($self->param("threshold")? $self->param("threshold") : 0.2),
+                                            $format),
+                                            format=>$format);
 };
 
 any '/getPosWiseW2VCollocators' => sub {
   my $self = shift;
-  $self->render(data => getPosWiseW2VCollocatorsAsTsv($self->param("w"), 
+  my $format = $self->param("format") || 'json';
+  $self->render(data => getPosWiseW2VCollocators($self->param("w"),
                                             ($self->param("max")? $self->param("max") : 200),
                                             ($self->param("cutoff")? $self->param("cutoff") : 750000),
-                                            ($self->param("threshold")? $self->param("threshold") : 0.2)),
-                                            format=>'tsv');
+                                            ($self->param("threshold")? $self->param("threshold") : 0.2),
+                                            $format),
+                                            format=>$format);
 };
 
 any '*/getSimilarProfiles' => sub {