<?php
/*
* config.php
* http://tasuke.dna.affrc.go.jp/
*
* Author: Jungsok Kim, Ryutaro Itoh
*
* Copyright (c) 2013 National Institute of Agrobiological Sciences   
*
*/

  // Database connection
  $db   ="";
  $host ="localhost";
  $user ="";
  $pswd ="";
  
  // Back-end database
  // Set mysql or oracle to $backend.
  // mysql: It requires php-mysql module.
  // oracle: It requires oci8 module.
  $backend="mysql";

  // Temporary directory(for Phylogenetic tree)
  $tempdir="/tmp/tasuke_tmp";

  // Whether to automatically determine if the table is divided or not?
  $autoDetectSerialTable = 0;
//  $minChrSwitchToSeacrhForm = 500;
  
  // Cache system using Redis (Beta)
  // Set "enabled" or "disabled" to $useRedis.
  $useRedis = "disabled";
  $redisHost = "localhost";
  $redisPort = 6379;
  $redisDBName = 0;
  
  // Name of reference
  $reference="Reference";

  // External link from track (Link destination URL)
  // e.g.) Set "http://tasuke.com/search?=" to $external_link and click "transcript001" on the track,
  //       link destination URL is "http://tasuke.com/search?=transcript001".
  $external_link="";
  
  // Destination tag for external link
  // This value means tag from gff file for external link url parameter.
  // If you set undefined tag to $external_link_tag_gff, it automatically sets "ID" to this value.
  $external_link_tag_gff="";
  
  //Suffix for external link
  // e.g.) Set ".html" to $external_link_suffix and click "transcript001" on the track,
  //       link destination URL is "http://tasuke.com/transcript001.html".
  $external_link_suffix="";

  // External links for each tracks
  // The value set here has priority over $external_link/$external_link_tag_gff/$external_link_suffix.
  // example:
/*
  $external_sites = array(
    'Representative genes' => array(
      'link' =>         'http://rapdb.dna.affrc.go.jp/viewer/gbrowse/irgsp1/?name=',
      'tag_gff' =>      '',
      'suffix' =>       ''
    ),
    'SSR' => array(
      'link' =>         'http://getentry.ddbj.nig.ac.jp/getentry/ddbj/',
      'tag_gff' =>      '',
      'suffix' =>       '?filetype=html'
    )
  );
*/
  $external_sites = array();
  
  // Initial name in front of chromosome name
  // usage: If $chromosome_name="chr";
  //        "01" -> "chr01"
  //        "02" -> "chr02"
  //        ..
  //        "12" -> "chr12"
  $chromosome_name="";

  //use GWAS function(default:false)
  //usage: If you use GWAS function;
  //	   phenotypeFlg = "true";
  //       If you don't use GWAS function;
  //       phenotypeFlg = "false";
  $phenotypeFlg = "false";

  // [SystemTree] use system phylogenetic tree function.
  // SystemTree function is enabled by specifying Newick or distance matrix file.
  // If both are specified, Newick will be referenced preferentially. On the AccessionManager, user can choose which one to use.
  // Sample name must be Accession ID.
  // If it is empty or the file does not exist, the function will be invalid.

  // Specify a distance matrix file in Phylip format(Lower-triangle matrices).
  // https://phylipweb.github.io/phylip/doc/distance.html
  // Perform NJ clustering every time the Accession list changes. Height is accurate, but it takes time if there are many Accessions.
  $distanceMatrixPath = "";

  // Specify a newick file.
  // Recreate the phylogenetic tree quickly by removing Accession leaves from the Newick tree instead of NJ clustering.
  $newickPath = "";

  // Do you want to display tree by default at startup?
  $systreeDefaultOn = 1;
  // By default, PHPPhylogeneticTrees(low speed) is used for clustering, but if $phylipDir/exe/neighbor(high speed) is available, it is mainly used.
  $systreeUsePhylip = 1;
  // For SystemTree ProgressBar. Characters used in progress strings.
  $systreeProgressChar = "*";
  // For SystemTree ProgressBar. Number of $systreeProgressChar to send per cycle of Phylip-neighbor.
  // The larger the number, the smoother ProgressBar, but the larger the amount of data transferred.
  $systreeProgressCharLen = 80;

  // [System/PhylipTree] Branches whose height is greater than this value will collapsed.
  // Float. Invalid if 0 or empty.
  $systreeAutoCollapseThreshold = 0;
  // What to consider for $systreeAutoCollapseThreshold. (height/ratio)
  $systreeAutoCollapseType = "height";

  // [System/PhylipTree] Other options
  // - Correction: ""/asec/pow/cdf
  $systreeCorrection = "";
  // - SortType: height or subtree
  //	height : max height of subtree
  //	subtree: number of subtree leaves
  $systreeSortType = "subtree";
  // - SortType: "" or asc or desc
  $systreeSort = "desc";
  // - TreeWidth: int
  $systreeWidth = "100";

  // Variant count file path created by "tasuke_bin/tasuke_mg_variantcount.pl".
  $variantDensPath = "PATHTO/variantcount.bin";
  $enableExportVariantDensFile = 1;

  // Admixture ID order. fam file used for ADMIXTURE. Or a file with only IDs written on each line.
  $admixtureIdListPath = "PATHTO/admixtureResult.fam";

  // Admixture result files. Set a file path for each Ancestor(K).
  // (ex:
  /*
  $admixtureK2Path = array(
     "3" => "PATHTO/admixtureResult.3.Q",
     "4" => "PATHTO/admixtureResult.4.Q",
     "5" => "PATHTO/admixtureResult.5.Q"
  );
  */
  $admixtureK2Path = array();

  $enableExportAdmixtureFiles = 1;
  $admixturColors = array("#b1997d", "#a2dbff", "#107a78", "#8ad627", "#fb0081", "#d8bbbc", "#ece27a", "#c06d50", "#9710ff", "#40a0d2",
    "#5f6bf1", "#97486f", "#4ac0a9", "#fa55d5", "#caae0d", "#e48b63", "#73a7ff", "#e05ffc", "#b4c3b4");

  // PCA eigenvec(result) file.
  $pcaVecPath = "";
  // PCA eigenval(PC score) file(optional).
  $pcaValPath = "";
  $enableExportPcaFiles = 1;
  // PCA graph size.
  $pcaGraphW = 420;
  $pcaGraphH = 460;


  //set the number of threads (default:4)
  //To set more threads , get fasta sequence and phylogenetic tree faster.
  //usage: If you use 3 threads;
  //       $threadnum = "3";
  $threadnum = "4";

  //gene id column number
  //To get geneid information on ANN/EFF information, set column number.          //If you can't get correct information on SNP detail information , change
  //correct number.
  $ANNcol = 6;
  //$EFFcol = 7; //for older snpEff annotation
  $EFFcol = 8;

  //set id or name and subtitle(default:id and variety)
  //usage1:you can choose for showing as default title as below:
  //      $title = "id";
  //      $title = "name";
  //      if you choose nothing,id shows for default title.
  //usage2:you can choose for showing as default subtitle as below:
  //      $subtitle = "id"
  //      $subtitle = "name"
  //      $subtitle = "variety"
  //      $subtitle = "subvariety"
  //      $subtitle = "origin"
  //      $subtitle = "origin_2"
  //      $subtitle = "type"
  //      $subtitle = "other_1"
  //      $subtitle = "other_2"
  //      if you choose nothing,variety shows for default subtitle.
  $title = "";
  $subtitle = "";

  // Primer3
  $primer3Path="/PATH/primer3_core";
  $primer3ThermPath="/PATH/primer3_config/";
  
  // PHYLIP directory (does not include the "exe" subdirectory)
  $phylipDir="/PATH/";

  // makeBinaryDistanceMatrix program path
  // This program is included in the TASUKE+ package(tasuke_bin/converter/makeBinaryDistanceMatrix).
  // Copy it to a directory that is executable by the www user and set the file path below.
  $makeBinaryDistanceMatrixPath = "";

  // For MFEprimer3
  // MFEprimer3 path
  $MFE3path="/PATH/mfeprimer-3.x.x-linux-amd64";
  // MFEprimer3 database fasta path
  $MFE3DBpath="/PATH/reference.fasta";

  // "$MFEpath" and "$MFEDBpath" below are old settings for MFEprimer2 (with Python2). Usually use those for MFEprimer3 above.

  // [Old version]For MFEprimer2
  // MFEprimer2 path
  $MFEpath="/PATH/MFEprimer.py";
  // MFEprimer2 database fasta path
  $MFEDBpath="/PATH/reference.fasta";

  //BLAST PATH
  // Specify blastn or its directory path. tblastn and tblastx are automatically searched from $blastPath.
  $blastPath="/PATH/bin/blastn";

  //BLASTDB PATH(with reference name)
  //Set the DB file created by makeblastdb with "-parse_seqids" option.
  $blastDBPath="/PATH/reference.fasta";

  //Use TBLASTX (Default:off)
  //tblastx has a high server load. Also, due to the large data size of the result, 
  // it may not be possible to store the history to WebStorage (an error will occur).
  // (Even in that case, browsing can be continued)
  $useTblastx = 0;
 
  // Maximum level of zoom for viewing each nucleotide
  //$nuc_max="4k";
  $nuc_max="100k";
  
  // Custom track 
  // Visualizing BAM, BED and BEDGrpah (RNA-seq read depth, CHIP-seq, BS-seq...)
  // Set "enabled" or "disabled" to $customTrack.
  $customTrack="disabled";
  
  //Track name for menu
  $customTrackName = "CustomTrack";
  
  //Kind of data name (Unit)
  $customTrackKindofData = "Value";
  
  //Normalizing based on number of read or not
  //It normalizes a value using header value of TSV file. It is useful for RNA-seq data.
  // Set "enabled" or "disabled" to $customTrackNormByRead.
  $customTrackNormByRead="disabled";
  
  // Condition name of the general purpose track that is used when viewing multiple condition. 
  $defaultCond = "";
  
  // Change color depth for custom track.
  $cstm_max=100;
  $cstm_min=0;
  
  // Canvas width for accession ids and groups
  // $title_id_width_rate is the percentage of $accession_cvs_width used to display title(ID).
  $accession_cvs_width=160;
  $title_id_width_rate = 0.55;
  
  //Set any color to each accession groups(variety, sub varienty, origin, type).
  //Set "enabled" or "disabled" to $color_acc_group
  $color_acc_group="disabled";

  // Preset colors for each accession groups.
  // Color formatting is CSS compliant. (ex. "#ee0077", "blue")
  // You can change array length. If it extends, the color will loop.
  // * Legacy TASUKE preset: ("#fa8f8f","#ffc125","#df7fb5","#8ad1a9","#56b4e9","#eee8aa","#7fffd4","#FFFF00");
  $color_acc_group_preset = array("#ee0077","#ffff33","#550000","#00aaee","#112288","#ff9900","#990088","#009944","#aa3311","#0077aa");

  // You can specify accession group-specific colors.
  // The specification method is as follows.
  // $color_acc_group_color[subtitle][group] = color
  // * subtitle:        id, name, variety, subvariety, origin, origin_2, type, other_1, other_2
  // * group:   (depending on your accession information)
  // * color:   CSS compliant (ex. "#ee0077", "blue")
/* // ex.
  $color_acc_group_color = array(
    'variety' => array(
      'TEJ' => 'blue',
      'TRJ' => '#000000',
      'JP' => 'red'
     ),
     'subvariety' => array(
       'Elite' => 'green',
       '-' => 'gray',
       'Landrace' => 'purple'
     ),
     'other_2' => array(
       '-' => 'yellow'
     )
  );
*/
  $color_acc_group_color = array();
 
  //Color definition
  //Set hex formatted value.
  //e.g.) $snp_max_col="#00FF00";
  //Color for maximum of SNP count
  $snp_max_col="#00FFFF";
  //Color for minimum of SNP count
  $snp_min_col="#F0F8FF";
  //Color for maximum of INDEL count
  $indel_max_col="#A52A2A";
  //Color for minimum of INDEL count
  $indel_min_col="#FFCB8E";
  //Color for maximum of DEPTH value
  $depth_max_col="#00000F";
  //Color for minimum of DEPTH value
  $depth_min_col="#F0F0F4";
  //Color for maximum of custom track value
  $cstm_max_col="#A229B8";
  //Color for minimum of custom track value
  $cstm_min_col="#F5E9F7";
  //Color for maximum and minimum of custom track value when multiple conditions were enabled.
  $cstm_max_col_para1="#77ab42";
  $cstm_min_col_para1="#f1f6ec";
  $cstm_max_col_para2="#a13b4b";
  $cstm_min_col_para2="#f5ebed";
  $cstm_max_col_para3="#1a5dd9";
  $cstm_min_col_para3="#e8eefb";
  
  // Maximum of depth value in display
  $depth_max=140;
  $depth_min=0;
  
  // Maximum of SNP count by each level of zoom
  $snp_100k=1000;
  $snp_90k=900;
  $snp_80k=800;
  $snp_70k=700;
  $snp_60k=600;
  $snp_50k=500;
  $snp_40k=400;
  $snp_30k=300;
  $snp_20k=200;
  $snp_10k=100;
  $snp_9k=90;
  $snp_8k=80;
  $snp_7k=70;
  $snp_6k=60;
  $snp_5k=50;
  $snp_4k=40;
  $snp_3k=30;
  $snp_2k=20;
  $snp_1k=10;
  $snp_900b=9;
  $snp_800b=8;
  $snp_700b=7;
  $snp_600b=6;
  $snp_500b=5;
  $snp_400b=4;
  $snp_300b=3;
  $snp_200b=2;
  $snp_100b=1;
  $snp_90b=1;
  $snp_80b=1;
  $snp_70b=1;
  $snp_60b=1;
  $snp_50b=1;
  $snp_40b=1;
  $snp_30b=1;
  $snp_20b=1;
  $snp_10b=1;
  $snp_9b=1;
  $snp_8b=1;
  $snp_7b=1;
  $snp_6b=1;
  $snp_5b=1;
  $snp_4b=1;
  $snp_3b=1;
  $snp_2b=1;
  $snp_1b=1;
  $snp_min=1;
  
  
  // Maximum of INDEL count by each level of zoom
  $indel_100k=100;
  $indel_90k=90;
  $indel_80k=80;
  $indel_70k=70;
  $indel_60k=60;
  $indel_50k=50;
  $indel_40k=40;
  $indel_30k=30;
  $indel_20k=20;
  $indel_10k=10;
  $indel_9k=6;
  $indel_8k=6;
  $indel_7k=6;
  $indel_6k=6;
  $indel_5k=6;
  $indel_4k=3;
  $indel_3k=3;
  $indel_2k=3;
  $indel_1k=3;
  $indel_900b=1;
  $indel_800b=1;
  $indel_700b=1;
  $indel_600b=1;
  $indel_500b=1;
  $indel_400b=1;
  $indel_300b=1;
  $indel_200b=1;
  $indel_100b=1;
  $indel_90b=1;
  $indel_80b=1;
  $indel_70b=1;
  $indel_60b=1;
  $indel_50b=1;
  $indel_40b=1;
  $indel_30b=1;
  $indel_20b=1;
  $indel_10b=1;
  $indel_9b=1;
  $indel_8b=1;
  $indel_7b=1;
  $indel_6b=1;
  $indel_5b=1;
  $indel_4b=1;
  $indel_3b=1;
  $indel_2b=1;
  $indel_1b=1;
  $indel_min=1;

  // Placeholder for search form
  $placeholder_topsearch = "eg.Os01g0100100-01,chr01:1-100";
  $placeholder_possearch = "eg. chr01:1-100";
  $placeholder_kwsearch = "(eg. Os01g0100100-01)";

  // Codon table used for AA translation of the "export FASTA" function.
  // The following values can be specified. Default is "standard".
  // standard, bacteria, plastid, protozoa, mold, mycoplasma, spiroplasma, ciliate
  // * [standard, bacteria, plastid] and  [protozoa, mold, mycoplasma, spiroplasma] are each the same table.
  $codontable_type = "";

  // You can set the genome region to display by default.
  // "chr" and "start" are required.
  // "blocksize" and "end" conflict, with "end" taking precedence. If these are not specified, the default is "blocksize=1k".
  // [!!!Warning!!!] Since the "start" and "end" positions are automatically changed according to the number of blocks and "blocksize", they may deviate greatly from the specified positions.
  // chr:       Chromosome/Contig name registered in the DB (excluding prefix(=$chromosome_name))
  // start:     Starting position on the genome.
  // end:       end position on the genome.
  // blocksize: Default is "1k". Please specify one of the following.(1b=1bp, 1k=1000bp)
  // 1b/2b/3b/4b/5b/6b/7b/8b/9b/10b/20b/30b/40b/50b/60b/70b/80b/90b/100b/200b/300b/400b/500b/600b/700b/800b/900b/1k/2k/3k/4k/5k/6k/7k/8k/9k/10k/20k/30k/40k/50k/60k/70k/80k/90k/100k
  // ex1. array("chr"=>"chr02","start"=>"365001");
  // ex2. array("chr"=>"chr02","start"=>"365001","end"=>"465000");
  // ex3. array("chr"=>"chr02","start"=>"365001", "blocksize"=>"1k");
  $default_position = array("chr"=>"", "start"=>"");

  // GUI type of Acc list in AccessionManager.
  // standard(default)/legacy
  $accmanager_list_type = "standard";
?>
