<opt
  name="spbasefeatconf2"
  date="20071129"
  >
 
  <title>Chado DB Feature info</title>
  <about>
    These are configurations for converting chado feature table dumps to
    standard feature/sequence files. Most of these configs specify how to
    process and convert various features extracted from chado db.
    These are tied to methods in Bulkfiles::FeatureWriter.pm)

    Tags with OLD_USAGE_ are depreciated settings (no longer active).
  </about>
  
  <informat>feature_table</informat>  
  
  <outformats>fff</outformats>
  <outformats>gff</outformats>
  <outformats>fasta</outformats>

  <gff_addchromosome>0</gff_addchromosome>

  <mergematch></mergematch>
  
  <noforwards_gff>1</noforwards_gff>
  
  <!-- remapType: append this name pattern to type; works with maptype below -->
  <name2type_pattern>[-_](repeatmasker|genscan|piecegenie|twinscan|genewise|trnascan)</name2type_pattern>

  <!-- dont warn if these types have Parent oid not in data; e.g  chromosome parent -->
  <maptype_ignore_missingparent>^(match_part|match|gene|cytology|chromosome_band|oligo|BAC|protein_binding_site|rescue_fragment)</maptype_ignore_missingparent>

  
  <mapname_pattern name="1match" type="^(match|oligo)" cuttype="1" from="null" to="null"/>
  <mapname_pattern name="6match" type="^match.*" from=";$" to=""/>
  <mapname_pattern name="4oligo" type="^oligo" from="\-hsp\S*$" to=""/>
  <mapname_pattern name="4cytol" type="(chromosome_band|cytology)" from="\-hsp\S*$" to=""/>
  <mapname_pattern name="bac" type="^BAC" from="(hit\-|\-hsp|\-cl\-scaffoldBACs)" to=""/>
  <mapname_pattern name="7match" type="^match.*" from="(\..prime)-.*$" to="$1"/>
  <mapname_pattern name="genscann" type="genscan" from="_GENSCAN_predicted_peptide.*" to=""/>
  <mapname_pattern name="pinsert"  type="pinsertion" from="\-insertion\-on\-.*$" to=""/>
  <mapname_pattern name="dpsegn1" type="gene" from="Dpse\\GA" to="GA"/>
  <mapname_pattern name="dum" from="\-dummy\-" to=""/>
  <mapname_pattern name="tep" type="transposable_element_pred" from="JOSHTRANSPOSON\-" to=""/>

  <!-- drop dbxref extra DB: prefix to real DBname: prefix added by old gff loader -->
  <mapattr_pattern name="1DBexcess" type="^dbxref" from="^DB:(\w+:\w+)" to="$1"/>
  <mapattr_pattern name="1FBexcess" type="^dbxref" from="^FlyBase Annotation IDs" to="FBannot"/>

  <maptype_pattern name="3masked" from="_masked" to=""/>
  <maptype_pattern name="simwrap" from="sim4:wrap.*" to="sim4:wrap"/>
  <maptype_pattern name="null" typename="noname" from="null" to="null"/>  
  
   <!-- dpse chado duplicate 0-length chromosome entries; why? -->
  <nozombiechromosomes>1</nozombiechromosomes>
  
  <gene_is_complex>0</gene_is_complex> 
  <GModelParents>mRNA</GModelParents>
  <GModelParts>protein,CDS,three_prime_UTR,five_prime_UTR</GModelParts>
  <CDS_spanType>protein</CDS_spanType>
  <CDS_exonType>CDS</CDS_exonType>

  <about id="feat_model"><![CDATA[
    feat_model:
    revision of above mess for gene models; handle pseudogene; ncRNAs ...
  
    feat_model keys:
    id = ? type of feature, cant do with multiples
    simple = 1; not structure for this, write just span 
      (gene may be span or structured); replaces "simplefeat" list
    types   = list of types (replaces id?)
    submodels = list of features in kid array that become new structured features
    parent  = feature holding all kid objects (e.g. exons) (for submodel)
        ? is this valid, use featob->parent instead
    typelabel = what to write in place of id type (protein -> CDS)
    hasspan = this feature has start,stop (e.g. gene, mRNA, protein)
        discard/cut parts that fall outside
    part(s) = array of kid types (e.g. exons, UTRs) making structure
    makepartsfrom = list? of parts to make parts from if not given
      (e.g. exons => cds)
  ]]></about>
  
  <!-- 3 level model here -->
  <feat_model id="gene" simple="1" >
<!--     <submodels>mRNA</submodels>   -->
    <submodels>tRNA</submodels> 
      <!-- data may or may not have gene parent for other rnas ; pseudogene ? -->
  </feat_model>
  
  <feat_model id="mRNA">
    <parts>exon</parts> 
<!--     <parts>three_prime_UTR</parts>   -->
<!--     <parts>five_prime_UTR</parts>  -->
    <submodels>protein</submodels> 
    <submodels>five_prime_UTR</submodels> 
    <submodels>three_prime_UTR</submodels> 
    <submodels>intron</submodels> 
  </feat_model>
  
  <feat_model id="protein" 
    typelabel="CDS" 
    parent="mRNA" 
    hasspan="1" 
    NOT_makemethod="getCDSexons" 
    makepartsfrom="exon" 
    >
    <parts>CDS</parts> <!-- exon equivalent may need to create from exons -->
  </feat_model>

  <!-- to create UTR, intron from mRNA>exon,protein model -->
  <feat_model id="five_prime_UTR" 
    makemethod="makeUtr5" 
    makepartsfrom="exon|protein" 
    >
    <parts>five_prime_UTR</parts>  
  </feat_model>
  <feat_model id="three_prime_UTR" 
    makemethod="makeUtr3" 
    makepartsfrom="exon|protein" 
    >
    <parts>three_prime_UTR</parts>  
  </feat_model>
  <feat_model id="intron" 
    makemethod="makeIntrons" 
    makepartsfrom="exon" 
    >
    <parts>intron</parts>  
  </feat_model>
  
  <!-- default structure for non-simple 'mRNA' types -->
  <feat_model id="rnatype" types="pseudogene tRNA snRNA snoRNA rRNA tRNA miRNA ncRNA">
    <parts>exon</parts> 
  </feat_model>
  
  <!-- flybase chado has these with fmin == 1-origin, others are 0-origin; why?? -->
  <origin_one
    chromosome_arm="1"
    chromosome_band="1"
    chromosome="1"
    supercontig="1"
    golden_path="1"
    transposable_element_insertion_site="1"
    />

  <topsort
    chromosome_arm="1"
    chromosome="1"
    golden_path="1"
    supercontig="1"
    />
    
  <segmentfeats 
    BAC="1"
    chromosome_arm="1"
    chromosome_band="1"
    chromosome="1"
    supercontig="1"
    golden_path_region="1"
    golden_path_fragment="1"
    golden_path="1"
    databank_scaffold="1"
    scaffold="1"
    segment="1"
    source="1"
    syntenic_region="1"
    />
  
  <!-- simplefeat == segmentfeats + others 
   -->
  <simplefeat 
    BAC="1"
    chromosome_arm="1"
    chromosome_band="1"
    chromosome="1"
    golden_path_region="1"
    golden_path_fragment="1"
    golden_path="1"
    databank_scaffold="1"
    scaffold="1"
    oligo="1" oligonucleotide="1"
    point_mutation="1"
    region="1"
    repeat_region="1"
    segment="1"
    source="1"
    transcription_start_site="1"
    orthologous_region="1"
    syntenic_region="1"
    />
    
    <!-- skipaskid is subset of simplefeat ; drop -->
  <skipaskid 
    point_mutation="1"
    region="1"
    repeat_region="1"
    pinsertion="1"
    />

  <dropname 
    transcription_start_site="1"
    mRNA_genscan="1"
    match_genscan="1"
    mRNA_piecegenie="1"
    match_piecegenie="1"
    tRNA_trnascan="1"
    match_trnascan="1"
    repeat_region="1"
    match_repeatmasker="1"
    match_blastn_na_dbEST_dpse="1"
    match_blastz="1"
    />
    
    <!-- nameisid include ones with only id => name ; similar to dropid ; NOT for gff ? -->
  <nameisid 
    BAC="1"
    chromosome_band="1"
    oligo="1" 
    oligonucleotide="1"
    />
    
  <!-- feb05: need for ESTs with same id at diff locs -->  
  <oidisid_gff 
    match_sim4_na_dbEST_same_dmel="1"
    match_sim4_na_dbEST_diff_dmel="1"
    match_sim4_na_DGC_dros="1"
    match_part_sim4_na_dbEST_same_dmel="1"
    match_part_sim4_na_dbEST_diff_dmel="1"
    match_part_sim4_na_DGC_dros="1"
    />
     
  <dropid 
    BAC="1"
    cDNA_clone="1"
    chromosome_band="1"
    EST="1"
    exon="1"
    match_part="1"
    oligo="1" oligonucleotide="1"
    processed_transcript="1"
    repeat_region="1"
    transcription_start_site="1"
    transposable_element_pred="1"
    />
    
  <dropfeat_fff 
    CDS_exon="1"
    CDS="1"
    exon="1"
    intron="1"
    remark="1"
    />
    
  <dropfeat_gff 
    CDS_exon="1"
    remark="1"
    />

    
    <!-- 
      keepstrand features:  preserve -1,0,+1 values in fff/gnomap which
      uses GenBank/EMBL feature loc syntax: 
      distinguish 0 from 1 with note: strand=0
    -->
  <keepstrand 
    pinsertion="1"
    transposable_element_insertion_site="1"
    transcription_start_site="1"
    />

  <hasdups 
    three_prime_UTR="1" 
    intron="1" 
    five_prime_UTR="1" 
    exon="1" 
    repeat_region="1"
    match_blastn_na_dbEST_dpse="1"
    />
     
    
  <maptype 
    five_prime_untranslated_region="skip"
    three_prime_untranslated_region="skip"
    CDS="skip"
    intron="skip"
    golden_path_region="supercontig"
    oligonucleotide="oligo"
    transposable_element_pred="transposable_element_pred"
    
    mRNA_genewise="mRNA:genewise"
    mRNA_twinscan="mRNA:twinscan"
    mRNA_genscan="mRNA:genscan"
    mRNA_piecegenie="mRNA:piecegenie"

    gene_genewise="gene:genewise"
    gene_twinscan="gene:twinscan"
    gene_genscan="gene:genscan"
    gene_piecegenie="gene:piecegenie"
    
    mRNA_trnascan="tRNA:trnascan"
    gene_trnascan="tRNA:trnascan"
    match_tRNAscan_SE="tRNA:trnascan"

    match_clonelocator_scaffoldBACs="BAC"
    match_part_clonelocator_scaffoldBACs="skip"

    match_bdgp_unknown_clonelocator_scaffoldBACs="BAC"
    match_part_bdgp_unknown_clonelocator_scaffoldBACs="skip"

    match_promoter="transcription_start_site"
    match_part_promoter="skip"
    
    match_locator_cytology="chromosome_band"
    match_part_locator_cytology="skip"

    match_aubrey_cytolocator_cytology="chromosome_band"
    match_part_aubrey_cytolocator_cytology="skip"
     
    match_JOSHTRANSPOSON_Sept="transposable_element_pred"
    match_repeatmasker="repeat_region"
    _repeatmasker="repeat_region"
    match_repeat_runner_seg="repeat_region"

    pinsertion="skip"
    match_sim4_na_affy_oligo_dros="oligo"
    match_dmel_r3_to_dmel_r4_migration_dmel_r3_affy_oligos="oligo"
    
    match_sim4_na_users_i_dros="skip"
    match_part_sim4_na_users_i_dros="skip"
    match_sim4_aa_users_i_dros="skip"
    match_part_sim4_aa_users_i_dros="skip"

    match_sim4_na_DGC_in_process_dros="match:sim4:na_DGC_dros"
    match_sim4_na_HDP_RNAi_dmel="match:RNAiHDP"
    match_sim4_na_HDP_mRNA_dmel="match:HDP"
    match_sim4_na_gadfly_dros_RELEASE2="match:sim4:na_gadfly_dmel_r2"
    match_sim4_na_transcript_dmel_RELEASE31="match:sim4:na_transcript_dmel_r31"
    match_sim4_na_transcript_dmel_RELEASE32="match:sim4:na_transcript_dmel_r32"
    match_tblastxwrap_na_baylorf1_scfchunk_dpse="match:tblastx:na_dpse"
    match_tblastxwrap_na_scf_chunk_agambiae_fa="match:tblastx:na_agambiae"

    match_part_sim4_na_DGC_in_process_dros="match_part:sim4:na_DGC_dros"
    match_part_sim4_na_HDP_RNAi_dmel="match_part:RNAiHDP"
    match_part_sim4_na_HDP_mRNA_dmel="match_part:HDP"
    match_part_sim4_na_gadfly_dros_RELEASE2="match_part:sim4:na_gadfly_dmel_r2"
    match_part_sim4_na_transcript_dmel_RELEASE31="match_part:sim4:na_transcript_dmel_r31"
    match_part_sim4_na_transcript_dmel_RELEASE32="match_part:sim4:na_transcript_dmel_r32"
    match_part_tblastxwrap_na_baylorf1_scfchunk_dpse="match_part:tblastx:na_dpse"
    match_part_tblastxwrap_na_scf_chunk_agambiae_fa="match_part:tblastx:na_agambiae"

    />

<!-- // test updates off //
        cDNA_match_BCM_Exonerate="cDNA_match:BCM_Exonerate"
        cDNA_match_NCBI_Splign="cDNA_match:NCBI_Splign"
        contig_Assembly_Contig="contig:Assembly_Contig"
        exon_Angerer_Genscan="exon:Angerer_Genscan"
        exon_GLEAN3="exon:GLEAN3"
        exon_NCBI_Prediction="exon:NCBI_Prediction"
        gene_Angerer_Genscan="gene:Angerer_Genscan"
        gene_NCBI_Prediction="gene:NCBI_Prediction"

        mRNA_Alignment="mRNA:Alignment"
        mRNA_BLASTN="mRNA:BLASTN"
        mRNA_Fgenesh="mRNA:Fgenesh++"
        mRNA_FgeneshAB="mRNA:FgeneshAB"
        mRNA_FirstEF="mRNA:FirstEF"
        mRNA_GLEAN3="mRNA:GLEAN3"
        mRNA_GLEAN3="mRNA:GLEAN3,"
        mRNA_GLEAN3_01262="mRNA:GLEAN3_01262"
        mRNA_GLEAN3_03704="mRNA:GLEAN3_03704"
        mRNA_GLEAN3_03860="mRNA:GLEAN3_03860"
        mRNA_GLEAN3_05973="mRNA:GLEAN3_05973"
        mRNA_GLEAN3_09520="mRNA:GLEAN3_09520"
        mRNA_GLEAN3_21837="mRNA:GLEAN3_21837"
        mRNA_GLEAN3_28547="mRNA:GLEAN3_28547"
        mRNA_Genscan="mRNA:Genscan"
        mRNA_Lv="mRNA:Lv"
        mRNA_NCBI="mRNA:NCBI"
        mRNA_NEW="mRNA:NEW"
        mRNA_Scaffold137005="mRNA:Scaffold137005"
        mRNA_Scaffold2003="mRNA:Scaffold2003"
        mRNA_Scaffold65249="mRNA:Scaffold65249"
        mRNA_cDNA="mRNA:cDNA"
        mRNA_gnomon="mRNA:gnomon"
        mRNA_homology="mRNA:homology"
        mRNA_mRNA="mRNA:mRNA"
        mRNA_missing="mRNA:missing"

        match_BCM_Exonerate="match:BCM_Exonerate"
        match_part_BCM_Exonerate="match_part:BCM_Exonerate"
        match_part_NCBI_Splign="match_part:NCBI_Splign"
        polypeptide="polypeptide"
        polypeptide_GLEAN3="polypeptide:GLEAN3"
-->

  <maptype_gff>
    <transposable_element_pred>transposable_element:predicted</transposable_element_pred>
    <match_fgenesh>match:fgenesh</match_fgenesh>
    <match_part_fgenesh>match_part:fgenesh</match_part_fgenesh>
    <match_HDP>match:HDP</match_HDP>
    <match_part_HDP>match_part:HDP</match_part_HDP>
    <match_RNAiHDP>match:RNAiHDP</match_RNAiHDP>
    <match_part_RNAiHDP>match_part:RNAiHDP</match_part_RNAiHDP>
    <mRNA_genscan>mRNA:genscan</mRNA_genscan>
    <mRNA_piecegenie>mRNA:piecegenie</mRNA_piecegenie>
    <tRNA_trnascan>tRNA:trnascan</tRNA_trnascan>

<!-- // test updates off //
        <cDNA_match_BCM_Exonerate>cDNA_match:BCM_Exonerate</cDNA_match_BCM_Exonerate>
        <cDNA_match_NCBI_Splign>cDNA_match:NCBI_Splign</cDNA_match_NCBI_Splign>
        <contig_Assembly_Contig>contig:Assembly_Contig</contig_Assembly_Contig>
        <exon_Angerer_Genscan>exon:Angerer_Genscan</exon_Angerer_Genscan>
        <exon_GLEAN3>exon:GLEAN3</exon_GLEAN3>
        <exon_NCBI_Prediction>exon:NCBI_Prediction</exon_NCBI_Prediction>
        <gene_Angerer_Genscan>gene:Angerer_Genscan</gene_Angerer_Genscan>
        <gene_NCBI_Prediction>gene:NCBI_Prediction</gene_NCBI_Prediction>

        <mRNA_Alignment>mRNA:Alignment</mRNA_Alignment>
        <mRNA_BLASTN>mRNA:BLASTN</mRNA_BLASTN>
        <mRNA_Fgenesh>mRNA:Fgenesh++</mRNA_Fgenesh>
        <mRNA_FgeneshAB>mRNA:FgeneshAB</mRNA_FgeneshAB>
        <mRNA_FirstEF>mRNA:FirstEF</mRNA_FirstEF>
        <mRNA_GLEAN3>mRNA:GLEAN3</mRNA_GLEAN3>
        <mRNA_GLEAN3>mRNA:GLEAN3,</mRNA_GLEAN3>
        <mRNA_GLEAN3_01262>mRNA:GLEAN3_01262</mRNA_GLEAN3_01262>
        <mRNA_GLEAN3_03704>mRNA:GLEAN3_03704</mRNA_GLEAN3_03704>
        <mRNA_GLEAN3_03860>mRNA:GLEAN3_03860</mRNA_GLEAN3_03860>
        <mRNA_GLEAN3_05973>mRNA:GLEAN3_05973</mRNA_GLEAN3_05973>
        <mRNA_GLEAN3_09520>mRNA:GLEAN3_09520</mRNA_GLEAN3_09520>
        <mRNA_GLEAN3_21837>mRNA:GLEAN3_21837</mRNA_GLEAN3_21837>
        <mRNA_GLEAN3_28547>mRNA:GLEAN3_28547</mRNA_GLEAN3_28547>
        <mRNA_Genscan>mRNA:Genscan</mRNA_Genscan>
        <mRNA_Lv>mRNA:Lv</mRNA_Lv>
        <mRNA_NCBI>mRNA:NCBI</mRNA_NCBI>
        <mRNA_NEW>mRNA:NEW</mRNA_NEW>
        <mRNA_Scaffold137005>mRNA:Scaffold137005</mRNA_Scaffold137005>
        <mRNA_Scaffold2003>mRNA:Scaffold2003</mRNA_Scaffold2003>
        <mRNA_Scaffold65249>mRNA:Scaffold65249</mRNA_Scaffold65249>
        <mRNA_cDNA>mRNA:cDNA</mRNA_cDNA>
        <mRNA_gnomon>mRNA:gnomon</mRNA_gnomon>
        <mRNA_homology>mRNA:homology</mRNA_homology>
        <mRNA_mRNA>mRNA:mRNA</mRNA_mRNA>
        <mRNA_missing>mRNA:missing</mRNA_missing>

        <match_BCM_Exonerate>match:BCM_Exonerate</match_BCM_Exonerate>
        <match_part_BCM_Exonerate>match_part:BCM_Exonerate</match_part_BCM_Exonerate>
        <match_part_NCBI_Splign>match_part:NCBI_Splign</match_part_NCBI_Splign>
        <polypeptide>polypeptide</polypeptide>
        <polypeptide_GLEAN3>polypeptide_GLEAN3</polypeptide_GLEAN3>
-->

  </maptype_gff>
  
  
</opt>

