<opt
  name="anogam"
  relid="1"
  make_current="1"
  >

  <no_csomesplit>1</no_csomesplit>
  <valid>0</valid> <!-- set 1 to skip db checks of above variables -->
  
  <about id="anogam"><![CDATA[
   See bulkfiles_template.xml for further documentation. 
   See site_defaults for included configurations.
  ]]></about>
  
  <include>site_defaults</include>
  
  <title>AnoGambia</title>
  
  <doc id="Release.txt"><![CDATA[
  Bulk output for Chado genome databases
  Database: ${title} 
  Species:  ${species}
  Release:  ${rel}, dated ${date} as ${relfull}

  This is a test case for <a href="http://gmod.org/GMODTools">GMOD Bulkfiles</a>; 
  loaded from a NCBI GenBank chromosome record
  ]]></doc>
    
  <release id="1" rel="anogam1"  dbname="anogam_x" date="20080511" />
  <release id="dummy" title="placeholder for xmlsimple"/>

  <relfull>${org}_${release_date}</relfull> 
  <release_url>/genome/${species}/release-${release_id}.html</release_url>

  <org>anogam</org>
  <species>Anopheles gambiae str. PEST</species>
  <!-- NOTE the Strain PEST tag on NCBI Genbank organism/species is needed
  Anopheles gambiae str. PEST
  need code correction for '_'/' ' in species part to fix:
  fastaFromDb featn=chromosome ? sql= ...
  and o.genus = 'Anopheles' and o.species = 'gambiae_str._PEST' and o.organism_id = f.organism_id
       chado db has  genus=Anopheles    species='gambiae str. PEST'
  -->
  
  <GFF_source>Genbank</GFF_source>
  <seq_ontology>sequence</seq_ontology> 
  <golden_path>'chromosome'</golden_path>

  <!-- some useful Genbank feature properties
    see tables/properties-overview; 
    not keeping: codon_start, date, old_locus_tag, organism, strain?
      translation: should be separate .aa file from fasta/ 
    -->
  <featureprops>
      'Note','comment1','gene','locus_tag','inference',
      'product','protein_id', 'transcript_id',
      'standard_name', 'strain'
  </featureprops>
  
  <featdump
    path="tmp/featdump/\w+.tsv"
    config="chadofeatsql"
    tag="feature_sql"
    type="feature_table"
    splitname="chadofeat"
    >
    <target>chromosomes</target>
    <target>features</target>
    <target>matches</target>
    <target>analysis</target>
  </featdump>
  
  <!-- feature sets to make fasta bulk files -->
  <featset>chromosome</featset>
  <featset>gene</featset>
  <featset>transcript</featset>
  <featset>CDS</featset>  <!-- dna of protein coding sequence -->
  <featset>translation</featset> <!-- protein aminos -->
  <featset>ncRNA</featset>
  <featset>pseudogene</featset>
  <featset>transposon</featset>
  <!-- featset>gene_extended2000</featset -->
  <!-- featset>intergenic</featset -->


  <doc id="TestCase.txt"><![CDATA[

  # get AnoGam chrX and load to chado db
  curl -OR ftp://bio-mirror.net/biomirror/ncbigenomes/Anopheles_gambiae/CHR_X/NC_004818.gbk.gz

  set dbname=anogam_x
  $pg/bin/createdb -T chado_01_template $dbname
  
  # fix Genbank FT to SO type map
  vi  lib/Bio/SeqFeature/Tools/TypeMapper.pm : add pseudogenic tRNA
 
  # load chromosome X to chado
  gunzip -c NC_004818.gbk.gz |\
   perl bin/bp_genbank2gff3.pl -noCDS -in stdin -out stdout |\
   perl bin/gmod_bulk_load_gff3.pl -dbname $dbname -organism fromdata 
  
  # create GMOD Bulkfiles conf/anogam.xml from template.xml : dbname, etc. edits
  
  # create Bulkfiles outputs for anogam_x
  perl -Ilib bin/bulkfiles.pl -config=anogam -debug -make >& log.anogam1 &

  perl -Ilib bin/bulkfiles.pl -config=anogam -format=genbanktbl -debug -make  

 
 problems:
  transcript : no db residues; reconfig to get froms eq
 
 ]]></doc>

</opt>
