You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(267) |
Nov
(344) |
Dec
(119) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(23) |
Feb
(15) |
Mar
(16) |
Apr
(388) |
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
(4) |
Oct
|
Nov
|
Dec
|
|
From: <jas...@us...> - 2003-04-09 21:36:02
|
Update of /cvsroot/genex/genex-server/Genex/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv22637
Modified Files:
user-insert.pl.in
Log Message:
properly ignores 'user already exists' errors from Pg
Index: user-insert.pl.in
===================================================================
RCS file: /cvsroot/genex/genex-server/Genex/scripts/user-insert.pl.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** user-insert.pl.in 9 Apr 2003 21:31:44 -0000 1.5
--- user-insert.pl.in 9 Apr 2003 21:35:59 -0000 1.6
***************
*** 119,123 ****
# if the user already exists in Postgres, we still want to set
# permissions for this DB
! unless ($dbh->err =~ /already exists/) {
$dbh->error(@error_args,
sql=>$sql,
--- 119,123 ----
# if the user already exists in Postgres, we still want to set
# permissions for this DB
! unless ($dbh->errstr =~ /already exists/) {
$dbh->error(@error_args,
sql=>$sql,
|
|
From: <jas...@us...> - 2003-04-09 21:31:47
|
Update of /cvsroot/genex/genex-server/Genex/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv20935
Modified Files:
user-insert.pl.in
Log Message:
* scripts/user-insert.pl.in (Repository):
now ignores 'user already exists' errors from Pg
Index: user-insert.pl.in
===================================================================
RCS file: /cvsroot/genex/genex-server/Genex/scripts/user-insert.pl.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** user-insert.pl.in 8 Nov 2002 13:34:07 -0000 1.4
--- user-insert.pl.in 9 Apr 2003 21:31:44 -0000 1.5
***************
*** 116,123 ****
my $sql = "CREATE USER $OPTIONS{new_user} WITH PASSWORD '$OPTIONS{new_pass}' NOCREATEDB NOCREATEUSER";
$dbh->do($sql);
! $dbh->error(@error_args,
! sql=>$sql,
! message=>"Couldn't create user",
! ) if $dbh->err;
my ($pub_group) = Bio::Genex::GroupSec->get_objects($dbh,
--- 116,129 ----
my $sql = "CREATE USER $OPTIONS{new_user} WITH PASSWORD '$OPTIONS{new_pass}' NOCREATEDB NOCREATEUSER";
$dbh->do($sql);
! if ($dbh->err) {
! # if the user already exists in Postgres, we still want to set
! # permissions for this DB
! unless ($dbh->err =~ /already exists/) {
! $dbh->error(@error_args,
! sql=>$sql,
! message=>"Couldn't create user",
! );
! }
! }
my ($pub_group) = Bio::Genex::GroupSec->get_objects($dbh,
|
|
From: <jas...@us...> - 2003-04-09 20:43:00
|
Update of /cvsroot/genex/genex-server/Genex In directory sc8-pr-cvs1:/tmp/cvs-serv31449/Genex Modified Files: ChangeLog TODO Log Message: new Index: ChangeLog =================================================================== RCS file: /cvsroot/genex/genex-server/Genex/ChangeLog,v retrieving revision 1.128 retrieving revision 1.129 diff -C2 -d -r1.128 -r1.129 *** ChangeLog 12 Jan 2003 19:50:33 -0000 1.128 --- ChangeLog 9 Apr 2003 20:42:51 -0000 1.129 *************** *** 1,6 **** --- 1,31 ---- + 2003-04-09 Jason E. Stewart <ja...@op...> + + * scripts/mbad-insert.pl.in (Repository): + the loader will begin reading data after the first data regex if + the second is not defined + + 2003-04-08 Jason E. Stewart <ja...@op...> + + * scripts/array-design-insert.pl.in (Repository): + fixed call to insert_matrix() which returns an array ref and not + an array + + 2003-04-04 Jason E. Stewart <ja...@op...> + + * scripts/array-design-insert.pl.in (Repository): + adding ability to insert Affy designs in chunks + added --no_fr_maps + 2003-01-12 Jason E. Stewart <ja...@op...> + * scripts/xml2sql.pl.in (Repository): + * scripts/create_genex_db.pl.in (Repository): + * scripts/create_genex_class.pl.in (Repository): + * scripts/array-design-insert.pl.in (Repository): + updated for XML::Xerces 2.0+ + * XMLUtils/XMLUtils.pm.in (Repository): removed references to AM_Spots + updated for XML::Xerces 2.0+ 2003-01-11 Jason E. Stewart <ja...@op...> Index: TODO =================================================================== RCS file: /cvsroot/genex/genex-server/Genex/TODO,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** TODO 15 Oct 2002 14:57:43 -0000 1.42 --- TODO 9 Apr 2003 20:42:53 -0000 1.43 *************** *** 1,2 **** --- 1,5 ---- + Tue Apr 8 21:46:48 MDT 2003 + * have insert_matrix() return and array of pkey values + Tue Oct 15 00:03:54 MDT 2002 * fix inheritance bug where fkeys not getting created (ro_groupname in |
|
From: <jas...@us...> - 2003-04-09 20:42:31
|
Update of /cvsroot/genex/genex-server/Mason/workspace
In directory sc8-pr-cvs1:/tmp/cvs-serv31255/Mason/workspace
Modified Files:
group-maint.html.in
Log Message:
typo
Index: group-maint.html.in
===================================================================
RCS file: /cvsroot/genex/genex-server/Mason/workspace/group-maint.html.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** group-maint.html.in 7 Apr 2003 16:45:59 -0000 1.3
--- group-maint.html.in 9 Apr 2003 20:42:26 -0000 1.4
***************
*** 29,33 ****
% } else { # session is initialized
<center>
! <h1>Group Member Assicoation Modification</h1>
<form action="<% $action %>"><br></br>
<input type="hidden" name="groupname" value="<% $groupname %>"></input>
--- 29,33 ----
% } else { # session is initialized
<center>
! <h1>Group Member Association Modification</h1>
<form action="<% $action %>"><br></br>
<input type="hidden" name="groupname" value="<% $groupname %>"></input>
|
|
From: <jas...@us...> - 2003-04-09 20:42:00
|
Update of /cvsroot/genex/genex-server
In directory sc8-pr-cvs1:/tmp/cvs-serv30914
Modified Files:
ChangeLog TODO
Log Message:
new
Index: ChangeLog
===================================================================
RCS file: /cvsroot/genex/genex-server/ChangeLog,v
retrieving revision 1.122
retrieving revision 1.123
diff -C2 -d -r1.122 -r1.123
*** ChangeLog 13 Feb 2003 20:47:15 -0000 1.122
--- ChangeLog 9 Apr 2003 20:41:54 -0000 1.123
***************
*** 1,2 ****
--- 1,24 ----
+ 2003-04-09 Jason E. Stewart <ja...@op...>
+
+ * INSTALL (Repository):
+ updated some xerces info
+
+ * Configure (Repository):
+ ensured that everything was based off GENEX_DIR
+
+ 2003-04-07 Jason E. Stewart <ja...@op...>
+
+ * DB/scripts/fix-array-mas5.pl (Repository):
+ Added the ability to handle short MAS5 files
+
+ * Mason/workspace/group-maint.html.in (Repository):
+ mis-spelled URL
+
+ 2003-04-02 Jason E. Stewart <ja...@op...>
+
+ * DB/scripts/fix-array-cel.pl (Repository):
+ added the correct end of data marker
+ fixed whitespace issue
+
2003-02-13 Harry Mangalam <hj...@ta...>
* added or modified following documentation files:
Index: TODO
===================================================================
RCS file: /cvsroot/genex/genex-server/TODO,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** TODO 20 Oct 2002 15:04:13 -0000 1.20
--- TODO 9 Apr 2003 20:41:55 -0000 1.21
***************
*** 1,4 ****
--- 1,10 ----
TODO
=======
+ Mon Apr 7 10:20:59 MDT 2003
+ * why is quantitationdimension and quantitationdimension_view in the
+ DB?
+ * add return to index to all mason apps
+ * need to quote groupname in 'create-experiment.html'
+
Thu Oct 17 13:41:31 MDT 2002
* Where to meet
|
|
From: <jas...@us...> - 2003-04-09 20:41:35
|
Update of /cvsroot/genex/genex-server
In directory sc8-pr-cvs1:/tmp/cvs-serv30681
Modified Files:
INSTALL
Log Message:
* INSTALL (Repository):
updated some xerces info
Index: INSTALL
===================================================================
RCS file: /cvsroot/genex/genex-server/INSTALL,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** INSTALL 7 Mar 2003 01:48:57 -0000 1.27
--- INSTALL 9 Apr 2003 20:41:29 -0000 1.28
***************
*** 220,251 ****
-- Modules with known problems (see below) --
- DBD::Pg - for the Postgres installation - you only need to install
- this manually if you did not install 'libdbd-pg-perl' via
- the Debian package method above.
XML::Xerces - used by the GeneXML utils.
Bio::MAGE - used for importing and exporting MAGE-ML; may have to
download it manually if CPAN refuses to acknowledge its
existance... try:
! http://search.cpan.org/CPAN/authors/id/J/JA/JASONS/Bio-MAGE-2002-09-02_0.tar.gz
Known Problems using CPAN to install these modules
--------------------------------------------------
- * DBD::Pg: (Again, only if installing manually)
- Before running CPAN, you must set two environment
- variables (POSTGRES_INCLUDE and POSTGRES_LIB), or the build will
- fail. When running 'install DBD::Pg', make test will fail if
- root is not a registered user of the DB. So you should run
- 'force install DBD::Pg'.
- For the RedHat RPMs mentioned above, Ron Ophir mentioned that
- POSTGRES_LIB = /usr/lib
- was required but setting POSTGRES_INCLUDE wasn't required (YMMV)
-
* XML::Xerces: you cannot ask CPAN to install this module. If you cannot
use Diane's debs (see above), do the following:
! 1) download version 1.7 of the Xerces-C C++ library from Apache:
! http://xml.apache.org/dist/xerces-c/stable/archives/Xerces-C_1_7_0/
use either the binary for your platform, or get the source
--- 220,243 ----
-- Modules with known problems (see below) --
XML::Xerces - used by the GeneXML utils.
Bio::MAGE - used for importing and exporting MAGE-ML; may have to
download it manually if CPAN refuses to acknowledge its
existance... try:
!
! http://search.cpan.org/CPAN/authors/id/J/JA/JASONS/Bio-MAGE-20020902.3.tar.gz
!
! or:
!
! http://prdownloads.sourceforge.net/mged/Bio-MAGE-20020902.4.tar.gz?download
Known Problems using CPAN to install these modules
--------------------------------------------------
* XML::Xerces: you cannot ask CPAN to install this module. If you cannot
use Diane's debs (see above), do the following:
! 1) download version 2.0 of the Xerces-C C++ library from Apache:
! http://xml.apache.org/dist/xerces-c/stable/
use either the binary for your platform, or get the source
***************
*** 254,258 ****
http://xml.apache.org/xerces-c/build-winunix.html#UNIX
! 2) download version 1.7.0 of XML::Xerces from Apache:
http://xml.apache.org/dist/xerces-p/stable/
--- 246,250 ----
http://xml.apache.org/xerces-c/build-winunix.html#UNIX
! 2) download version 2.0.0 of XML::Xerces from Apache:
http://xml.apache.org/dist/xerces-p/stable/
|
|
From: <jas...@us...> - 2003-04-09 20:40:16
|
Update of /cvsroot/genex/genex-server
In directory sc8-pr-cvs1:/tmp/cvs-serv30022
Modified Files:
Configure
Log Message:
* Configure (Repository):
ensured that everything was based off GENEX_DIR
Index: Configure
===================================================================
RCS file: /cvsroot/genex/genex-server/Configure,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** Configure 12 Jan 2003 19:54:29 -0000 1.14
--- Configure 9 Apr 2003 20:40:09 -0000 1.15
***************
*** 218,223 ****
}
}
! $LOCAL_ROOT_DEF = '/usr/local/genex' unless defined $LOCAL_ROOT;
! $DB_NAME_DEF = 'genex' unless defined $DB_NAME;
$SYSTMP_DEF = '/tmp' unless defined $SYSTMP;
--- 218,223 ----
}
}
! $LOCAL_ROOT_DEF = "/usr/local/$GENEX_DIR" unless defined $LOCAL_ROOT;
! $DB_NAME_DEF = "$GENEX_DIR" unless defined $DB_NAME;
$SYSTMP_DEF = '/tmp' unless defined $SYSTMP;
***************
*** 587,595 ****
$tmp =~ s/\s//g;
$SYSTMP = check_dir($tmp,$tmps[0],my $no_make=1);
! $SYSTMP .= '/genex';
last TMP;
} elsif ($tmp > 0 && $tmp <= scalar @tmps) {
$SYSTMP = check_dir($tmps[$tmp-1],$tmps[0],my $no_make=1);
! $SYSTMP .= '/genex';
last TMP;
} else {
--- 587,595 ----
$tmp =~ s/\s//g;
$SYSTMP = check_dir($tmp,$tmps[0],my $no_make=1);
! $SYSTMP .= "/$GENEX_DIR";
last TMP;
} elsif ($tmp > 0 && $tmp <= scalar @tmps) {
$SYSTMP = check_dir($tmps[$tmp-1],$tmps[0],my $no_make=1);
! $SYSTMP .= "/$GENEX_DIR";
last TMP;
} else {
***************
*** 927,931 ****
if (!defined $CGITMPURL || !defined $HTMLTMPDIR) {
$HTMLTMPDIR = "$GENEX_HTMLDIR/tmp";
! $CGITMPURL = "$HTML_ROOT_URL/genex/tmp";
$VARS{HTMLTMPDIR} = $HTMLTMPDIR;
$VARS{CGITMPURL} = $CGITMPURL;
--- 927,931 ----
if (!defined $CGITMPURL || !defined $HTMLTMPDIR) {
$HTMLTMPDIR = "$GENEX_HTMLDIR/tmp";
! $CGITMPURL = "$HTML_ROOT_URL/$GENEX_DIR/tmp";
$VARS{HTMLTMPDIR} = $HTMLTMPDIR;
$VARS{CGITMPURL} = $CGITMPURL;
|
|
From: <jas...@us...> - 2003-04-09 19:51:24
|
Update of /cvsroot/genex/genex-server/Genex/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv8620
Modified Files:
mbad-insert.pl.in
Log Message:
* scripts/mbad-insert.pl.in (Repository):
the loader will begin reading data after the first data regex if
the second is not defined
Index: mbad-insert.pl.in
===================================================================
RCS file: /cvsroot/genex/genex-server/Genex/scripts/mbad-insert.pl.in,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** mbad-insert.pl.in 11 Jan 2003 21:07:28 -0000 1.10
--- mbad-insert.pl.in 9 Apr 2003 19:51:20 -0000 1.11
***************
*** 203,213 ****
$data_start_regex1 = qr/$data_start_regex1/o;
my $data_start_regex2 = $fe_sw_db->data_start_regex2();
! $dbh->error(@error_args,
! message=>"Couldn't find data_start_regex2 for Feature Extraction Software: " . $fe_sw_db->name() . ':' . $fe_sw_db->version()
! )
! unless defined $data_start_regex2;
! $data_start_regex2 = qr/$data_start_regex2/o;
my $end_regex = $fe_sw_db->data_end_regex();
--- 203,217 ----
$data_start_regex1 = qr/$data_start_regex1/o;
+ my $reading_data;
my $data_start_regex2 = $fe_sw_db->data_start_regex2();
! if ($data_start_regex2) {
! $data_start_regex2 = qr/$data_start_regex2/o;
! } else {
! # if the second regex does not exist, it indicates that
! # we should start after the first, so we set the $reading_data
! # flag to true immediately
+ $reading_data = 1;
+ }
my $end_regex = $fe_sw_db->data_end_regex();
***************
*** 219,223 ****
my $in_data;
- my $reading_data;
my $count;
--- 223,226 ----
***************
*** 264,268 ****
# check if this is the header line of the Data section
! if (/$data_start_regex2/) {
$reading_data = 1;
next;
--- 267,273 ----
# check if this is the header line of the Data section
! # some programs don't need this regex, so we check
! # first to see whether it is defined
! if ($data_start_regex2 and /$data_start_regex2/) {
$reading_data = 1;
next;
|
|
From: <jas...@us...> - 2003-04-09 02:53:10
|
Update of /cvsroot/genex/genex-server/Genex/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv31043
Modified Files:
array-design-insert.pl.in
Log Message:
* scripts/array-design-insert.pl.in (Repository):
fixed call to insert_matrix() which returns an array ref and not
an array
Index: array-design-insert.pl.in
===================================================================
RCS file: /cvsroot/genex/genex-server/Genex/scripts/array-design-insert.pl.in,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** array-design-insert.pl.in 5 Apr 2003 04:02:04 -0000 1.17
--- array-design-insert.pl.in 9 Apr 2003 02:53:06 -0000 1.18
***************
*** 197,202 ****
matrix=>\@matrix);
} else {
! $REPORTERS{@names} = Bio::Genex::Reporter->insert_matrix(dbh=>$dbh,
! matrix=>\@matrix);
}
}
--- 197,203 ----
matrix=>\@matrix);
} else {
! my $ref = Bio::Genex::Reporter->insert_matrix(dbh=>$dbh,
! matrix=>\@matrix);
! $REPORTERS{@names} = @{$ref};
}
}
|
|
From: <jas...@us...> - 2003-04-08 20:21:55
|
Update of /cvsroot/genex/genex-server/rcluster-1.0/lib/r
In directory sc8-pr-cvs1:/tmp/cvs-serv16754
Modified Files:
ChangeLog permcluster.r
Log Message:
* permcluster.r (Repository):
Added new version from kschlauch
Index: ChangeLog
===================================================================
RCS file: /cvsroot/genex/genex-server/rcluster-1.0/lib/r/ChangeLog,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ChangeLog 18 Nov 2002 04:42:58 -0000 1.1
--- ChangeLog 8 Apr 2003 20:21:44 -0000 1.2
***************
*** 1,2 ****
--- 1,7 ----
+ 2003-04-08 Jason E. Stewart <ja...@op...>
+
+ * permcluster.r (Repository):
+ Added new version from kschlauch
+
2002-11-17 Harry Mangalam <hj...@ta...>
* committed Karen's changes to permcluster.r
Index: permcluster.r
===================================================================
RCS file: /cvsroot/genex/genex-server/rcluster-1.0/lib/r/permcluster.r,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** permcluster.r 18 Nov 2002 04:42:58 -0000 1.5
--- permcluster.r 8 Apr 2003 20:21:45 -0000 1.6
***************
*** 1,14 ****
! #All rights reserved #
!
! ##########################################
! ## Main program call
! ## This program does a breadth-first search of the clustering tree generated by Murtagh's
! ## hclust procedure to store the clusters for use of the permutation routine called in index.
! ## INPUT: data.txt is the user's tab-delimited "txt" data file
! ## dist.method is the user-defined distance method
! ## stop.level is the user-defined level at which the clustering should stop
! ## OUTPUT: Two files written to the user directory in "txt" format
! ## as "User.Data" and "Graph.Data".
! #######################################################################################
perm.program<-function(data.txt,log.flag,dist.method,agglom.method,stop.level,num.perms,thresh)
{options(digits=10)
--- 1,19 ----
! ###############################################################
! ## Copyright 2000-2003 ##
! ## National Center for Genome Resources ##
! ## George Mason University ##
! ## All rights reserved ##
! ## permcluster.2003.r, written by Karen Schlauch ##
! ###############################################################
! ################################################################################################
! ## Main program call ##
! ## This program does a breadth-first search of the clustering tree generated by Murtagh's ##
! ## hclust procedure to store the clusters for use of the permutation routine called in index. ##
! ## INPUT: data.txt is the user's tab-delimited "txt" data file ##
! ## dist.method is the user-defined distance method ##
! ## stop.level is the user-defined level at which the clustering should stop ##
! ## OUTPUT: Two files written to the user directory in "txt" format ##
! ## as "User.Data" and "Graph.Data". ##
! ################################################################################################
perm.program<-function(data.txt,log.flag,dist.method,agglom.method,stop.level,num.perms,thresh)
{options(digits=10)
***************
*** 22,43 ****
stuff<-index(data.file,gene.names,dist.method,agglom.method,stop.level,num.perms,thresh)
return(stuff)}
!
! #############################################################################################
! ## The scan.data function reads in tab-delimited "txt" file,
! ## which is in the following form:
! ##
! ## genename ratio1 ratio2 ratio3 ratio4 ....
! ## gene1 .1 .2 .3 .4
! ##
! ## Only the FIRST row should contain column labels or other text. The program
! ## thus skips only the FIRST row, regardless of what it contains. To change this,
! ## simply change the "skip" variable which is now set to 1.
! ## INPUT: data.txt is the user's tab-delimited "txt" data file
! ## OUTPUT: Data: the data file in matrix form with the gene name replaced by gene number,
! ## where the gene number is the position of the gene in the data file
! ## num.exp: the number of experiments (or replicates) of the data file
! ## num.genes: the number of genes in the data file
! ## gene.names: a vector of the gene names in the data file
! #############################################################################################
scan.data<-function(data.txt,log.flag)
{num.exp<-length(scan(data.txt,sep="\t",what="",skip=2,nlines=1))-1
--- 27,47 ----
stuff<-index(data.file,gene.names,dist.method,agglom.method,stop.level,num.perms,thresh)
return(stuff)}
! ###############################################################################################
! ## The scan.data function reads in tab-delimited "txt" file, ##
! ## which is in the following form: ##
! ## ##
! ## genename ratio1 ratio2 ratio3 ratio4 .... ##
! ## gene1 .1 .2 .3 .4 ##
! ## ##
! ## Only the FIRST row should contain column labels or other text. The program ##
! ## thus skips only the FIRST row, regardless of what it contains. To change this, ##
! ## simply change the "skip" variable which is now set to 1. ##
! ## INPUT: data.txt is the user's tab-delimited "txt" data file ##
! ## OUTPUT: Data: the data file in matrix form with the gene name replaced by gene number, ##
! ## where the gene number is the position of the gene in the data file ##
! ## num.exp: the number of experiments (or replicates) of the data file ##
! ## num.genes: the number of genes in the data file ##
! ## gene.names: a vector of the gene names in the data file ##
! ###############################################################################################
scan.data<-function(data.txt,log.flag)
{num.exp<-length(scan(data.txt,sep="\t",what="",skip=2,nlines=1))-1
***************
*** 56,94 ****
if(log.flag=="F") return(Data,num.exp,num.genes,gene.names)}
! ##############################################################################
! ## The get.clust.list function first calls the hclust function to generate the
! ## clustering info and clustering tree.
! ## The clustering info given by the hclust function is parsed.
! ## The first loop counts the total number of clusters, the second loop stores
! ## necessary information to build the View.Matrix in the following function.
! ## (See details below in comments)
! ## INPUT: data.file: the data file output of scan.data
! ## dist.method: the user-defined distance method
! ## OUTPUT: View.Matrix: a somewhat empty shell of View.Matrix to be completed
! ## in the index function here it contains the gene
! ## expression profiles and gene numbers of each cluster
! ## and the cluster dimension
! ## I.list: a list storing indeces of the clusters of View.Matrix, height, dimension
! ## m: the merge matrix produced by the hclust function
! ## d: the number of rows of the merge matrix
! ## num.exp: the number of experiments
! ## dim.sum: the sum of the dimensions of all clusters
! ## Left: the Left child of the cluster being considered
! ## Right: the right child of the cluster being considered
! ## Orig: the cluster being considered
! ## num.clusters:the number of total clusters considered
! #####################################################################
get.clust.list<- function(data.file,dist.method,agglom.method)
{library(mva)
num.exp<-dim(data.file)[2]-1
!
! if((dist.method =="cos") || (dist.method=="pcos") || (dist.method=="cor") || (dist.method=="eucna"))
dist.matrix<-other.dist.metrics(data.file,dist.method)$A
! if((dist.method !="cos") && (dist.method!="pcos") && (dist.method!="cor") && (dist.method!="eucna"))
dist.matrix<-dist(data.file[,2:(num.exp+1)],method=dist.method)
clust.info <- hclust(dist.matrix,agglom.method)
-
m <- clust.info$merge
h <- clust.info$height
--- 60,100 ----
if(log.flag=="F") return(Data,num.exp,num.genes,gene.names)}
! #################################################################################################
! ## The get.clust.list function first calls the hclust function to generate the ##
! ## clustering info and clustering tree. ##
! ## The clustering info given by the hclust function is parsed. ##
! ## The first loop counts the total number of clusters, the second loop stores ##
! ## necessary information to build the View.Matrix in the following function. ##
! ## (See details below in comments) ##
! ## INPUT: data.file: the data file output of scan.data ##
! ## dist.method: the user-defined distance method ##
! ## "euc": euclidean distance, in which NA's are excluded and no scaling occurs ##
! ## "cor": correlation coefficient ##
! ## "cos": cosine of the angle between two gene profile vectors ##
! ## "pcos": Munneke's penalized cosine distance metric
! ## OUTPUT: View.Matrix: a somewhat empty shell of View.Matrix to be completed ##
! ## in the index function here it contains the gene ##
! ## expression profiles and gene numbers of each cluster ##
! ## and the cluster dimension ##
! ## I.list: a list storing indeces of the clusters of View.Matrix,height,dimension ##
! ## m: the merge matrix produced by the hclust function ##
! ## d: the number of rows of the merge matrix ##
! ## num.exp: the number of experiments ##
! ## dim.sum: the sum of the dimensions of all clusters ##
! ## Left: the Left child of the cluster being considered ##
! ## Right: the right child of the cluster being considered ##
! ## Orig: the cluster being considered ##
! ## num.clusters:the number of total clusters considered ##
! #################################################################################################
get.clust.list<- function(data.file,dist.method,agglom.method)
{library(mva)
num.exp<-dim(data.file)[2]-1
! if((dist.method =="cos") || (dist.method=="pcos") || (dist.method=="cor") || (dist.method=="euc"))
dist.matrix<-other.dist.metrics(data.file,dist.method)$A
! if((dist.method !="cos") && (dist.method!="pcos") && (dist.method!="cor") && (dist.method!="euc"))
dist.matrix<-dist(data.file[,2:(num.exp+1)],method=dist.method)
clust.info <- hclust(dist.matrix,agglom.method)
m <- clust.info$merge
h <- clust.info$height
***************
*** 98,120 ****
either<-0
neither<-0
!
! ## The loop below counts the total number clusters appearing in the clustering tree as follows.
! ## The merge matrix m generated by hclust consists of d rows.
! ## Each row i represents a parent cluster; each of the two column values of row i
! ## represents one of the two child clusters of cluster i. Therefore, the number of
! ## total clusters *should be* 2*d. There are two obstructions to this deduction.
! ## First, clusters of dimension two (and thus having singletons as both child clusters)
! ## are counted twice: once as a whole cluster and once as two singleton clusters.
! ## As we are not clustering any clusters of dimension two, it is enough to count these
! ## clusters once, as an entire cluster of dimension 2.
! ## Secondly, the original cluster (consisting of the entire data
! ## set) is not counted. Thus the total number of clusters is 2*(d-both)+1, where both
! ## is the number of clusters consisting of two singleton subclusters.
! ## D is the vector which counts the dimension of each cluster.
! ## dim.sum is the sum of dimensions of all clusters we consider:
! ## D is the dimension of all clusters but the original,
! ## d+1 is the dimension of the original,
! ## 2*both represents all pairs of singleton subclusters counted twice.
!
for(i in 1:d)
{if(m[i,1]<0 && m[i,2]<0)
--- 104,126 ----
either<-0
neither<-0
! ###################################################################################################
! ## The loop below counts the total number clusters appearing in the clustering tree as follows. ##
! ## The merge matrix m generated by hclust consists of d rows. ##
! ## Each row i represents a parent cluster; each of the two column values of row i ##
! ## represents one of the two child clusters of cluster i. Therefore, the number of ##
! ## total clusters *should be* 2*d. There are two obstructions to this deduction. ##
! ## First, clusters of dimension two (and thus having singletons as both child clusters) ##
! ## are counted twice: once as a whole cluster and once as two singleton clusters. ##
! ## As we are not clustering any clusters of dimension two, it is enough to count these ##
! ## clusters once, as an entire cluster of dimension 2. ##
! ## Secondly, the original cluster (consisting of the entire data ##
! ## set) is not counted. Thus the total number of clusters is 2*(d-both)+1, where both ##
! ## is the number of clusters consisting of two singleton subclusters. ##
! ## D is the vector which counts the dimension of each cluster. ##
! ## dim.sum is the sum of dimensions of all clusters we consider: ##
! ## D is the dimension of all clusters but the original, ##
! ## d+1 is the dimension of the original, ##
! ## 2*both represents all pairs of singleton subclusters counted twice. ##
! ###################################################################################################
for(i in 1:d)
{if(m[i,1]<0 && m[i,2]<0)
***************
*** 136,149 ****
a<-dim.sum+1
! ## The loop below determines which genes belong to each cluster by unraveling
! ## the hclust merge matrix m. View.Matrix is being set up to store the
! ## cluster name, gene number of each gene within the cluster and the dimension
! ## of the cluster. Genes are identified by their numerical placement within
! ## the data file.
! ## I.list[[i]][1] stores the starting row number of View.Matrix for cluster i
! ## I.list[[i]][2] stores the ending row number of View.Matrix for cluster i
! ## I.list[[i]][3] stores the dimension of cluster i
! ## I.list[[i]][4] stores the height of cluster i
!
for(i in 1:d)
{I.list[[i]]<-vector(mode="numeric",length=4)
--- 142,156 ----
a<-dim.sum+1
! #################################################################################
! ## The loop below determines which genes belong to each cluster by unraveling ##
! ## the hclust merge matrix m. View.Matrix is being set up to store the ##
! ## cluster name, gene number of each gene within the cluster and the dimension ##
! ## of the cluster. Genes are identified by their numerical placement within ##
! ## the data file. ##
! ## I.list[[i]][1] stores the starting row number of View.Matrix for cluster i ##
! ## I.list[[i]][2] stores the ending row number of View.Matrix for cluster i ##
! ## I.list[[i]][3] stores the dimension of cluster i ##
! ## I.list[[i]][4] stores the height of cluster i ##
! #################################################################################
for(i in 1:d)
{I.list[[i]]<-vector(mode="numeric",length=4)
***************
*** 169,173 ****
View.Matrix[1:(d+1),4:(4+num.exp)]<-data.file
-
Orig <-View.Matrix[I.list[[d]][1]:I.list[[d]][2],4:(4+num.exp)]
--- 176,179 ----
***************
*** 191,219 ****
return(View.Matrix,I.list,m,d,h,num.exp,dim.sum,Left,Right,Orig,num.clusters)}
! ###################################################################################################
! ## This function sets up the rest of View.Matrix, which stores and returns the CLUSTERLABEL,
! ## GENENUM, and CLUSTERDIMENSION. View.Matrix stores the clusters in the order generated
! ## by traversing the clustering tree from top down, one level at a time, left to right.
! ## This traversal is accomplished by setting up and using v.stack,
! ## which acts as a top-down breadth-first searching stack.
! ## The columns of v.stack contain the level of the clustering tree, the node number, the number
! ## of the parent of that node, the cluster name associated to the node, the cluster number (with respect to
! ## the merge matrix m found in the function get.clust.list, the dimension of the cluster, the height of the cluster,
! ## and how many times the cluster has been visited. [PLEASE NOTE: Cluster Name corresponds to the variables
! ## z and k, and an old numbering system I use to check whether the clustering is correct. These can be ignored.]
! ## The algorithm works as follows. Beginning with the top cluster (entire data set) of the tree, each
! ## cluster is visited. If the cluster has dimension
! ## larger than two, its two subclusters will be determined first. Then the left child cluster will be visited
! ## first. If it has dimension greater than two, we continue to follow the chain of left subclusters until
! ## a subcluster has dimension two or less. At this point, we begin the traversal up to the parent node of the
! ## cluster just visited, then to its right subcluster. If the dimension of this right subcluster is more than
! ## two, we begin to traverse the chain of left subclusters until we reach one with dimension less than or
! ## equal to two. ETC. A node can only be visited twice.
! ## INPUT: data.file, gene.names generated by scan.data
! ## dist.method, stop.level are user inputs
! ## num.perms: the number of permutations defined by the user
! ## thresh: the confidence threshold defined by the user as a percentage
! ## OUTPUT: View.Matrix, User.Matrix, which are written out in txt file format as Graph.Data, User.Data
! ###############################################################################################################
index<-function(data.file,gene.names,dist.metric,agglom.method,stop.level,num.perms,thresh)
--- 197,227 ----
return(View.Matrix,I.list,m,d,h,num.exp,dim.sum,Left,Right,Orig,num.clusters)}
! ##########################################################################################################
! ## This function sets up the rest of View.Matrix, which stores and returns the CLUSTERLABEL, ##
! ## GENENUM, and CLUSTERDIMENSION. View.Matrix stores the clusters in the order generated ##
! ## by traversing the clustering tree from top down, one level at a time, left to right. ##
! ## This traversal is accomplished by setting up and using v.stack, which acts as a top-down ##
! ## breadth-first searching stack. The columns of v.stack contain the level of the clustering ##
! ## tree, the node number, the number of the parent of that node, the cluster name associated ##
! ## to the node, the cluster number (with respect to the merge matrix m found in the function ##
! ## get.clust.list, the dimension of the cluster, the height of the cluster, and how many times ##
! ## the cluster has been visited. [PLEASE NOTE: Cluster Name corresponds to the variables ##
! ## z and k, and an old numbering system I use to check whether the clustering is correct. ##
! ## These can be ignored.] ##
! ## The algorithm works as follows. Beginning with the top cluster (entire data set) of the tree, ##
! ## each cluster is visited. If the cluster has dimension larger than two, its two subclusters ##
! ## will be determined first. Then the left child cluster will be visited first. If it has ##
! ## dimension greater than two, we continue to follow the chain of left subclusters until ##
! ## a subcluster has dimension two or less. At this point, we begin the traversal up to the ##
! ## parent node of the cluster just visited, then to its right subcluster. If the dimension of ##
! ## this right subcluster is more than two, we begin to traverse the chain of left subclusters ##
! ## until we reach one with dimension less than or equal to two. ETC. ##
! ## A node can only be visited twice. ##
! ## INPUT: data.file, gene.names generated by scan.data ##
! ## dist.method, stop.level are user inputs ##
! ## num.perms: the number of permutations defined by the user ##
! ## thresh: the confidence threshold defined by the user as a percentage ##
! ## OUTPUT: View.Matrix, User.Matrix, which are written out in txt file format as Graph.Data, User.Data ##
! ##########################################################################################################
index<-function(data.file,gene.names,dist.metric,agglom.method,stop.level,num.perms,thresh)
***************
*** 318,323 ****
ret.pos<-ret.pos+1 ## go to next cluster on stack
tmpT<-v.stack[ret.pos,6]
! if(v.stack[ret.pos,9]==-1) tmp<-0 ## if the cluster hasn't been visited by now, it's the last (stop) line on v.stack
! if(v.stack[ret.pos,9]!=-1) ## if the cluster has been visited, continue loop
{if(tmpT<0) tmp<-data.file[abs(tmpT),]
if(tmpT>0) tmp<-View.Matrix[I.list[[tmpT]][1]:I.list[[tmpT]][2],4:(num.exp+4)]}} ##no more clstrs on stack
--- 326,331 ----
ret.pos<-ret.pos+1 ## go to next cluster on stack
tmpT<-v.stack[ret.pos,6]
! if(v.stack[ret.pos,9]==-1) tmp<-0 ## if the cluster hasn't been visited by now, it's the last (stop) line on v.stack
! if(v.stack[ret.pos,9]!=-1) ## if the cluster has been visited, continue loop
{if(tmpT<0) tmp<-data.file[abs(tmpT),]
if(tmpT>0) tmp<-View.Matrix[I.list[[tmpT]][1]:I.list[[tmpT]][2],4:(num.exp+4)]}} ##no more clstrs on stack
***************
*** 325,329 ****
rm(I.list)
! v.stack<-v.stack[!is.na(v.stack[,1]),] ## get rid of dummy (stop) row at bottom ##
## !is.na(View.Matrix[,1])] is the first subclustering which is listed twice but only counted once
## We are deleting the second listing here
--- 333,337 ----
rm(I.list)
! v.stack<-v.stack[!is.na(v.stack[,1]),] ## delete dummy (stop) row at bottom ##
## !is.na(View.Matrix[,1])] is the first subclustering which is listed twice but only counted once
## We are deleting the second listing here
***************
*** 361,365 ****
GRAPH.LABEL[1:(d+1)]<-rep(paste(0,0,"ORIG"),d+1)
last.level<-v.stack[dim(v.stack)[1],1]
! print(paste("The Last TREE LEVEL is: ",last.level))
acc.vec<-c(rep(1,d+1),rep(-1,dim(View.Matrix)[1]-(d+1))) ## this is the ACC column of View.Matrix
--- 369,373 ----
GRAPH.LABEL[1:(d+1)]<-rep(paste(0,0,"ORIG"),d+1)
last.level<-v.stack[dim(v.stack)[1],1]
! print(paste("The Clustering Tree has ",last.level, " levels"))
acc.vec<-c(rep(1,d+1),rep(-1,dim(View.Matrix)[1]-(d+1))) ## this is the ACC column of View.Matrix
***************
*** 372,379 ****
## OLD V.dimnames<-list(NULL,c( "CLUSTER","NAME","DIM","GeneNum",c(1:num.exp))
## NEW V.dimnames<-list(NULL,c("ACC","CLUSTER","NAME","DIM","GeneNum",c(1:num.exp))) ## column names of View.Matrix
-
## In the following loop, v.stack is traversed from top to bottom.
## Note: v.stack[i,1]==1 means the cluster has been perused
! ## View.Matrix[i,1]==1 means the cluster's subclusters have been accepted
b<-0
for(i in 1:length(v.stack[,8]))
--- 380,386 ----
## OLD V.dimnames<-list(NULL,c( "CLUSTER","NAME","DIM","GeneNum",c(1:num.exp))
## NEW V.dimnames<-list(NULL,c("ACC","CLUSTER","NAME","DIM","GeneNum",c(1:num.exp))) ## column names of View.Matrix
## In the following loop, v.stack is traversed from top to bottom.
## Note: v.stack[i,1]==1 means the cluster has been perused
! ## View.Matrix[i,1]==1 means the cluster's subclusters have been accepted
b<-0
for(i in 1:length(v.stack[,8]))
***************
*** 445,452 ****
{D1<-H0
single.flag<-1
! tstat.matrix[3*clust.count,(p+2)]<-abs(T1)
! ##write.table(tmp.data,file=paste(v.stack[i,5],v.stack[i,6],p,
! ## ".perm.txt",sep=""),quote=F,sep="\t",col.names=F,row.names=F)
! }
rm(tmp.data)
if(T2<0) D2<-H0
--- 452,456 ----
{D1<-H0
single.flag<-1
! tstat.matrix[3*clust.count,(p+2)]<-abs(T1)}
rm(tmp.data)
if(T2<0) D2<-H0
***************
*** 454,464 ****
{D1<-H0-tmp.h[T1]
single.flag<-0
! tstat.matrix[3*clust.count,(p+2)]<-0}
! if(T2>0) D2<-H0-tmp.h[T2]
! t.stat<-D1+D2
! t.seq[p]<-t.stat
! single.flag.seq[p]<-single.flag} ##end of permutation loop
! rm(C0)
! t.seq[1:num.perms]<-t.seq[order(t.seq[1:num.perms])] ## order the num.perms test statistics
tstat.matrix[(3*clust.count-2),3:(num.perms+3)]<-round(t.seq,2)
tstat.matrix[(3*clust.count-1),3:(num.perms+3)]<-single.flag.seq
--- 458,468 ----
{D1<-H0-tmp.h[T1]
single.flag<-0
! tstat.matrix[3*clust.count,(p+2)]<-0}
! if(T2>0) D2<-H0-tmp.h[T2]
! t.stat<-D1+D2
! t.seq[p]<-t.stat
! single.flag.seq[p]<-single.flag} ##end of permutation loop
! rm(C0)
! t.seq[1:num.perms]<-t.seq[order(t.seq[1:num.perms])] ## order the num.perms test statistics
tstat.matrix[(3*clust.count-2),3:(num.perms+3)]<-round(t.seq,2)
tstat.matrix[(3*clust.count-1),3:(num.perms+3)]<-single.flag.seq
***************
*** 480,487 ****
if(accept)
! {print("accepting the clusters of")
! #print(View.Matrix[a,2:3])
! #print("GRAPH LABEL")
! #print(GRAPH.LABEL[a])
v.stack[!is.na(M),1]<-1
## the children are accepted, so set their acc var to 1
--- 484,489 ----
if(accept)
! {print("accepting the subclusters of")
! print(GRAPH.LABEL[a])
v.stack[!is.na(M),1]<-1
## the children are accepted, so set their acc var to 1
***************
*** 489,509 ****
if(!accept)
! {print("not accepting the subclusters of cluster")
! #print(View.Matrix[a,2:3])
! #print("GRAPH LABEL")
! #print(GRAPH.LABEL[a])
v.stack[!is.na(M),1]<-0
## the children are not accepted, so set their acc var to 0
View.Matrix[!is.na(N),1]<-0}}}}
!
## v.stack has been completely traversed
- ##return(View.Matrix)
View.Matrix<-View.Matrix[,-3]
! ## deleting archaic numbering scheme and putting in labels
!
View.Matrix[,2]<-GRAPH.LABEL
View.Matrix[1:(d+1),2]<-rep(paste(0,0,"ORIG", sep=","),d+1)
-
Graph.Matrix<-data.frame(ACC=View.Matrix[!duplicated(View.Matrix[,2]),1],
GRAPHLABEL=View.Matrix[!duplicated(View.Matrix[,2]),2],
--- 491,506 ----
if(!accept)
! {print("not accepting the subclusters of cluster")
! print(GRAPH.LABEL[a])
v.stack[!is.na(M),1]<-0
## the children are not accepted, so set their acc var to 0
View.Matrix[!is.na(N),1]<-0}}}}
!
## v.stack has been completely traversed
View.Matrix<-View.Matrix[,-3]
! ## deleting archaic numbering scheme and putting in labels
View.Matrix[,2]<-GRAPH.LABEL
View.Matrix[1:(d+1),2]<-rep(paste(0,0,"ORIG", sep=","),d+1)
Graph.Matrix<-data.frame(ACC=View.Matrix[!duplicated(View.Matrix[,2]),1],
GRAPHLABEL=View.Matrix[!duplicated(View.Matrix[,2]),2],
***************
*** 513,530 ****
write.table(Graph.Matrix,file="Graph.Data",quote=F,sep="\t",col.names=TRUE,row.names=F)
-
View.Matrix<-data.frame(ACC=View.Matrix[,1],
CLUSTERLABEL=view.single.LABEL,
- #GENENAME=gene.names[as.numeric(View.Matrix[,4])],
CLUSTERDIMENSION=View.Matrix[,3],
GENENUM=as.numeric(View.Matrix[,4]))
write.table(View.Matrix, file="User.Data", quote=F,sep="\t",col.names=TRUE,row.names=F)
!
! rm(View.Matrix,Graph.Matrix)
! #return(v.stack,View.Matrix,Graph.Matrix)
! tmp.tstat.matrix<-tstat.matrix[!is.na(tstat.matrix[,1]),]
! return(tmp.tstat.matrix)}
!
!
####################################################################################
## The permute function permutes the data file generated by scan.data by permuting
--- 510,519 ----
write.table(Graph.Matrix,file="Graph.Data",quote=F,sep="\t",col.names=TRUE,row.names=F)
View.Matrix<-data.frame(ACC=View.Matrix[,1],
CLUSTERLABEL=view.single.LABEL,
CLUSTERDIMENSION=View.Matrix[,3],
GENENUM=as.numeric(View.Matrix[,4]))
write.table(View.Matrix, file="User.Data", quote=F,sep="\t",col.names=TRUE,row.names=F)
! rm(View.Matrix,Graph.Matrix)}
####################################################################################
## The permute function permutes the data file generated by scan.data by permuting
***************
*** 546,624 ****
check.vector<-vector(mode="character",length=(num.cols-1))
for(c in 2:num.cols)
! {check.vector[c]<-round(mean(perm.data[,c]),5)==round(mean(data.file[,c]),5)
if(check.vector[c]!="TRUE")
{print("permute isn't working right")
return(c)}}
! return(perm.data,check.vector)}
!
! ## This function creates a "dist" matrix using the given
! ## gene expression matrix and code for distance metric
! ## "cos" ==> 1-cosine of the angle between the two vectors
! ## "pcos" ==> penalized cosine metric (Brian's)
! ## "cor" ==> abs(cor-1) Pearson's correlation coefficient
other.dist.metrics<-function(expression.matrix,dist.metric)
{library(mva)
EM<-expression.matrix
! ##EM does not have a label row!##
! EM<-EM[-1,]
EM<-EM[,-1] ##delete gene.name column
- print(dim(EM))
r<-dim(EM)[1]
c<-dim(EM)[2]
DM<-matrix(ncol=r,nrow=r)
! if(dist.metric=="eucna")
! {for(j in 1:r)
! {for(i in j:r)
! {##print(paste(j,i))
! x<-EM[j,]
! y<-EM[i,]
! na.posn<-vector(mode="numeric") ##records posn of na's##
! na.posn<-NULL
! for(k in 1:length(x))
! {if(is.na(x[k]) || is.na(y[k]))
! na.posn<-c(na.posn,k)}
! if(length(na.posn)==0)
! {tmp<-rbind(x,y)
! distxy<-dist(tmp,method="euclidean")}
! if(length(na.posn)>0)
! {tmp<-rbind(x,y)
! nona.tmp<-tmp[,-(na.posn)]
! distxy<-dist(nona.tmp,method="euclidean")}
! ##col.dist<-(tmp.dist^2)/(dim(tmp)[2]-length(na.posn)) ## num of non-NA cols ##
! ##distxy<-sqrt(tmp.dist^2+(col.dist*length(na.posn)))
! DM[i,j]<-distxy}}}
!
!
! if(dist.metric=="pcos")
! {for(j in 1:r)
! {for(i in j:r)
! {x<-EM[j,]
! y<-EM[i,]
! distxy<-munneke.dist(x,y)
! DM[i,j]<-distxy}}}
!
! if(dist.metric=="cos")
! {for(j in 1:r)
! {for(i in j:r)
! {#print(paste("j=",j,"i=",i))
! x<-EM[j,]
! y<-EM[i,]
! distxy<-cos.dist(x,y)
! DM[i,j]<-distxy}}}
!
!
! if(dist.metric=="cor")
! {for(j in 1:r)
! {for(i in j:r)
! {print(paste("j=",j,"i=",i))
! x<-EM[j,]
! y<-EM[i,]
! distxy<-abs(1-cor(x,y,use="pairwise.complete.obs"))
! DM[i,j]<-distxy}}}
A<-as.dist(DM)
- #print("finished getting distance matrix")
return(DM,A)}
--- 535,587 ----
check.vector<-vector(mode="character",length=(num.cols-1))
for(c in 2:num.cols)
! {check.vector[c]<-round(mean(perm.data[,c],na.rm=T),5)==round(mean(data.file[,c],na.rm=T),5)
if(check.vector[c]!="TRUE")
{print("permute isn't working right")
return(c)}}
! return(perm.data,check.vector)}
+ ##########################################################################
+ ## The other.dist.metrics function creates a "dist" matrix ##
+ ## using the given gene expression matrix and code for distance metric ##
+ ## "cos" ==> 1-cosine of the angle between the two vectors ##
+ ## "pcos" ==> penalized cosine metric (Brian Munneke) ##
+ ## "cor" ==> abs(cor-1) Pearson's correlation coefficient ##
+ ##########################################################################
other.dist.metrics<-function(expression.matrix,dist.metric)
{library(mva)
EM<-expression.matrix
! ##labels<-key[EM[,1],2]
! ##labels<-EM[,1]
EM<-EM[,-1] ##delete gene.name column
r<-dim(EM)[1]
c<-dim(EM)[2]
DM<-matrix(ncol=r,nrow=r)
! for(j in 1:r)
! {for(i in j:r)
! {x<-EM[j,]
! y<-EM[i,]
! na.posn<-vector(mode="numeric") ##record positions of NA's##
! na.posn<-NULL
! for(k in 1:length(x))
! {if(is.na(x[k]) || is.na(y[k]))
! na.posn<-c(na.posn,k)}
! if(length(na.posn)==0)
! tmpd<-rbind(x,y)
! if(length(na.posn)>0)
! {tmp1<-rbind(x,y)
! nona.tmp<-tmp1[,-(na.posn)] ##do not include NA's##
! tmpd<-nona.tmp}
! if(dist.metric=="euc")
! distxy<-dist(tmpd,method="euclidean")
! if(dist.metric=="pcos")
! distxy<-munneke.dist(tmpd[1,],tmpd[2,])
! if(dist.metric=="cos")
! distxy<-cos.dist(tmpd[1,],tmpd[2,])
! if(dist.metric=="cor")
! distxy<-abs(1-cor(x,y,use="pairwise.complete.obs"))
! DM[i,j]<-distxy}}
A<-as.dist(DM)
return(DM,A)}
***************
*** 627,644 ****
########################################################################
munneke.dist<-function(x,y)
! {sumxy<-0
! sumx<-0
! sumy<-0
! diffxy<-0
! for(i in 1:length(x))
! {sumxy<-sumxy+(x[i]*y[i])
! sumx<-sumx+x[i]^2
! sumy<-sumy+y[i]^2
! diffxy<-diffxy+abs(x[i]-y[i])}
! cosxy<-sumxy/(sqrt(sumx)*sqrt(sumy))
! p<-diffxy/length(x)
! p<-2*(p/(1+p))
! distxy<-1-cosxy+p
! return(distxy)}
########################################################################
--- 590,599 ----
########################################################################
munneke.dist<-function(x,y)
! {cosxy<-sum(x*y)/sqrt(sum(x^2)*sum(y^2))
! diffxy<-sum(abs(x-y))
! p<-diffxy/length(x)
! p<-2*(p/(1+p))
! pcosxy<-1-cosxy+p
! return(pcosxy)}
########################################################################
***************
*** 646,672 ****
########################################################################
cos.dist<-function(x,y)
! {sumxy<-0
! sumx<-0
! sumy<-0
! diffxy<-0
! for(i in 1:length(x))
! {sumxy<-sumxy+(x[i]*y[i])
! sumx<-sumx+x[i]^2
! sumy<-sumy+y[i]^2
! diffxy<-diffxy+abs(x[i]-y[i])}
! tmpcosxy<-sumxy/(sqrt(sumx)*sqrt(sumy))
! cosxy<-1-tmpcosxy
! return(cosxy)}
!
!
!
!
!
!
!
!
!
!
!
!
!
--- 601,604 ----
########################################################################
cos.dist<-function(x,y)
! {cosxy<-sum(x*y)/sqrt(sum(x^2)*sum(y^2))
! return(1-cosxy)}
|
|
From: <jas...@us...> - 2003-04-07 19:30:41
|
Update of /cvsroot/genex/genex-server/DB/curated_data
In directory sc8-pr-cvs1:/tmp/cvs-serv30623
Added Files:
qtdim-mas5-short.xml
Log Message:
different QT Dimensions for MAS5 data
--- NEW FILE: qtdim-mas5-short.xml ---
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAGE-ML SYSTEM "MAGE-ML.dtd">
<MAGE-ML identifier="MicroArraySuite-5.0">
<QuantitationType_package>
<QuantitationType_assnlist>
<MeasuredSignal isBackground="0"
identifier="QuantitationType:MicroArraySuite-5.0-short-1"
name="Signal">
<PropertySets_assnlist>
<NameValueType value="1"
name="Genex:column">
</NameValueType>
</PropertySets_assnlist>
<Scale_assn>
<OntologyEntry value="no_scale"
category="QuantitationType:scale">
</OntologyEntry>
</Scale_assn>
<DataType_assn>
<OntologyEntry value="float"
category="QuantitationType:data_type">
</OntologyEntry>
</DataType_assn>
</MeasuredSignal>
<PresentAbsent isBackground="0"
identifier="QuantitationType:MicroArraySuite-5.0-short-2"
name="Detection">
<PropertySets_assnlist>
<NameValueType value="2"
name="Genex:column">
</NameValueType>
</PropertySets_assnlist>
<Scale_assn>
<OntologyEntry value="no_scale"
category="QuantitationType:scale">
</OntologyEntry>
</Scale_assn>
<DataType_assn>
<OntologyEntry value="char128"
category="QuantitationType:data_type">
</OntologyEntry>
</DataType_assn>
</PresentAbsent>
<DerivedSignal isBackground="0"
identifier="QuantitationType:MicroArraySuite-5.0-short-3"
name="Detection p-value">
<PropertySets_assnlist>
<NameValueType value="3"
name="Genex:column">
</NameValueType>
</PropertySets_assnlist>
<Scale_assn>
<OntologyEntry value="no_scale"
category="QuantitationType:scale">
</OntologyEntry>
</Scale_assn>
<DataType_assn>
<OntologyEntry value="float"
category="QuantitationType:data_type">
</OntologyEntry>
</DataType_assn>
</DerivedSignal>
</QuantitationType_assnlist>
</QuantitationType_package>
<BioAssayData_package>
<QuantitationTypeDimension_assnlist>
<QuantitationTypeDimension identifier="QuantitationType:MicroArraySuite-5.0-short"
name="MicroArraySuite-5.0-short">
<QuantitationTypes_assnreflist>
<MeasuredSignal_ref identifier="QuantitationType:MicroArraySuite-5.0-short-1"/>
<PresentAbsent_ref identifier="QuantitationType:MicroArraySuite-5.0-short-2"/>
<DerivedSignal_ref identifier="QuantitationType:MicroArraySuite-5.0-short-3"/>
</QuantitationTypes_assnreflist>
</QuantitationTypeDimension>
</QuantitationTypeDimension_assnlist>
</BioAssayData_package>
</MAGE-ML>
|
|
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
|
|
From: <jas...@us...> - 2003-04-07 16:46:04
|
Update of /cvsroot/genex/genex-server/Mason/workspace
In directory sc8-pr-cvs1:/tmp/cvs-serv10664
Modified Files:
group-maint.html.in
Log Message:
* Mason/workspace/group-maint.html.in (Repository):
mis-spelled URL
Index: group-maint.html.in
===================================================================
RCS file: /cvsroot/genex/genex-server/Mason/workspace/group-maint.html.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** group-maint.html.in 20 Nov 2002 22:32:21 -0000 1.2
--- group-maint.html.in 7 Apr 2003 16:45:59 -0000 1.3
***************
*** 79,85 ****
<%attr>
! action=>'%%GENEX_WORKSPACE_URL%%/group_maint.html'
name=>'Associate Genex User With Group'
! path=>'%%GENEX_WORKSPACE_URL%%/group_maint.html'
</%attr>
<%args>
--- 79,85 ----
<%attr>
! action=>'%%GENEX_WORKSPACE_URL%%/group-maint.html'
name=>'Associate Genex User With Group'
! path=>'%%GENEX_WORKSPACE_URL%%/group-maint.html'
</%attr>
<%args>
|
|
From: <jas...@us...> - 2003-04-05 04:02:38
|
Update of /cvsroot/genex/genex-server/Genex/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv16723
Modified Files:
array-design-insert.pl.in
Log Message:
* scripts/array-design-insert.pl.in (Repository):
adding ability to insert Affy designs in chunks
added --no_fr_maps
Index: array-design-insert.pl.in
===================================================================
RCS file: /cvsroot/genex/genex-server/Genex/scripts/array-design-insert.pl.in,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** array-design-insert.pl.in 5 Apr 2003 03:53:31 -0000 1.16
--- array-design-insert.pl.in 5 Apr 2003 04:02:04 -0000 1.17
***************
*** 44,47 ****
--- 44,48 ----
'rw_group=s',
'no_reporters',
+ 'no_fr_maps',
'reporters_only',
'matrix',
***************
*** 62,65 ****
--- 63,67 ----
--rw_group : the group with permission to modify this design
--no_reporters : do not process reporters
+ --no_fr_maps : do not process feature reporter maps
--reporters_only : only process reporters
--matrix : process reporters using insert_matrix()
|
|
From: <jas...@us...> - 2003-04-05 03:53:34
|
Update of /cvsroot/genex/genex-server/Genex/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv14645
Modified Files:
array-design-insert.pl.in
Log Message:
* scripts/array-design-insert.pl.in (Repository):
adding ability to insert Affy designs in chunks
Index: array-design-insert.pl.in
===================================================================
RCS file: /cvsroot/genex/genex-server/Genex/scripts/array-design-insert.pl.in,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** array-design-insert.pl.in 12 Jan 2003 22:07:20 -0000 1.15
--- array-design-insert.pl.in 5 Apr 2003 03:53:31 -0000 1.16
***************
*** 326,329 ****
--- 326,368 ----
$diff = timediff($stop,$start);
print STDERR "Handling FR Maps took:", timestr($diff),"\n";
+ } else {
+ # we are handling things independently, so we insert the features
+ # without reporter fkeys.
+
+ # Bio::Genex::ArrayDesign::insert_db() calls insert_matrix()
+ # so we push the matrix header as the first item
+ @header = qw(feature_identifier
+ x_image_location
+ y_image_location
+ grid_row_image_location
+ grid_col_image_location
+ feature_type
+ );
+ push(@features,\@header);
+
+ my $mage_ad;
+ unless (exists $mage->packages->{ArrayDesign}) {
+ warn "No ArrayDesign package\n";
+ } else {
+ my $package = $mage->packages->{ArrayDesign};
+ unless (defined $package->arraydesign_list()) {
+ warn "No ArrayDesign's\n";
+ } else {
+ ($mage_ad) = @{$package->arraydesign_list()};
+ }
+ }
+
+ my @mage_features;
+ $start = new Benchmark;
+
+ foreach my $mage_fg ($mage_ad->getFeatureGroups) {
+ push(@mage_features, $mage_fg->getFeatures);
+ }
+ print STDERR scalar @mage_features, " Features to insert\n";
+
+ $stop = new Benchmark;
+ $diff = timediff($stop,$start);
+ print STDERR "Handling Features took:", timestr($diff),"\n";
+ exit;
}
|
|
From: <jas...@us...> - 2003-04-02 20:52:59
|
Update of /cvsroot/genex/genex-server/DB/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv31344
Modified Files:
fix-array-cel.pl
Log Message:
* DB/scripts/fix-array-cel.pl (Repository):
fixed whitespace issue
Index: fix-array-cel.pl
===================================================================
RCS file: /cvsroot/genex/genex-server/DB/scripts/fix-array-cel.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** fix-array-cel.pl 2 Apr 2003 20:09:57 -0000 1.3
--- fix-array-cel.pl 2 Apr 2003 20:52:53 -0000 1.4
***************
*** 97,100 ****
--- 97,102 ----
if (exists $OPTIONS{design}) {
+ $num =~ s/\s+//;
+ $name =~ s/\s+//;
print DESIGN "$num\t$name\n";
}
|
|
From: <jas...@us...> - 2003-04-02 20:40:45
|
Update of /cvsroot/genex/genex-server/DB/curated_data
In directory sc8-pr-cvs1:/tmp/cvs-serv25296
Added Files:
qtdim-cel.xml qtdim-mas5.xml
Log Message:
new qt dimensions for Affy
--- NEW FILE: qtdim-cel.xml ---
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAGE-ML SYSTEM "MAGE-ML.dtd">
<MAGE-ML identifier="Affymetrix-CEL">
<QuantitationType_package>
<QuantitationType_assnlist>
<SpecializedQuantitationType isBackground="0"
identifier="QuantitationType:MicroArraySuite-5.0-1"
name="X">
<PropertySets_assnlist>
<NameValueType value="0"
name="Genex:column">
</NameValueType>
</PropertySets_assnlist>
<Scale_assn>
<OntologyEntry value="no_scale"
category="QuantitationType:scale">
</OntologyEntry>
</Scale_assn>
<DataType_assn>
<OntologyEntry value="int"
category="QuantitationType:data_type">
</OntologyEntry>
</DataType_assn>
</SpecializedQuantitationType>
<SpecializedQuantitationType isBackground="0"
identifier="QuantitationType:MicroArraySuite-5.0-2"
name="Y">
<PropertySets_assnlist>
<NameValueType value="1"
name="Genex:column">
</NameValueType>
</PropertySets_assnlist>
<Scale_assn>
<OntologyEntry value="no_scale"
category="QuantitationType:scale">
</OntologyEntry>
</Scale_assn>
<DataType_assn>
<OntologyEntry value="int"
category="QuantitationType:data_type">
</OntologyEntry>
</DataType_assn>
</SpecializedQuantitationType>
<MeasuredSignal isBackground="0"
identifier="QuantitationType:MicroArraySuite-5.0-3"
name="Mean">
<PropertySets_assnlist>
<NameValueType value="2"
name="Genex:column">
</NameValueType>
</PropertySets_assnlist>
<Scale_assn>
<OntologyEntry value="no_scale"
category="QuantitationType:scale">
</OntologyEntry>
</Scale_assn>
<DataType_assn>
<OntologyEntry value="float"
category="QuantitationType:data_type">
</OntologyEntry>
</DataType_assn>
</MeasuredSignal>
<DerivedSignal isBackground="0"
identifier="QuantitationType:MicroArraySuite-5.0-4"
name="Standard Deviation">
<PropertySets_assnlist>
<NameValueType value="3"
name="Genex:column">
</NameValueType>
</PropertySets_assnlist>
<Scale_assn>
<OntologyEntry value="no_scale"
category="QuantitationType:scale">
</OntologyEntry>
</Scale_assn>
<DataType_assn>
<OntologyEntry value="float"
category="QuantitationType:data_type">
</OntologyEntry>
</DataType_assn>
</DerivedSignal>
<SpecializedQuantitationType isBackground="0"
identifier="QuantitationType:MicroArraySuite-5.0-5"
name="Number of Pixels">
<PropertySets_assnlist>
<NameValueType value="4"
name="Genex:column">
</NameValueType>
</PropertySets_assnlist>
<Scale_assn>
<OntologyEntry value="no_scale"
category="QuantitationType:scale">
</OntologyEntry>
</Scale_assn>
<DataType_assn>
<OntologyEntry value="int"
category="QuantitationType:data_type">
</OntologyEntry>
</DataType_assn>
</SpecializedQuantitationType>
</QuantitationType_assnlist>
</QuantitationType_package>
<BioAssayData_package>
<QuantitationTypeDimension_assnlist>
<QuantitationTypeDimension identifier="QuantitationType:MicroArraySuite-5.0"
name="MicroArraySuite-5.0">
<QuantitationTypes_assnreflist>
<SpecializedQuantitationType_ref identifier="QuantitationType:MicroArraySuite-5.0-1"/>
<SpecializedQuantitationType_ref identifier="QuantitationType:MicroArraySuite-5.0-2"/>
<MeasuredSignal_ref identifier="QuantitationType:MicroArraySuite-5.0-3"/>
<DerivedSignal_ref identifier="QuantitationType:MicroArraySuite-5.0-4"/>
<SpecializedQuantitationType_ref identifier="QuantitationType:MicroArraySuite-5.0-5"/>
</QuantitationTypes_assnreflist>
</QuantitationTypeDimension>
</QuantitationTypeDimension_assnlist>
</BioAssayData_package>
</MAGE-ML>
--- NEW FILE: qtdim-mas5.xml ---
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAGE-ML SYSTEM "MAGE-ML.dtd">
<MAGE-ML identifier="MicroArraySuite-5.0">
<QuantitationType_package>
<QuantitationType_assnlist>
<SpecializedQuantitationType isBackground="0"
identifier="QuantitationType:MicroArraySuite-5.0-1"
name="Stat Pairs">
<PropertySets_assnlist>
<NameValueType value="3"
name="Genex:column">
</NameValueType>
</PropertySets_assnlist>
<Scale_assn>
<OntologyEntry value="no_scale"
category="QuantitationType:scale">
</OntologyEntry>
</Scale_assn>
<DataType_assn>
<OntologyEntry value="int"
category="QuantitationType:data_type">
</OntologyEntry>
</DataType_assn>
</SpecializedQuantitationType>
<SpecializedQuantitationType isBackground="0"
identifier="QuantitationType:MicroArraySuite-5.0-2"
name="Stat Pairs Used">
<PropertySets_assnlist>
<NameValueType value="4"
name="Genex:column">
</NameValueType>
</PropertySets_assnlist>
<Scale_assn>
<OntologyEntry value="no_scale"
category="QuantitationType:scale">
</OntologyEntry>
</Scale_assn>
<DataType_assn>
<OntologyEntry value="int"
category="QuantitationType:data_type">
</OntologyEntry>
</DataType_assn>
</SpecializedQuantitationType>
<MeasuredSignal isBackground="0"
identifier="QuantitationType:MicroArraySuite-5.0-3"
name="Signal">
<PropertySets_assnlist>
<NameValueType value="5"
name="Genex:column">
</NameValueType>
</PropertySets_assnlist>
<Scale_assn>
<OntologyEntry value="no_scale"
category="QuantitationType:scale">
</OntologyEntry>
</Scale_assn>
<DataType_assn>
<OntologyEntry value="float"
category="QuantitationType:data_type">
</OntologyEntry>
</DataType_assn>
</MeasuredSignal>
<PresentAbsent isBackground="0"
identifier="QuantitationType:MicroArraySuite-5.0-4"
name="Detection">
<PropertySets_assnlist>
<NameValueType value="6"
name="Genex:column">
</NameValueType>
</PropertySets_assnlist>
<Scale_assn>
<OntologyEntry value="no_scale"
category="QuantitationType:scale">
</OntologyEntry>
</Scale_assn>
<DataType_assn>
<OntologyEntry value="char128"
category="QuantitationType:data_type">
</OntologyEntry>
</DataType_assn>
</PresentAbsent>
<DerivedSignal isBackground="0"
identifier="QuantitationType:MicroArraySuite-5.0-5"
name="Detection p-value">
<PropertySets_assnlist>
<NameValueType value="7"
name="Genex:column">
</NameValueType>
</PropertySets_assnlist>
<Scale_assn>
<OntologyEntry value="no_scale"
category="QuantitationType:scale">
</OntologyEntry>
</Scale_assn>
<DataType_assn>
<OntologyEntry value="float"
category="QuantitationType:data_type">
</OntologyEntry>
</DataType_assn>
</DerivedSignal>
</QuantitationType_assnlist>
</QuantitationType_package>
<BioAssayData_package>
<QuantitationTypeDimension_assnlist>
<QuantitationTypeDimension identifier="QuantitationType:MicroArraySuite-5.0"
name="MicroArraySuite-5.0">
<QuantitationTypes_assnreflist>
<SpecializedQuantitationType_ref identifier="QuantitationType:MicroArraySuite-5.0-1"/>
<SpecializedQuantitationType_ref identifier="QuantitationType:MicroArraySuite-5.0-2"/>
<MeasuredSignal_ref identifier="QuantitationType:MicroArraySuite-5.0-3"/>
<PresentAbsent_ref identifier="QuantitationType:MicroArraySuite-5.0-4"/>
<DerivedSignal_ref identifier="QuantitationType:MicroArraySuite-5.0-5"/>
</QuantitationTypes_assnreflist>
</QuantitationTypeDimension>
</QuantitationTypeDimension_assnlist>
</BioAssayData_package>
</MAGE-ML>
|
|
From: <jas...@us...> - 2003-04-02 20:24:34
|
Update of /cvsroot/genex/genex-server/DB/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv17737
Added Files:
tab2AD-cel.pl
Log Message:
new script for creating fake array designs from CEL files
--- NEW FILE: tab2AD-cel.pl ---
#!/usr/bin/perl
use warnings;
use strict;
use Getopt::Long;
use Bio::MAGE 20020902.3 qw(:ALL);
use Bio::MAGE::XMLUtils;
use Benchmark;
my %OPTIONS;
my $rc = GetOptions(\%OPTIONS,
'infile=s',
'outfile=s',
'ad_identifier=s',
'fg_identifier=s',
'help',
);
my $USAGE = <<"EOU";
usage: $0 [required flags] file1 ...
required flags:
--infile=file : the tab-delimited file to read
--outfile=file : the array design XML file to create
--ad_identifier=id : the identifier to use for the ArrayDesign
optional flags:
--fg_identifier=id : the identifier to use for the FeatureGroup
--help : print this message
EOU
die "Bad option\n$USAGE" unless $rc;
die $USAGE if exists $OPTIONS{help};
die "Must specify --infile\n$USAGE"
unless exists $OPTIONS{infile};
die "Must specify --outfile\n$USAGE"
unless exists $OPTIONS{outfile};
die "Must specify --identifier\n$USAGE"
unless exists $OPTIONS{ad_identifier};
unless (exists $OPTIONS{fg_identifier}) {
$OPTIONS{fg_identifier} = $OPTIONS{ad_identifier};
$OPTIONS{fg_identifier} =~ s/ArrayDesign/FeatureGroup/;
}
open(IN,"$OPTIONS{infile}")
or die "Couldn't open $OPTIONS{infile} for reading";
open(OUT,">$OPTIONS{outfile}")
or die "Couldn't open $OPTIONS{outfile} for writing";
my %reporters;
my $num_features;
my $start = new Benchmark;
my $fg = Bio::MAGE::ArrayDesign::FeatureGroup->new(identifier=>"$OPTIONS{fg_identifier}",
name=>"$OPTIONS{fg_identifier}"
);
my $zone;
while (<IN>) {
next if /^\#/; # skip comment lines
chomp;
my ($x, $y) = split /\t/;
my $feature = Bio::MAGE::DesignElement::Feature->new(identifier=>"$x.$y",
name=>"$x.$y",
);
$fg->addFeatures($feature);
$num_features++;
print "Completed $num_features\n" if $num_features % 1000 == 0;
}
print STDERR "Found $num_features features\n";
my $stop = new Benchmark;
my $diff = timediff($stop,$start);
print STDERR "Parsing took:", timestr($diff),"\n";
print STDERR "Found $num_features features\n";
my $ad = Bio::MAGE::ArrayDesign::PhysicalArrayDesign->new(identifier=>$OPTIONS{ad_identifier},
numberOfFeatures=>$num_features,
featureGroups=>[$fg],
);
print STDERR "Creating the MAGE object\n";
$start = new Benchmark;
my $mage = Bio::MAGE->new(identifier=>"MAGE-$OPTIONS{ad_identifier}",
objects=>[$ad]
);
$stop = new Benchmark;
$diff = timediff($stop,$start);
print STDERR "MAGE creation took:", timestr($diff),"\n";
print STDERR "Writing MAGE-ML\n";
$start = new Benchmark;
my $writer = Bio::MAGE::XML::Writer->new(fh=>\*OUT);
$writer->write($mage);
$stop = new Benchmark;
$diff = timediff($stop,$start);
print STDERR "Writing XML took:", timestr($diff),"\n";
print STDERR "Finished\n";
|
|
From: <jas...@us...> - 2003-04-02 20:10:07
|
Update of /cvsroot/genex/genex-server/DB/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv10661
Modified Files:
fix-array-cel.pl
Log Message:
* DB/scripts/fix-array-cel.pl (Repository):
added the correct end of data marker
Index: fix-array-cel.pl
===================================================================
RCS file: /cvsroot/genex/genex-server/DB/scripts/fix-array-cel.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** fix-array-cel.pl 2 Apr 2003 20:06:56 -0000 1.2
--- fix-array-cel.pl 2 Apr 2003 20:09:57 -0000 1.3
***************
*** 81,85 ****
# when we reach a blank line, we're done
! last if /^$/;
my @data = split /\t/;
--- 81,85 ----
# when we reach a blank line, we're done
! last if /^\s*$/;
my @data = split /\t/;
|
|
From: <jas...@us...> - 2003-04-02 20:07:04
|
Update of /cvsroot/genex/genex-server/DB/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv8992
Modified Files:
fix-array-cel.pl
Log Message:
* DB/scripts/fix-array-cel.pl (Repository):
added the correct end of data marker
Index: fix-array-cel.pl
===================================================================
RCS file: /cvsroot/genex/genex-server/DB/scripts/fix-array-cel.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fix-array-cel.pl 2 Apr 2003 20:00:42 -0000 1.1
--- fix-array-cel.pl 2 Apr 2003 20:06:56 -0000 1.2
***************
*** 80,85 ****
}
! # when we reach the end of the Data section, we're done
! last if /^End/;
my @data = split /\t/;
--- 80,85 ----
}
! # when we reach a blank line, we're done
! last if /^$/;
my @data = split /\t/;
|
|
From: <jas...@us...> - 2003-04-02 20:00:47
|
Update of /cvsroot/genex/genex-server/DB/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv6000
Added Files:
fix-array-cel.pl
Log Message:
new script for creating fake array designs from CEL files
--- NEW FILE: fix-array-cel.pl ---
#!/usr/bin/perl
use warnings;
use strict;
use Getopt::Long;
my %OPTIONS;
my $rc = GetOptions(\%OPTIONS,
'infile=s',
'design=s',
'help',
);
my $USAGE = <<"EOU";
usage: $0 [required flags] file1 ...
required flags:
--infile=file : the file to read
--design=file : the array design file to create
optional flags:
--help : print this message
EOU
die "Bad option\n$USAGE" unless $rc;
die $USAGE if exists $OPTIONS{help};
die "Must specify --infile\n$USAGE"
unless exists $OPTIONS{infile};
die "Must specify --design\n$USAGE"
unless exists $OPTIONS{design};
open(IN,"$OPTIONS{infile}")
or die "Couldn't open $OPTIONS{infile} for reading";
open(DESIGN,">$OPTIONS{design}")
or die "Couldn't open $OPTIONS{design} for writing";
print DESIGN "# id\tname\n";
# 0) X
# 1) Y
# 2) MEAN
# 3) STDV
# 4) NPIXELS
# all we need are:
# 0) X
# 1) Y
my @INDICES = qw(0 1);
my $in_data;
my $data_start_regexp = qr/^\[INTENSITY\]/o;
my $reading_data;
my $reading_data_regexp = qr/^CellHeader=/;
my @spots;
my $count = 0;
my %REPS;
my %IDS;
while (<IN>) {
# see if we've found the Data section already
unless ($in_data or /$data_start_regexp/) {
next;
}
# check if this is the beginning of the Data section
if (/$data_start_regexp/) {
$in_data = 1;
next;
}
# don't proceed unless we've past the Data section header line
next unless $reading_data or /$reading_data_regexp/;
# check if this is the header line of the Data section
if (/$reading_data_regexp/) {
$reading_data = 1;
next;
}
# when we reach the end of the Data section, we're done
last if /^End/;
my @data = split /\t/;
my ($num,$name) = @data[@INDICES];
# commence error checking
die "No line number"
unless defined $num;
die "Bad line number: $num"
if exists $IDS{$num};
die "Bad reporter: $name"
if exists $REPS{$name};
if (exists $OPTIONS{design}) {
print DESIGN "$num\t$name\n";
}
}
print STDERR "Finished\n";
|
Update of /cvsroot/genex/genex-server/Java In directory sc8-pr-cvs1:/tmp/cvs-serv9305/Java Added Files: ApiGenerator.java GenexApiGenerator.java GenexApiWriter.java GenexContentHandler.java GenexElement.java GenexJava.java build.xml Log Message: Initial commit --- NEW FILE: ApiGenerator.java --- /* * C O P Y R I G H T N O T I C E * * * * @author Hyojoo Kang * * @version draft * * @date 2003.01.13 * * * *************************************************************************** */ package org.bio.genex; import java.io.*; import org.xml.sax.*; import org.xml.sax.helpers.*; /** * Entry Point Class * */ public class ApiGenerator { private final String API_DIRECTORY = "Class"; private GenexJava genexJava; private String apiFileName; private GenexApiWriter genexWriter; /** * CTor */ public ApiGenerator(File xmlFile) { // Perpare the new api file String xmlFileName = xmlFile.getName(); String className = new String(xmlFileName.substring(0, xmlFileName.lastIndexOf("."))); // if it does not exist, make it File classDir = new File(API_DIRECTORY); if ( !classDir.isDirectory() ) classDir.mkdir(); apiFileName = API_DIRECTORY + "/" + className + ".java"; System.out.println("new filename: "+apiFileName+" xml:"+xmlFile.getPath()); try { // Create the parser. XMLReader parser = XMLReaderFactory.createXMLReader( "org.apache.xerces.parsers.SAXParser"); // Create the content handler. GenexContentHandler cHandler = new GenexContentHandler(className); // Set the content handler. parser.setContentHandler(cHandler); // Parse the file. parser.parse(xmlFile.getPath()); // Here is the Genex object genexJava = cHandler.getGenexJava(); try { FileOutputStream fout = new FileOutputStream(apiFileName); // Here is the ApiWriter genexWriter = new GenexApiWriter( fout, genexJava); } catch (FileNotFoundException e) { System.err.println(e); } if ( genexJava == null ) { System.err.println("Error: No GenexJava returned"); } } catch (IOException exception) { exception.printStackTrace(); } catch (SAXException exception) { exception.printStackTrace(); } } /** * WriteClass methodGe * */ public void writeClass() { genexWriter.writeClass(); genexWriter.close(); } } --- NEW FILE: GenexApiGenerator.java --- /* * C O P Y R I G H T N O T I C E * * * * @author Hyojoo Kang * * @version draft * * @date 2003.01.13 * * * *************************************************************************** */ package org.bio.genex; import java.io.*; /** * Entry Point Class * */ public class GenexApiGenerator { /** * ENTRY POINT */ public static void main(String[] args) { if ( args.length == 0 ) { System.out.println("Usage: GenexApiGenerator xmlDir"); return; } System.out.println(args[0]+"|"+args.length); // XML Directory File xmlDir = new File(args[0]); if ( xmlDir.isDirectory() ) { File xmlFiles[] = xmlDir.listFiles(); System.out.println("xml files: "+xmlFiles[0].getName()); for (int i=0; i< xmlFiles.length ; i++) { if ( xmlFiles[i].isFile()) { ApiGenerator apiGen = new ApiGenerator(xmlFiles[i]); apiGen.writeClass(); } else { System.err.println(xmlFiles[i].getName()+" is not a file"); } } } else { System.err.println("'"+args[0]+"' is not a Directory"); } } } --- NEW FILE: GenexApiWriter.java --- /* * C O P Y R I G H T N O T I C E * * * * @author Hyojoo Kang * * @version draft * * @date 2003.01.13 * * * *************************************************************************** */ package org.bio.genex; import java.io.*; /** * GenexApiWriter class */ public class GenexApiWriter extends PrintWriter{ private static final String pkgName = "org.bio.genex"; private GenexJava genexJava; /** * Ctor */ public GenexApiWriter( FileOutputStream fout, GenexJava gj ) { super(fout); genexJava = gj; } /** * Accessors */ public void writeClass() { //-- Basics writeHeader(); writeAttributes(); writeCtor(); //-- APIs writeFetch(); writeInsertFoo(); println("}"); } private void writeHeader() { println("/****************************************************"); println(" *"); println(" *"); println(" * "+ genexJava.getClassName() ); println(" *"); println(" *"); println(" ****************************************************/\n\n"); println("package "+ pkgName + "." + genexJava.getClassName() +";\n"); println("import java.sql.*;"); println("\n\n\npublic class "+ genexJava.getClassName() + " {\n\n"); } private void writeAttributes(){ println(" private String dbUrl = \"jdbc:postgresql:genex\";"); println(" private String dbDriverClassName =\"org.postgresql.Driver\";"); println(" private String dbUsername = \"genex\";"); println(" private String dbPassword = \"genex\";\n"); } private void writeCtor() { println(" /**\n * Constructor\n */"); println(" public Citation() {\n"); println(" }\n"); } private void writeFetch() { println(" /**\n * Fetch\n */"); // println(" public } private void writeInsertFoo() { println(" /**\n * writeInsert\n */"); println(" public void writeInsertFoo() {\n"); println(" Connection conn=null;"); println(" try {"); println(" "); println(" conn = DriverManager.getConnection(dbUrl, dbUsername, dbPassword );"); println(" PreparedStatement ps;"); println(" } catch ( SQLException e) {"); println(" "); println(" System.err.println(e);"); println(" } finally {"); println(" "); println(" if ( conn != null ) {"); println(" try { conn.close(); } catch (Exception e){}"); println(" }\n }\n"); println(" }\n"); } } /* public void writeInsertFoo() { Connection conn=null; try { Class.forName( dbDriverClassName ); conn = DriverManager.getConnection(dbUrl, dbUsername, dbPassword ); PreparedStatement ps = conn.prepareStatement( "insert into citation values " + "(1,2,'titlefoo', 'auth', 'pub', 'publisye', 'edi', 1980, 2, 3, 23, null);"); int cnt = ps.executeUpdate(); System.out.println("Prepared and inserted"); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT * FROM citation;"); while( rs.next() ) { String text = rs.getString("title"); System.out.println("The titiel is :"+text); } conn.close(); } catch ( SQLException e) { System.err.println(e); } catch ( ClassNotFoundException e ) { System.err.println(e); } finally { if ( conn != null ) { try { conn.close(); } catch (Exception e){} } } } */ --- NEW FILE: GenexContentHandler.java --- /* * C O P Y R I G H T N O T I C E * * * * @author Hyojoo Kang * * @version draft * * @date 2003.01.13 * * * *************************************************************************** */ package org.bio.genex; import org.xml.sax.*; import org.xml.sax.helpers.*; /** * <b>Description:</b> * Content handler for GeneX object. * */ public class GenexContentHandler extends DefaultHandler { protected GenexJava genexJava; /** * Ctor */ public GenexContentHandler(String className){ super(); genexJava = new GenexJava(className); } /** * Accessor to genexJava; * */ public GenexJava getGenexJava() { return genexJava; } public void startElement( String uri, String localName, String qName, Attributes attributes) throws SAXException { /* System.out.print( "|"+uri + "|"+localName+"|"+qName+"|"+attributes.getLength()); for(int i=0; i<attributes.getLength(); i++) { String urif = attributes.getURI(i); String localNamef = attributes.getLocalName(i); String value = attributes.getValue(i); System.out.print(" "+urif+"*"+localNamef+"*"+value+"*"); } System.out.println(); */ genexJava.addElement(uri, localName, qName, attributes); } public void endElement( String uri, String localName, String qName) throws SAXException { ;// do nothing for now } // implements ContentHandler } --- NEW FILE: GenexElement.java --- /* * C O P Y R I G H T N O T I C E * * * * @author Hyojoo Kang * * @version draft * * @date 2003.01.13 * * * *************************************************************************** */ package org.bio.genex; import org.xml.sax.*; /** * Genex Element class */ public class GenexElement { private String uri; private String localName; private String qName; private Attributes attr ; /** * Ctor */ public GenexElement(String uri, String localName, String qName, Attributes attr) { this.uri = uri; this.localName = localName; this.qName = qName; this.attr = attr; } /** * Accessors */ public String getLocalName() { return localName; } public String getQName() { return qName; } public Attributes getAttributes() { return attr; } } --- NEW FILE: GenexJava.java --- /* * C O P Y R I G H T N O T I C E * * * * @author Hyojoo Kang * * @version draft * * @date 2003.01.13 * * * *************************************************************************** */ package org.bio.genex; import java.util.ArrayList; import java.io.*; import org.xml.sax.*; /** * <b>Description:</b> * GeneX Java object. * */ public class GenexJava { private static final int INIT_CAPACITY = 20; // Genex Xml Elements private GenexElement xTable; private GenexElement xPrimeKey; private ArrayList xColumns; private GenexElement xUniqueCols; private GenexElement xFKey; private String className; /** * Ctor */ public GenexJava(String className) { xColumns = new ArrayList(INIT_CAPACITY); this.className = className; } public void addElement(String uri, String localName, String qName, Attributes attr) { GenexElement genexE = new GenexElement(uri, localName, qName, attr); if ("table".equals(localName) ) { xTable = genexE; } else if ("primary_key".equals(localName) ) { xPrimeKey = genexE; } else if ("column".equals(localName) ) { xColumns.add(genexE); } else if ("unique".equals(localName) ) { xUniqueCols = genexE; } else if ("foreign_key".equals(localName) ) { xFKey = genexE; } else { System.err.println("Don't know what '"+localName+"' is."); } } /** * Accessors */ public String getClassName() { return className; } public GenexElement getTable() { return xTable; } public ArrayList getColumns() { return xColumns; } } --- NEW FILE: build.xml --- <?xml version="1.0"?> <project default="Genex" basedir="."> <!-- For people who use Jikes --> <property name="build.compiler" value="jikes"/> <property name="build.compiler.pedantic" value="true"/> <property name="build.compiler.emacs" value="true"/> <property name="build.compiler.fulldepend" value="true"/> <property name="src" value="."/> <property name="classes" value="."/> <property name="doc" value="doc"/> <property name="sourcefiles" value="**/*.java"/> <property name="classfiles" value="**/*.class"/> <!-- =================================================================== --> <!-- Help on usage --> <!-- =================================================================== --> <target name="usage"> <echo message=""/> <echo message=""/> <echo message=" Java Genex build file"/> <echo message="-------------------------------------------------------------"/> <echo message=""/> <echo message=""/> <echo message=" See the comments inside the build.xml file for more details."/> <echo message="-------------------------------------------------------------"/> <echo message=""/> <echo message=""/> </target> <!-- =================================================================== --> <!-- Build targets --> <!-- =================================================================== --> <!-- ZIP up results --> <target name="Genex" depends="build"> </target> <!-- Compile source --> <target name="build" depends="prepare"> <javac srcdir="${basedir}" destdir="${basedir}"/> </target> <!-- Create the doc directory --> <target name="prepare"> <mkdir dir="${doc}"/> <!-- javadoc destdir="${doc}" sourcepath="${src}" packagenames="QtDimensionGui"/ --> </target> <!-- Clean any existing files --> <target name="clean"> <delete> <fileset dir="${classes}" includes="${classfiles}"/> </delete> <delete dir="${doc}"/> </target> </project> |
|
From: <tri...@us...> - 2003-03-29 06:11:48
|
Update of /cvsroot/genex/genex-server/Java In directory sc8-pr-cvs1:/tmp/cvs-serv8141/Java Log Message: Directory /cvsroot/genex/genex-server/Java added to the repository |
|
From: <ki...@us...> - 2003-03-07 23:40:58
|
Update of /cvsroot/genex/genex-www/content
In directory sc8-pr-cvs1:/tmp/cvs-serv14312
Modified Files:
menu.ssi
Log Message:
removed CyberT link
Index: menu.ssi
===================================================================
RCS file: /cvsroot/genex/genex-www/content/menu.ssi,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** menu.ssi 8 Dec 2002 01:42:26 -0000 1.14
--- menu.ssi 7 Mar 2003 23:29:37 -0000 1.15
***************
*** 10,20 ****
<tr>
- <td>
- <b>Demos & Live Tools</b><br>
- - <b><a href="http://genomics.biochem.uci.edu/genex/cybert/">CyberT at UCI</a></b><br>
- </td>
- </tr>
-
- <tr>
<td>
<b><u>Download GeneX Software</u></b><br>
--- 10,13 ----
|
|
From: <ki...@us...> - 2003-03-07 03:02:15
|
Update of /cvsroot/genex/genex-www/status/2003/jan
In directory sc8-pr-cvs1:/tmp/cvs-serv11050
Modified Files:
status_main.ssi
Log Message:
wrong year... oops
Index: status_main.ssi
===================================================================
RCS file: /cvsroot/genex/genex-www/status/2003/jan/status_main.ssi,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** status_main.ssi 5 Mar 2003 01:56:14 -0000 1.5
--- status_main.ssi 7 Mar 2003 03:02:11 -0000 1.6
***************
*** 4,8 ****
<table border="2" bgcolor="#BFD8D8" width="100%" cellpadding="15" cellspacing="5">
<tr valign="top" bgcolor="#D8E4F7">
! <th><big>January 24th, 2002</big></th>
</tr>
<tr bgcolor="#D8E4F7">
--- 4,8 ----
<table border="2" bgcolor="#BFD8D8" width="100%" cellpadding="15" cellspacing="5">
<tr valign="top" bgcolor="#D8E4F7">
! <th><big>January 24th, 2003</big></th>
</tr>
<tr bgcolor="#D8E4F7">
***************
*** 117,121 ****
<table border="2" bgcolor="#BFD8D8" width="100%" cellpadding="15" cellspacing="5">
<tr valign="top" bgcolor="#D8E4F7">
! <th><big>January 17th, 2002</big></th>
</tr>
<tr bgcolor="#D8E4F7">
--- 117,121 ----
<table border="2" bgcolor="#BFD8D8" width="100%" cellpadding="15" cellspacing="5">
<tr valign="top" bgcolor="#D8E4F7">
! <th><big>January 17th, 2003</big></th>
</tr>
<tr bgcolor="#D8E4F7">
***************
*** 169,173 ****
<table border="2" bgcolor="#BFD8D8" width="100%" cellpadding="15" cellspacing="5">
<tr valign="top" bgcolor="#D8E4F7">
! <th><big>January 10th, 2002</big></th>
</tr>
<tr bgcolor="#D8E4F7">
--- 169,173 ----
<table border="2" bgcolor="#BFD8D8" width="100%" cellpadding="15" cellspacing="5">
<tr valign="top" bgcolor="#D8E4F7">
! <th><big>January 10th, 2003</big></th>
</tr>
<tr bgcolor="#D8E4F7">
|