[Bioperl-pipeline] xml dir housekeeping -- No hardcoding

Shawn Hoon shawnh at fugu-sg.org
Thu Jan 30 11:30:49 EST 2003


On Thu, 30 Jan 2003, Juguang Xiao wrote:

> 
> > On writing pipeline tests, pipeline tests should  be file based, meaning
> > it doesn't assume the availability of biosql or ensembl or other schema. Also
> > no hardcoding.  Within the xml, one can add the various adaptors and stuff but commented out
> > for testing purposes. Users who want to use the templates, should make a copy
> > and uncomment or modify accordingly.
> 
> Hi Shawn,
> 
> It is hard to define the standard of whether it is hardcoding or not. :) One idea is that you are non hardcoding if you refer to the files that reside only in t/data/. Or you have a bette definition.

I don't think its hard. It looks scary when one has names in the code. For example, see PipeConf.pm



> 
> In XML, we can use DTD entity to make such template, say.
> 
> <!-- change to your own path -->
> <!ENTITY file_path "/usr/juguang/backyard/dna_piece.fa">
> 
> And in the xml file, we write like this.
> 
> <file>&file_path;</file>
> 
> When you use this pipeline, you just need to modify the entity like.
> 
> <!ENTITY file_path "/usr/shawn/data/another_dna_piece.fa">
> 
> That is what entity is supposed to do. Cool, right? ;) However, this feature needs to be supported by the parser, while I did not test it on XML::Parser yet. Let me make it test later.

Until then lets keep the xml clean where possible and put the dev ones in the dev folder which I will create now.


shawn

> 
> Juguang.
> 
> 

-- 
********************************
* Shawn Hoon
* http://www.fugu-sg.org/~shawnh
********************************



More information about the bioperl-pipeline mailing list