Commit 81847a39 authored by Saira Hussain's avatar Saira Hussain 💬
Browse files

Remove superfluous files

parent 5c7b4b4a
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
/* This is an example HY-PHY Batch File.



   It reads in a '#' nucleotide dataset data/hiv.nuc and estimates

   maximum ln-likelihood based on the tree contained in the data file,

   using Felsenstein 81 model.

   

   Output is printed out as a Newick Style tree with branch lengths

   representing the number of expected substitutions per branch (which

   is the default setting for nucleotide models w/o rate variation).

   

   

   Sergei L. Kosakovsky Pond and Spencer V. Muse 

   December 1999. 

*/

/* 1. Read in the data and store the result in a DataSet variable.*/

DataSet 		nucleotideSequences = ReadDataFile ("data/hiv.nuc");


/* 2. Filter the data, specifying that all of the data is to be used
	  and that it is to be treated as nucleotides.*/
	 
DataSetFilter	filteredData = CreateFilter (nucleotideSequences,1);

/* 3. Collect observed nucleotide frequencies from the filtered data. observedFreqs will
	  store the vector of frequencies. */

HarvestFrequencies (observedFreqs, filteredData, 1, 1, 1);

/* 4. Define the F81 substitution matrix. '*' is defined to be -(sum of off-diag row elements) */

F81RateMatrix = 
		{{*,mu,mu,mu}
		 {mu,*,mu,mu}
		 {mu,mu,*,mu}
		 {mu,mu,mu,*}};

/*5.  Define the F81 models, by combining the substitution matrix with the vector of observed (equilibrium)
	  frequencies. */
	  

Model 	F81 = (F81RateMatrix, observedFreqs);

/*6.  Now we can define the tree variable, using the tree string read from the data file,
	  and, by default, assigning the last defined model (F81) to all tree branches. */

Tree	givenTree = DATAFILE_TREE;


/*7.  Since all the likelihood function ingredients (data, tree, equilibrium frequencies)
	  have been defined we are ready to construct the likelihood function. */

LikelihoodFunction  theLnLik = (filteredData, givenTree);

/*8.  Maximize the likelihood function, storing parameter values in the matrix paramValues */

Optimize (paramValues, theLnLik);

/*9.  Print the tree with optimal branch lengths to the console. */

fprintf  (stdout, theLnLik);
 No newline at end of file
+0 −1
Original line number Diff line number Diff line
/* This is an example HY-PHY Batch File.

   It reads in a '#' nucleotide dataset data/hiv.nuc and estimates
   maximum ln-likelihood based on the tree contained in the data file,
   using Hasegawa et all 85 (HKY 85) model with transition/transversion ratio
   estimated independently for all branches.

   

   Output is printed out as a Newick Style tree with branch lengths
   representing the number of expected substitutions per branch (which
   is the default setting for nucleotide models w/o rate variation).

   Sergei L. Kosakovsky Pond and Spencer V. Muse 
   December 1999. 
*/


/* 1. Read in the data and store the result in a DataSet variable.*/

DataSet 		nucleotideSequences = ReadDataFile ("data/hiv.nuc");

/* 2. Filter the data, specifying that all of the data is to be used
	  and that it is to be treated as nucleotides.*/

DataSetFilter	filteredData = CreateFilter (nucleotideSequences,1);

/* 3. Collect observed nucleotide frequencies from the filtered data. observedFreqs will
	  store the vector of frequencies. */

HarvestFrequencies (observedFreqs, filteredData, 1, 1, 1);

/* 4. Define the KHY substitution matrix. '*' is defined to be -(sum of off-diag row elements) */

HKY85RateMatrix = 

		{{*,trvs,trst,trvs}
		 {trvs,*,trvs,trst}
		 {trst,trvs,*,trvs}
		 {trvs,trst,trvs,*}};

/*5.  Define the HKY85 model, by combining the substitution matrix with the vector of observed (equilibrium)
	  frequencies. */

Model HKY85	 = (HKY85RateMatrix, observedFreqs);

/*6.  Now we can define the tree variable, using the tree string read from the data file,
	  and, by default, assigning the last defined model (HKY85) to all tree branches. */

Tree	givenTree = DATAFILE_TREE;

/*7.  Since all the likelihood function ingredients (data, tree, equilibrium frequencies)
	  have been defined we are ready to construct the likelihood function. */

LikelihoodFunction  theLnLik = (filteredData, givenTree);

/*8.  Maximize the likelihood function, storing parameter values in the matrix paramValues */

Optimize (paramValues, theLnLik);

/*9.  Print the tree with optimal branch lengths to the console. */

fprintf  (stdout, theLnLik);


   
 No newline at end of file
+0 −1
Original line number Diff line number Diff line
/* This is an example HY-PHY Batch File.



   It reads in a '#' nucleotide dataset data/hiv.nuc and estimates

   maximum ln-likelihood based on the tree contained in the data file,

   using Hasegawa et all 85 (HKY 85) model with transition/transversion ratio

   shared by all branches.

   

   Output is printed out as a Newick Style tree with branch lengths

   representing the number of expected substitutions per branch (which

   is the default setting for nucleotide models w/o rate variation).

   

   

   Sergei L. Kosakovsky Pond and Spencer V. Muse 

   December 1999. 

*/



/* 1. Read in the data and store the result in a DataSet variable.*/



DataSet 		nucleotideSequences = ReadDataFile ("data/hiv.nuc");

   

/* 2. Filter the data, specifying that all of the data is to be used

	  and that it is to be treated as nucleotides.*/

	  

DataSetFilter	filteredData = CreateFilter (nucleotideSequences,1);



/* 3. Collect observed nucleotide frequencies from the filtered data. observedFreqs will

	  store the vector of frequencies. */



HarvestFrequencies (observedFreqs, filteredData, 1, 1, 1);



/* 4. Define the KHY substitution matrix. '*' is defined to be -(sum of off-diag row elements).

	  The variable R is the global transition/transversion ratio.  */



global   R;



HKY85RateMatrix = 

		{{*,trvs,R*trvs,trvs}

		 {trvs,*,trvs,R*trvs}

		 {R*trvs,trvs,*,trvs}

		 {trvs,R*trvs,trvs,*}};

		 

/*5.  Define the HKY85 model, by combining the substitution matrix with the vector of observed (equilibrium)

	  frequencies. */

	  

Model HKY85	 = (HKY85RateMatrix, observedFreqs);



/*6.  Now we can define the tree variable, using the tree string read from the data file,

	  and, by default, assigning the last defined model (HKY85) to all tree branches. */

	  

Tree	givenTree = DATAFILE_TREE;



/*7.  Since all the likelihood function ingredients (data, tree, equilibrium frequencies)

	  have been defined we are ready to construct the likelihood function. */

	  

LikelihoodFunction  theLnLik = (filteredData, givenTree);



/*8.  Maximize the likelihood function, storing parameter values in the matrix paramValues */



Optimize (paramValues, theLnLik);



/*9.  Print the tree with optimal branch lengths to the console. */



fprintf  (stdout, theLnLik);

		 

   
 No newline at end of file
+0 −1
Original line number Diff line number Diff line
/* This is an example HY-PHY Batch File.



   It reads in a '#' nucleotide dataset data/hiv.nuc and estimates

   maximum ln-likelihood based on the tree contained in the data file,

   using Jukes Cantor 69 model.

   

   Output is printed out as a Newick Style tree with branch lengths

   representing the number of expected substitutions per branch (which

   is the default setting for nucleotide models w/o rate variation).

   

   

   Sergei L. Kosakovsky Pond and Spencer V. Muse 

   December 1999. 

*/



/* 1. Read in the data and store the result in a DataSet variable.*/



DataSet 		nucleotideSequences = ReadDataFile ("data/hiv.nuc");

   

/* 2. Filter the data, specifying that all of the data is to be used

	  and that it is to be treated as nucleotides.*/

	  

DataSetFilter	filteredData = CreateFilter (nucleotideSequences,1);



/* 3. Define the F81 substitution matrix. '*' is defined to be -(sum of off-diag row elements) */



JC69RateMatrix = 

		{{*,mu,mu,mu}

		 {mu,*,mu,mu}

		 {mu,mu,*,mu}

		 {mu,mu,mu,*}};

		 

/*4.  Define the F81 models, by combining the substitution matrix with the vector of equal equilibrim

	  frequencies. */



equalFreqs = {{.25}{.25}{.25}{.25}};



Model 	F81 = (JC69RateMatrix, equalFreqs);



/*5.  Now we can define the tree variable, using the tree string read from the data file,

	  and, by default, assigning the last defined model (JC69) to all tree branches. */

	  

Tree	givenTree = DATAFILE_TREE;



/*6.  Since all the likelihood function ingredients (data, tree, equilibrium frequencies)

	  have been defined we are ready to construct the likelihood function. */

	  

LikelihoodFunction  theLnLik = (filteredData, givenTree);



/*7.  Maximize the likelihood function, storing parameter values in the matrix paramValues */



Optimize (paramValues, theLnLik);



/*8.  Print the tree with optimal branch lengths to the console. */



fprintf  (stdout, theLnLik);

		 

   
 No newline at end of file
+0 −1
Original line number Diff line number Diff line
/* This is an example HY-PHY Batch File.



   It reads in a '#' nucleotide dataset data/hiv.nuc and estimates

   maximum ln-likelihood based on the tree contained in the data file,

   using Kimura 2 parameter model with transition/transversion ratio

   estimated independently for all branches.

   

   Output is printed out as a Newick Style tree with branch lengths

   representing the number of expected substitutions per branch (which

   is the default setting for nucleotide models w/o rate variation).

   

   

   Sergei L. Kosakovsky Pond and Spencer V. Muse 

   December 1999. 

*/



/* 1. Read in the data and store the result in a DataSet variable.*/



DataSet 		nucleotideSequences = ReadDataFile ("data/hiv.nuc");

   

/* 2. Filter the data, specifying that all of the data is to be used

	  and that it is to be treated as nucleotides.*/

	  

DataSetFilter	filteredData = CreateFilter (nucleotideSequences,1);



/* 3. Define the K2P substitution matrix. '*' is defined to be -(sum of off-diag row elements) */



K2PRateMatrix = 

		{{*,trvs,trst,trvs}

		 {trvs,*,trvs,trst}

		 {trst,trvs,*,trvs}

		 {trvs,trst,trvs,*}};

		 

/*4.  Define the K2P model, by combining the substitution matrix with the vector of equal equilibrium

	  frequencies. */

	  

equalFreqs = {{.25}{.25}{.25}{.25}}; 



Model K2P	 = (K2PRateMatrix, equalFreqs);



/*5.  Now we can define the tree variable, using the tree string read from the data file,

	  and, by default, assigning the last defined model (K2P) to all tree branches. */

	  

Tree	givenTree = DATAFILE_TREE;



/*6.  Since all the likelihood function ingredients (data, tree, equilibrium frequencies)

	  have been defined we are ready to construct the likelihood function. */

	  

LikelihoodFunction  theLnLik = (filteredData, givenTree);



/*7.  Maximize the likelihood function, storing parameter values in the matrix paramValues */



Optimize (paramValues, theLnLik);



/*8.  Print the tree with optimal branch lengths to the console. */



fprintf  (stdout, theLnLik);

		 

   
 No newline at end of file
Loading