[Bioperl-pipeline] xml dir housekeeping -- No hardcoding
Juguang Xiao
juguang at fugu-sg.org
Thu Jan 30 10:36:52 EST 2003
> 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.
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.
Juguang.
More information about the bioperl-pipeline
mailing list