#!/usr/bin/perl
#program to read in a list of ID's
#and output to a 96 well plate format
#for upload into a database
#
# IMH 15 June 2000
#
$geneidlist=
"genenames";
open (GENELIST,
$geneidlist);
while (<GENELIST>)
{
chop;
#write new header every 96 lines
if (($.-
1)/
96 ==
int $. /
96) {&writeheadder;
}
#number of well within plate modulus 96
$plateseq =
(($.-
1 )%
96)+
1;
$column =
(($plateseq -
1) %
12)+
1;
$row =
int(($plateseq -
1) /
12)+
1;
# Row letter is ASCII A (65) ie 1 less than A + rownumber
$alphanum =
chr ($row+
64);
print "$alphanum\t$column\t";
print "$_\tSomething\n";
}
close (GENELIST
);
exit;
#******** Write plate headder *********
sub writeheadder
{
$plate =
int ($. /
96)+
1;
print "\n\n\nplate\n$plate \n\n\nplatewell\n";
}
Page was generated in 0.0700 seconds