<opt
  name="fbbulk-r41" 
  relid="41"
  date="20050207"
>
  <!-- see site_defaults for more included configs -->
  <include>site_defaults</include>

  <title>FlyBase Chado DB r4.1</title>
  <about>
   Configurations to extract feature and sequence data for
   bulk files from FlyBase chado databases, including various
   release information.
  </about>

  <notes id="r41">
   Update r4.1 notes: ? add in matches.sql, but need to filter out all the
   unwanted and dupl. to analysis.sql output.  
    .. second look indicates no matches.sql features not in analysis.sql
    
    Basically have to check names against accept pattern list.  'prime', 'contig'?
         print if (/([.:])(5prime|3prime|contig)/);
   .. get dbx database attribute for match to use for filter? where? fix 
    FROM feature matchft, feature armft, 
       feature targft left outer join gffattr_match attr
         on (targft.feature_id = attr.feature_id),
   .. should it be 'feature matchft left outer join gffattr_match' to get dbxref ?
   
   Most feat types are 'match'; 
   Mostly/only want EST/cDNAs - RE60666.5prime, LD02891.5prime and like ?
   
   Filter out the anonymous Genbank/Protein accession matches in analysis
   Contig2076_Contig2470 = dpse blast matches; also mosquitos
   filter out the 'sim4:wrap', and "RepeatMasker".
   filter out 'alignment' == HDC* types .. have same in analysis

  </notes>
  
  <doc name="Release.txt"><![CDATA[
    D. melanogaster euchromatin genome data from FlyBase
    Release  ${rel}, dated ${date}.
    
    This release adds  features missing in release 4.0: oligo, BAC, 
    as well as many transposon/insertion features, 
    and corrects various problems with the prior release.
    
    See release notes at <a href="http://flybase.net${release_url}">
    http://flybase.net${release_url}</a>
  ]]></doc>
   

  <include>fbreleases</include>

  <!-- db is release-dependent ; use fbreleases info 
    this is standard public access to curren dmel_chado
  -->
  <db
    driver="Pg"
    name="BOGUS_dmel_chado"
    host="localhost"
    port="7302"
    user=""
    password=""
    />

  <org>dmel</org>
  <species>Drosophila melanogaster</species>

  <golden_path>'chromosome_arm'</golden_path>
  <seq_ontology>SO</seq_ontology>
  <featureprops>'cyto_range','dicistronic','gbunit'</featureprops>
  <est_where_clause>AND (an.program = 'sim4' AND
    an.sourcename IN ('na_dbEST.same.dmel','na_dbEST.diff.dmel','na_DGC.in_process.dros'))
  </est_where_clause>
  <analysis_where_clause>AND NOT (an.program = 'sim4' AND
    an.sourcename IN ('na_dbEST.same.dmel','na_dbEST.diff.dmel','na_DGC.in_process.dros'))
  </analysis_where_clause>

  <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>ests</target>
    <!-- <target>matches</target> -->  
    <!-- <target>synteny</target> -->
  </featdump>

  <!-- use to add parent ids to features FBgn|FBti ; NOT these - FBan|CG|CR -->
  <idpattern>(FBgn|FBti)\d+</idpattern>
  <!-- rename intron,UTRs to Parent-mRNA-in/utr ? -->
  <gmodel_parts_rename>0</gmodel_parts_rename>
  
  <!-- featuresets = feature sets to make fasta bulk files -->

  <!-- note 19nov04 - override scaffold default featmap.
      fb dmel chado scaffold residues come from
      chromosome dna; but had out-of-date errors, safer to use
      chromosome, not fromdb for these? 
  -->
  <!--
  <featmap
    name="scaffold"   
    alt_name0 = "golden_path_region" 
    alt_name1 = "golden_path_fragment" 
    alt_name2 = "databank_scaffold"
    alt_name3 = "scaffold"
    alt_name4 = "supercontig"
    types="golden_path_region scaffold"
    typelabel="scaffold"
    NOT_fromdb="1"
    />
  <featmap name="dummy" note="here for xml parser" />
  -->

</opt>
