|
From: <jas...@us...> - 2003-04-07 19:07:37
|
Update of /cvsroot/genex/genex-server/DB/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv19032
Modified Files:
fix-array-mas5.pl
Log Message:
* DB/scripts/fix-array-mas5.pl (Repository):
Added the ability to handle short MAS5 files
Index: fix-array-mas5.pl
===================================================================
RCS file: /cvsroot/genex/genex-server/DB/scripts/fix-array-mas5.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fix-array-mas5.pl 17 Dec 2002 19:55:54 -0000 1.1
--- fix-array-mas5.pl 7 Apr 2003 19:07:31 -0000 1.2
***************
*** 7,10 ****
--- 7,11 ----
my $rc = GetOptions(\%OPTIONS,
'infile=s',
+ 'short',
'design=s',
'help',
***************
*** 18,21 ****
--- 19,23 ----
optional flags:
+ --short : MAS5 short files
--help : print this message
EOU
***************
*** 38,41 ****
--- 40,44 ----
print DESIGN "# id\tname\n";
+ # These are the long MAS5 files
# 0) Line Num
***************
*** 78,96 ****
# 37) Sort Score
# all we need are:
! # 0) Line Num
! # 2) Probe Set Name
my @INDICES = qw(0 2);
my $in_data;
- my $data_start_regexp = qr/^Expression\s+Analysis/o;
my $reading_data;
! my $reading_data_regexp = qr/^\tAnalysis/;
my @spots;
my $count = 0;
my %REPS;
my %IDS;
while (<IN>) {
# see if we've found the Data section already
--- 81,120 ----
# 37) Sort Score
+ # the short files are
+
+ # 0) Probe Set Name
+ # 1) Signal
+ # 2) Detection
+ # 3) Detection p-value
+ # 4) Descriptions
+
# all we need are:
! # Line Num
! # Probe Set Name
!
! # the long files have all we need, for the short files we need to
! # create the line number
!
my @INDICES = qw(0 2);
+ my $data_start_regexp = qr/^Expression\s+Analysis/o;
+ my $reading_data_regexp = qr/^\tAnalysis/;
my $in_data;
my $reading_data;
!
! if (exists $OPTIONS{short}) {
! @INDICES = qw(0 0);
! $data_start_regexp = qr/^\s+/;
! $reading_data = 1;
! }
!
my @spots;
my $count = 0;
my %REPS;
my %IDS;
+
+
while (<IN>) {
# see if we've found the Data section already
***************
*** 109,115 ****
# check if this is the header line of the Data section
! if (/$reading_data_regexp/) {
! $reading_data = 1;
! next;
}
--- 133,141 ----
# check if this is the header line of the Data section
! unless (exists $OPTIONS{short}) {
! if (/$reading_data_regexp/) {
! $reading_data = 1;
! next;
! }
}
***************
*** 117,122 ****
--- 143,152 ----
last if /^End/;
+ $count++;
my @data = split /\t/;
my ($num,$name) = @data[@INDICES];
+
+ # we create the line number for short files
+ $num = $count if exists $OPTIONS{short};
# commence error checking
|