diff --git a/multi_seqdoc.pl b/multi_seqdoc.pl
index 47e54ad..158e90f 100644
--- a/multi_seqdoc.pl
+++ b/multi_seqdoc.pl
@@ -84,21 +84,25 @@ =head1 COPYRIGHT
=cut
-
-
-
use strict;
#use warnings;
use CGI;
use ABI;
use GD::Graph::lines;
+use GD::Image;
+use GD::Image::Orientation;
+#use Data::Dump
my $cgi = new CGI;
+#print "Content-type: text/html\n\n";
+
# Create a list of the four channels to save on having to keep retyping them
# in loops
-our @trace_list = qw( a_trace g_trace c_trace t_trace );
-our $temp_dir = '/usr/local/apache/htdocs/Temp/';
+our @trace_list = qw( a_trace g_trace c_trace t_trace); #tr_bases
+our @pos_trace_list = qw( a_trace g_trace c_trace t_trace base_pos);
+#our @seq_list = qw( seq );
+our $temp_dir = '/var/www/temp/';
# Get input data parameters from the web page
# Can be up to 10 input sequences (numbered 0 to 9)
@@ -143,7 +147,8 @@ =head1 COPYRIGHT
# By passing a hash reference, the changes made in the subroutine will act on
# the original hash (which is what we want in this case)
normalize($ref_data);
-
+my $ref_sequence = $ref_data->{sequence};
+my $ref_bps = $ref_data->{base_pos};
# Extract the data from the test chromatogram files. Get it as an array of hash references
my @test_data;
@@ -175,10 +180,16 @@ =head1 COPYRIGHT
# Finally generate output images - need to create temporary files, as can't
# include image data directly in html
# Pass details about image size and scale to the subroutine, also output file
-my $ref_image = get_image($ref_data, 0, 2000, 200, $temp_dir.$$."ref_image.png", $align_length, 1);
+my @retstring = ();
+my $ref_image = get_image($ref_data, 0, 2000, 200, $temp_dir.$$."ref_image.png", $align_length, 1, $ref_data);
+my $nll = rot_image($temp_dir.$$."ref_image");
+
for (0..$testcount) {
- my $test_image = get_image($test_data[$_], 0, 2000, 200, $temp_dir.$$."test_image".$_.".png", $align_length, 1 );
- my $diff_image = get_image($differences[$_], -500, 500, 300, $temp_dir.$$."diff_image".$_.".png", $align_length, 0);
+ my $test_image = get_image($test_data[$_], 0, 2000, 200, $temp_dir.$$."test_image".$_.".png", $align_length, 1, $ref_data );
+ my $diff_image = get_image($differences[$_], -500, 500, 300, $temp_dir.$$."diff_image".$_.".png", $align_length, 0, $ref_data);
+ $retstring[$_] = $diff_image;
+ $nll = rot_image($temp_dir.$$."test_image".$_);
+ $nll = rot_image($temp_dir.$$."diff_image".$_);
}
# Print out page
@@ -190,18 +201,37 @@ =head1 COPYRIGHT
print "Reference sequence";
if ($ref_data->{name}) {print " - ".$ref_data->{name}."
"}
else {print " - ".$ref_seq."
"}
- print "
\n";
- print "
\n";
+ print "
\n";
+ print "Reference sequence call: ".$ref_sequence."
\n";
+ print "
\n";
+ print "Dif sequence call: ".$retstring[$_]."
\n";
print "Test sequence ".($_ + 1);
if ($test_data[$_]{name}) {print " - ".$test_data[$_]{name}."
"}
else {print " - ".$test_seqs[$_]."
"}
- print "
\n";
+ print "
\n";
+ print "Test sequence call: ".$test_data[$_]{sequence}."
\n";
+
+ print "\n";
+ print "\n";
+ print "\n";
+
}
print "