<opt
  id="filesets"
  date="20040821"
  filepart_delimiter="-"
  >
 
  <title>Bulkfiles fileset definitions</title>
 
  <about>
    
  These are configurations producing bulk file sets.
  Use as include="filesets" to data release config file,
  or copy into primary config file and edit to taste.
  
  Note on overriding some of these:
  Use the 'fileset_override' option, currently, to replace
  one or a few of these settings, while including these defaults.
  Because of the way settings are read, any included ones will
  not replace main settings.  The 'fileset' options become
  one large hash table.  'fileset_override' will replace one
  or more of these.
  
  Common fileset tags:
    id="fasta"   -- name tag
    path="fasta/.+\.fasta"   -- path regex for output files
    input="fff"    -- input data (but see informat in other configs)
    config="tofasta"  -- config file (depends on handler needs)
    handler="FastaWriter"  -- perl module that processes fileset
    dropnotes="synonym_2nd,synonym"  -- handler-specific tag
    makeall="1"  -- handler-specific ( _all_ fasta files from chr parts)
    perchr="1"   -- per chr files
    dogzip="0"   -- gzip output files
    title="Genome feature sequence fasta" 
    no_orgchr="1" -- files have no organism,chromosome naming

  </about>
  
  <!--
  2007oct
    : add no_csomesplit=1 : see main config
    : added go_association fileset
  -->
  
  <!-- change these dump tags to fileset tags ?? 
    Bulkfiles is current handler for dnadump, featdump ; change? -->
  <dnadump
    path="dna/.+\.raw"
    old_sql="select feature_id, residues from feature where uniquename = ?"
    sql="select feature_id, residues, md5checksum, seqlen, name from feature where uniquename = ?"
    sql_csome="select feature_id, residues, md5checksum, seqlen, name from feature where uniquename = ?"
    />
    
  <!-- rewrite of dnadump; handler is Bulkfiles.pm -->
  <fileset
    id="dna"
    path="dna/.+\.raw"
    input="dna_dump"
    handler="Bulkfiles"
    sql="select feature_id, residues, md5checksum, seqlen, name from feature where uniquename = ?"
    sql_csome="select feature_id, residues, md5checksum, seqlen, name from feature where uniquename = ?"
    title="Chromosome dna in raw format (file of bases only)"
    />

  <featdump
    path="tmp/featdump/\w+.tsv"
    config="chadofeatsql"
    tag="feature_sql"
    type="feature_table"
    splitname="chadofeat"
    >
    <target>chromosomes</target>
    <target>features</target>
    <target>analysis</target>
    <target>synteny</target>
  </featdump>
  
  <!-- rewrite of featdump; handler is Bulkfiles.pm -->
  <fileset
    id="feature_table"
    path="tmp/featdump/\w+.tsv"
    handler="Bulkfiles"
    config="chadofeatsql"
    tag="feature_sql"
    splitname="chadofeat"
    >
    <target>chromosomes</target>
    <target>features</target>
    <target>analysis</target>
    <target>synteny</target>
  </fileset>


  <fileset
    id="fff"
    path="fff/.+\.fff"
    input="feature_table"
    title="FFF Genome features"
    config="chadofeatconv"
    handler="FeatureWriter"
    dogzip="0"
    />
    
  <fileset
    id="gff"
    path="gff/.+\.gff"
    input="feature_table"
    handler="FeatureWriter"
    title="GFF Genome features"
    noforwards="1"
    makeall="1"
    perchr="0"
    dogzip="0"
    />

  <fileset
    id="fasta"
    path="fasta/.+\.fasta"
    config="fastawriter"
    handler="FastaWriter"
    dropnotes="synonym_2nd,synonym,Note,orf_classification"
    addmd5sum="1" 
    addcrc64="0" 
    makeall="1"
    perchr="0"
    dogzip="0"
    />

    <!-- add module to make summary tables given scripts+sql -->
  <fileset
    id="overview"
    path="tables/.+\.txt"
    config="chadofeatsql"
    handler="Bulkfiles"
    tag="feature_sql"
    type="summary"
    no_orgchr="1"
    >
    <target>organism_summary</target>
    <target>feature_summary</target>
    <target>analysis_summary</target>
    <target>property_summary</target>
    <target>chromosome_summary</target>
  </fileset>

    <!-- add module to make summary tables given scripts+sql -->
  <fileset
    id="tables"
    path="tables/.+\.txt"
    input="fff"
    config="tablewriter"
    config_sql="chadofeatsql"
    handler="TableWriter"
    tag="feature_sql"
    type="list"
    title="Summary Tables"
    no_orgchr="1"
    >
    <target>id_table</target>
    <target>ortho_table</target>
    <target>feature_map</target>
    <target>gbrowse_conf</target>
    <target>genomeweb</target>
    <target>overviewhtml</target>
  </fileset>

    <!-- see gbrowseconf.xml for db_adaptor options -->
  <fileset
    id="gbrowse_conf"
    path="gff/gbrowse.conf"
    config="gbrowseconf" 
    handler="TableWriter"
    withvars="1"
    
    db_adaptor_class = "Bio::DB::GFF"
    db_adaptor = "dbi::mysql"
    db_dsn  = "${relfull}"
    db_user = "www"
    />

  <fileset
    id="genomeweb"
    path=""
    config="genomeweb" 
    handler="TableWriter"
    other_path="tables/.+\.txt"
    no_orgchr="1"
    />


    <!-- 0710: add go_association fileset:
     add as desired to outformats>go_association</outformats 
     -->
  <fileset
    id="go_association"
    path="tables/"
    handler="BulkWriter"
    input="sql_query"
    config="chadofeatsql"
    tag="feature_sql"
    type="list"
    >
    <target>go_association</target>
  </fileset>

    <!-- 0805: add genbanktbl / genbanksubmit fileset:
     add as desired to outformats>genbanktbl</outformats 
     Bio::GMOD::Bulkfiles::GenbankSubmitWriter
     -->
  <fileset
    id="genbanktbl"
    path="genbanksubmit/"
    suffix="tbl"
    handler="GenbankSubmitWriter"
    title="Genbank genome submit table"
    input="feature_table"
    config="genbanksubmit"
    tag="gbtbl_sql"
    MAYBE_makeall="1"
    MAYBE_perchr="1"
    dogzip="0"
    >
  </fileset>


  <fileset
    id="gbrowse_fb"
    path="gnomap/gbrowse.conf"
    config="gbrowseconf_fb" 
    handler="GnomapWriter"
    withvars="1"
    />

  <fileset
    id="gnomap"
    path="gnomap/.+\.tsv"
    input="fff"
    config="tognomap"
    handler="GnomapWriter"
    title="GnoMap features"
    indexonly="0"
    />
    
  <fileset
    id="blast"
    path="blast/.+\.*"
    config="blastfiles"
    handler="BlastWriter"
    dogzip="0"
    />

  <fileset
    id="acode"
    path="fbobs/.+\.acode"
    config="toacode"
    handler="AcodeWriter"
    makeall="1"
    perchr="0"
    dogzip="0"
    />
    

</opt>
