NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Wiki Markup
{scrollbar:icons=false}

h1. 

Step-By-Step

...

Guide

...

to

...

Install

...

and

...

Use

...

caArray

...

Importer

...

Topic:

...

caArray

...

Installation

...

and

...

Upgrade

...

Release

...

:

...

caArray

...

2.3

...

and

...

2.4.x

...

Date

...

entered:

...

03/19/2010

{:=
Panel
title
Contents
of
this
Page
} {
Table of Contents
:
minLevel
=2} {panel} h2. About caArray Importer Developed by Dr. Matthew Eldridge, Head of the Bioinformatics Core facility at Cancer Research UK's Cambridge Research Institute, caArray Importer
2

About caArray Importer

Developed by Dr. Matthew Eldridge, Head of the Bioinformatics Core facility at Cancer Research UK's Cambridge Research Institute, caArray Importer v1.0.2

...

is

...

an

...

open-source

...

package

...

that

...

extends

...

the

...

caArray

...

Java

...

API

...

to

...

provide

...

programmatic

...

access

...

to

...

the

...

following

...

functionality:

...

  1. Retrieval

...

  1. of

...

  1. imported

...

  1. array

...

  1. designs

...

  1. Creation,

...

  1. modification

...

  1. and

...

  1. deletion

...

  1. of

...

  1. projects

...

  1. Upload,

...

  1. validation

...

  1. and

...

  1. import

...

  1. of

...

  1. array

...

  1. data

...

  1. files

...

  1. Modification

...

  1. of

...

  1. file

...

  1. type

...

  1. File

...

  1. removal

...

Download

...

caArray

...

Importer

...

caArray

...

Importer

...

v1.0.2

...

can

...

be

...

downloaded

...

from

...

this

...

page

...

.

caArray Importer Compatibility

This version of the caArray API extension is compatible with versions 2.3 and later. It is not compatible with caArray version 2.2.1

...

or

...

earlier

...

releases.

...

Note

...

that,

...

for

...

versions

...

2.4

...

and

...

later,

...

some

...

of

...

the

...

source

...

code

...

and

...

build

...

files

...

in

...

the

...

caArray

...

Importer

...

distribution

...

must

...

be

...

modified

...

before

...

they

...

can

...

be

...

compiled

...

and

...

deployed.

...

The

...

modifications,

...

which

...

are

...

described

...

later

...

in

...

this

...

article,

...

are

...

slightly

...

different

...

depending

...

on

...

the

...

exact

...

version

...

of

...

caArray

...

you

...

are

...

running

...

(i.e.,

...

2.4.0.2

...

versus

...

2.4.1).

...

caArray Importer Distribution Contents

caArray Importer Distribution Contents

Components

Description

LICENSE.txt

The Apache License version 2.0 under which the source code in this distribution is released.

build.xml

Apache Ant build file for compiling source code, updating the caArray server and client library, and running the example client application.

build.properties

Properties file for the Ant build in which the locations of the caArray server ear and client distribution should be set.

apidocs

Contains the Javadoc documentation for both server and client classes that constitute the caArray Importer API as well as the example client application.

caarray-ejb

Contains source code for the Enterprise JavaBean (EJB) that provides programmatic access to caArray functionality for creating projects, uploading, validating and importing array data files, etc.

caarray-client

Contains source code for the modified CaArrayServer class (no longer marked final to enable subclassing) used to connect to and access the caArray server and a subclass that provides access to the interface for the caArray Importer EJB.

example

Contains source code for an example client application that demonstrates how to use the caArray Importer API.

Pre-Requisites

caArray Importer Pre-requisites

Components

Description

Java 2 Platform Standard Edition 5.0 Update 10 (J2SE 5.0)

Building and running Java applications

Apache Ant 1.7.0

Building and running Java applications

Set JAVA_HOME and ANT_HOME environment variables

Refer to the caArray installation guide for further details

caArray legacy client distribution

Download from caArray GForge site

Initial Configuration

The initial configuration of caArray Importer is specified by multiple parameters in the build.properties file, which is located in the root level of the caArray Importer distribution archive. For the parameters below, in most cases a user only needs to update the server.base.dir property. Note that the value for this property varies depending on the particular version of caArray you are running.

caArray Importer Initial Configuration

Parameters

Description

client.legacy.zip=caarray-client-legacy.zip

...

The

...

location

...

of

...

the

...

caArray

...

Java

...

client

...

distribution

...

zip

...

file.

...

By

...

default

...

it

...

is

...

assumed

...

to

...

be

...

in

...

the

...

current

...

working

...

directory

...

and

...

named

...

caarray-client-legacy.zip.

...

  • server.base.dir=C:/programs/caarray/caarray2_3_0

...

  • (for

...

  • v2.3)

...

  • server.base.dir=C:/programs/caarray/caarray2_4_0_1

...

  • (for

...

  • v2.4.0.1)

...

  • server.base.dir=C:/programs/caarray/caarray2_4_1

...

  • (for

...

  • v2.4.1)

...

The

...

base

...

directory

...

in

...

which

...

the

...

caArray

...

server

...

was

...

installed.

...

The

...

directory

...

provided

...

depends

...

on

...

the

...

exact

...

caArray

...

version

...

you

...

are

...

running.

...


Code Block
server.deploy.dir=${server.base.dir}/jboss-4.0.5.GA/server/default/deploy

...

The actual deployment directory.

...

Normally

...

this

...

does

...

not

...

need

...

to

...

be

...

changed.

...

This

...

can

...

be

...

left

...

empty

...

if

...

you

...

do

...

not

...

have

...

write

...

access

...

to

...

the

...

deployment

...

directory.

...

In

...

that

...

case,

...

you

...

must

...

manually

...

copy

...

it

...

over

...

after

...

the

...

caarray.ear

...

file

...

is

...

updated.

...

Code Block
server.ear=${server.deploy.dir}/caarray.ear

...

The target caarray server ear file. Normally this does not need to be changed.

Preliminary Steps for caArray Versions 2.4 and Higher

If you are running caArray v2.4 or higher, you must perform the steps outlined below before proceeding to repackage and redeploy the caArray server enterprise archive. Note that some of the steps vary depending on the exact version of caArray you are running.

For ALL Versions of caArray 2.4 And Higher

The build.xml file included in the stock caArray Importer distribution does not work with caArray v2.4 and higher. You must either download this modified build.xml file or manually edit the stock build.xml as described below:

1) In the property declarations towards the top of the file, you will see the following line of code which declares the property client.libs:

   <property name="client.libs"

...

value="

...

*/lib/java/

...

*.jar"/>

...

Add

...

the

...

following

...

line

...

of

...

code

...

beneath

...

it

...

to

...

declare

...

another

...

property

...

called

...

'client.libs.grid'

...

:

   <property name="client.libs.grid"

...

value="

...

*/lib/grid/

...

*.jar"/>

...

2)

...

Then,

...

locate

...

the

...

following

...

snippet

...

of

...

code

...

further

...

down

...

in

...

the

...

build.xml

...

file...

...

<path id="example.classpath">

...


      <pathelement location="$

...

{example.classes.dir}"/>

...


      <pathelement location="$

...

{updated.client.jar}"/>

...


      <fileset dir="$

...

{client.dist.dir}">

...


         <include name="$

...

{client.libs}"/>

...


      </fileset>
   </path>

...and

...

add

...

the

...

newly

...

declared

...

'client.libs.grid'

...

property

...

by

...

inserting

...

the

...

following

...

line

...

of

...

code

...

after

...

<include

...

name="$

...

{client.libs}"/>

...

'...

...

<include name="$

...

{client.libs.grid}"/>

...

...so

...

that

...

the

...

modified

...

code

...

snippet

...

will

...

appear

...

as

...

follows

...

(inserted

...

line

...

of

...

code

...

highlighted

...

in

...

bold)

...

:

...

<path

...

id="example.classpath">

...


      <pathelement location="$

...

{example.classes.dir}"/>

...


      <pathelement location="$

...

{updated.client.jar}"/>

...


      <fileset dir="$

...

{client.dist.dir}">

...


         <include name="${client.libs}"/>
         <include name="$

...

{client.libs

...

.grid}"/>
      </fileset>
   </path>

For caArray Version 2.4.0.x

...

ONLY

...

You

...

must

...

revise

...

a

...

single

...

line

...

of

...

code

...

in

...

the

...

server-side

...

Enterprise

...

Java

...

Bean

...

(EJB)

...

source

...

file

...

CaArrayImporterServiceBean.java

...

as

...

described

...

below.

...

This

...

file

...

is

...

located

...

at

...

the

...

following

...

path

...

within

...

the

...

caArray

...

Importer

...

distribution

...

archive:

...

\caarray-ejb\src\main\java\org\cruk\cri\caarray\services

...

:

Replace line 401 in the original source:

Project project = projectManagementService.getProject(projectId);

...

With

...

the

...

following

...

line

...

of

...

code:

...

Project

...

project

...

=

...

projectManagementService.getProjectByPublicId("EXP-"+projectId.toString());

...

For caArray Version 2.4.1

...

ONLY

...

You

...

must

...

revise

...

three

...

different

...

lines

...

of

...

code

...

in

...

the

...

server-side

...

Enterprise

...

Java

...

Bean

...

(EJB)

...

source

...

file

...

CaArrayImporterServiceBean.java

...

as

...

described

...

below.

...

This

...

file

...

is

...

located

...

at

...

the

...

following

...

path

...

within

...

the

...

caArray

...

Importer

...

distribution

...

archive:

...

\caarray-ejb\src\main\java\org\cruk\cri\caarray\services

...

:

_First,

...

replace

...

line

...

46

...

in

...

the

...

original

...

source

...

file:

...

_

...

import

...

gov.nih.nci.caarray.util.UsernameHolder;

...

with

...

this

...

one:

...

import

...

gov.nih.nci.caarray.util.CaArrayUsernameHolder;

...

Then,

...

replace

...

line

...

188

...

in

...

the

...

original

...

source

...

file:

...

Person person = new Person(UsernameHolder.getCsmUser());

...

With

...

this

...

one:

...

Person

...

person

...

=

...

new

...

Person(CaArrayUsernameHolder.getCsmUser());

...

Finally,

...

replace

...

line

...

401

...

in

...

the

...

original

...

source

...

file:

...

Project project = projectManagementService.getProject(projectId);

...

With

...

the

...

following

...

line

...

of

...

code:

...

Project

...

project

...

=

...

projectManagementService.getProjectByPublicId("EXP-"+projectId.toString());

Repackaging and Redeploying the caArray Server

The following steps repackage the caArray server enterprise archive, caarray.ear, with the additional EJB and associated classes that constitute the caArray Importer API extension.

Step 1. Update the caarray.ear file

Code Block
}}

h2. Repackaging and Redeploying the caArray Server

The following steps repackage the caArray server enterprise archive, {{caarray.ear}}, with the additional EJB and associated classes that constitute the caArray Importer API extension.

h3. Step 1. Update the caarray.ear file

{code}$ ant update-ear{code}

Note

...

that

...

'$'

...

represents

...

the

...

command

...

prompt

...

and

...

may

...

differ

...

depending

...

on

...

your

...

operating

...

system

...

or

...

shell.

...

There

...

are

...

four

...

steps

...

involved

...

in

...

this

...

process:

...

  1. Copies

...

  1. the

...

  1. caarray.ear

...

  1. archive

...

  1. to

...

  1. the

...

  1. current

...

  1. directory

...

  1. Unpacks

...

  1. its

...

  1. contents

...

  1. to

...

  1. a

...

  1. local

...

  1. subdirectory

...

  1. Compiles

...

  1. the

...

  1. caArray

...

  1. Importer

...

  1. EJB

...

  1. and

...

  1. associated

...

  1. classes

...

  1. Repackages

...

  1. the

...

  1. archive

...

  1. with

...

  1. these

...

  1. additional

...

  1. classes

...

Step

...

2.

...

Deploy

...

the

...

updated

...

caarray.ear

...

file

{
Code Block
}$ ant deploy-ear{code}

This

...

step

...

does

...

not

...

work

...

unless

...

you

...

have

...

write

...

access

...

to

...

the

...

caArray JBoss server deployment directory (see initial Configuration). In that case, you should manually copy the caarray.ear file to the ${server.base.dir

...

}/jboss-4.0.5.GA/server/default/deploy

...

directory

...

on

...

which

...

the

...

caArray

...

server

...

is

...

running.

...

There

...

is

...

no

...

need

...

to

...

restart

...

the

...

caArray

...

JBoss

...

server.

...

This

...

step

...

should

...

recognize

...

the

...

newly

...

deployed

...

archive

...

and

...

automatically

...

redeploy

...

it.

...

Redeployment

...

may

...

take

...

a

...

few

...

minutes

...

to

...

complete.

...

You

...

can

...

check

...

progress

...

in

...

the

...

server

...

log,

...

$

...

{server.base.dir

...

}/jboss-4.0.5.GA/server/default/log/server.log

...

Step 3.

...

Updating

...

the

...

caArray

...

Client

...

Library

...

This

...

step

...

repackages

...

the

...

client

...

library

...

with

...

additional

...

classes

...

required

...

to

...

make

...

use

...

of

...

the

...

caArray

...

Importer

...

API.

{
Code Block
}$ ant update-client-jar{code}

This

...

unpacks

...

the

...

legacy

...

client

...

distribution

...

zip

...

file,

...

compiles

...

the

...

modified

...

CaArray

...

Server

...

class

...

and

...

its

...

subclass

...

(see

...

content

...

description

...

for

...

caarray-client

...

above),

...

and

...

repackages

...

the

...

client

...

library

...

jar

...

file

...

with

...

these

...

classes

...

and

...

some

...

additional

...

classes

...

from

...

the

...

caArray

...

server

...

required

...

by

...

the

...

caArray

...

Importer.

...

Using

...

the

...

caArray

...

Importer

...

API

...

Scenario

...

1.

...

Upload

...

Affymetrix

...

250K

...

Nsp

...

and

...

Sty

...

SNP

...

Data

...

An

...

example

...

client-side

...

program

...

is

...

provided

...

to

...

demonstrate

...

the

...

creation

...

of

...

a

...

new

...

project

...

and

...

the

...

upload,

...

validation

...

and

...

import

...

of

...

array

...

data

...

files.

...

The

...

source

...

code

...

can

...

be

...

found

...

in

...

the

...

following

...

file:

{
Code Block
}
example/src/main/java/org/cruk/cri/caarray/client/CaArrayImporterExample.java
{code}

The

...

example

...

client

...

program

...

creates

...

a

...

new

...

project

...

and

...

uploads

...

all

...

files

...

in

...

the

...

arraydata

...

directory.

...

To

...

run

...

the

...

example

...

client

...

program,

...

follow

...

the

...

steps

...

below:

...

  1. Make

...

  1. sure

...

  1. that

...

  1. your

...

  1. Java

...

  1. classpath

...

  1. includes

...

  1. the

...

  1. updated

...

  1. client

...

  1. library.

...

  1. (This

...

  1. is

...

  1. taken

...

  1. care

...

  1. of

...

  1. if

...

  1. you

...

  1. run

...

  1. the

...

  1. example

...

  1. using

...

  1. Ant

...

  1. as

...

  1. shown

...

  1. below).

...

  1. Upload

...

  1. the

...

  1. array

...

  1. design

...

  1. files

...

  1. for

...

  1. the

...

  1. Affymetrix

...

  1. Mapping

...

  1. 250K

...

  1. Nsp

...

  1. and

...

  1. Sty

...

  1. chips

...

  1. into

...

  1. caArray

...

  1. using

...

  1. caArray

...

  1. web

...

  1. interface.

...

  1. Create

...

  1. a

...

  1. directory

...

  1. called

...

  1. arraydata

...

  1. in

...

  1. the

...

  1. same

...

  1. location

...

  1. as

...

  1. that

...

  1. in

...

  1. which

...

  1. you

...

  1. execute

...

  1. the

...

  1. client-side

...

  1. program.

...

  1. Copy

...

  1. a

...

  1. few

...

  1. Affymetrix

...

  1. 250K

...

  1. data

...

  1. files

...

  1. (CEL,

...

  1. CHP)

...

  1. and

...

  1. optionally

...

  1. MAGE-TAB

...

  1. IDF

...

  1. and

...

  1. SDRF

...

  1. files

...

  1. to

...

  1. the

...

  1. arraydata

...

  1. directory

...

  1. .

...

  1. Run

...

  1. command

...

  1. below:

...

  1. Code Block

...

  1. 
    $ ant compile-example
    $ ant run-example
    

...

Scenario 2.

...

Upload

...

Affymetrix

...

Expression

...

Files

...

To

...

upload

...

Affymetrix

...

expression

...

files,

...

follow

...

the

...

steps

...

below:

...

  1. Upload

...

  1. the

...

  1. related

...

  1. array

...

  1. designs

...

  1. into

...

  1. the

...

  1. caArray

...

  1. web

...

  1. interface.

...

  1. Modify

...

  1. the

...

  1. values

...

  1. for

...

  1. the

...

  1. following

...

  1. constants

...

  1. in

...

  1. CaArrayImporterExample.java

...

  1. .

...

  1. Note

...

  1. that

...

  1. the

...

  1. values

...

  1. provided

...

  1. are

...

  1. for

...

  1. illustration

...

  1. purpose

...

  1. only

...

  1. and

...

  1. must

...

  1. be

...

  1. replaced:
    Code Block
    
    private static final String 

...

  1. SERVER_HOST = "

...

  1. yourCaArrayServerHost";
              private static final 

...

  1. int SERVER_JNDI_PORT = 

...

  1. 31099;
              

...

  1. private static final String 

...

  1. USERNAME = "

...

  1. yourUsername";
              

...

  1. private static final String 

...

  1. PASSWORD = "

...

  1. yourPswd";
              public static String

...

  1.  

...

  1. TITLE = 

...

  1. "Test Affymetrix Expression Project";
              public static String PROVIDER = "Affymetrix";
              public static String ASSAY_TYPE = "Gene Expression";
              public static String[) ARRAY_DESIGNS = new String(] \{ "HG-U133_Plus_2" \};
    
  2. If you have your data files stored under a directory (for example: C:/data/caarray/MAGEdataFiles) different from the arraydata created in scenario 1, replace the directory arraydata with the path to that directory as shown below in the function "main". It can be either relative or absolute path:
    Code Block
    
    client.uploadFiles(project, "C:/data/caarray/MAGEdataFiles");
    
  3. Copy a few Affymetrix HG-U133_Plus_2 data files (CEL, CHP) and optionally MAGE-TAB IDF and SDRF files to the C:/data/caarray/MAGEdataFiles directory .
  4. Run the command below:
    Code Block
    
    $ ant compile-example
    $ ant run-example
    

Have a comment?

Please leave your comments in caArray End User Forum

Wiki Markup
data files (CEL, CHP) and optionally MAGE-TAB IDF and SDRF files to the *C:/data/caarray/MAGEdataFiles* directory .
# Run the command below:
{code}
$ ant compile-example
$ ant run-example
{code}

h2. Have a comment?

Please leave your comments in [caArray End User Forum|https://cabig-kc.nci.nih.gov/Molecular/forums/viewtopic.php?f=6&t=497]






























{scrollbar:icons=false}