亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? trees.c

?? 生物序列比對程序clustw的源代碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* Phyle of filogenetic tree calculating functions for CLUSTAL W *//* DES was here  FEB. 1994 */#include <stdio.h>#include <string.h>#include <stdlib.h>#include <math.h>#include "clustalw.h"#include "dayhoff.h"    /* set correction for amino acid distances >= 75% *//* *   Prototypes */Boolean transition(sint base1, sint base2);void tree_gap_delete(void);void distance_matrix_output(FILE *ofile);void nj_tree(char **tree_description, FILE *tree);void compare_tree(char **tree1, char **tree2, sint *hits, sint n);void print_phylip_tree(char **tree_description, FILE *tree, sint bootstrap);void print_nexus_tree(char **tree_description, FILE *tree, sint bootstrap);sint two_way_split(char **tree_description, FILE *tree, sint start_row, sint flag, sint bootstrap);sint two_way_split_nexus(char **tree_description, FILE *tree, sint start_row, sint flag, sint bootstrap);void print_tree(char **tree_description, FILE *tree, sint *totals);static Boolean is_ambiguity(char c);static void overspill_message(sint overspill,sint total_dists);/* *   Global variables */extern sint max_names;extern double **tmat;     /* general nxn array of reals; allocated from main */                          /* this is used as a distance matrix */extern Boolean dnaflag;   /* TRUE for DNA seqs; FALSE for proteins */extern Boolean tossgaps;  /* Ignore places in align. where ANY seq. has a gap*/extern Boolean kimura;    /* Use correction for multiple substitutions */extern Boolean output_tree_clustal;   /* clustal text output for trees */extern Boolean output_tree_phylip;    /* phylip nested parentheses format */extern Boolean output_tree_distances; /* phylip distance matrix */extern Boolean output_tree_nexus;     /* nexus format tree */extern Boolean output_pim;     /* perc identity matrix output Ramu */extern sint    bootstrap_format;      /* bootstrap file format */extern Boolean empty;                 /* any sequences in memory? */extern Boolean usemenu;   /* interactive (TRUE) or command line (FALSE) */extern sint nseqs;extern sint max_aln_length;extern sint *seqlen_array; /* the lengths of the sequences */extern char **seq_array;   /* the sequences */extern char **names;       /* the seq. names */extern char seqname[];		/* name of input file */extern sint gap_pos1,gap_pos2;extern Boolean use_ambiguities;extern char *amino_acid_codes;static double 	*av;static double 	*left_branch, *right_branch;static double 	*save_left_branch, *save_right_branch;static sint	*boot_totals;static sint 	*tkill;/*    The next line is a fossil from the days of using the cc ran()static int 	ran_factor;*/static sint 	*boot_positions;static FILE 	*phylip_phy_tree_file;static FILE 	*clustal_phy_tree_file;static FILE 	*distances_phy_tree_file;static FILE 	*nexus_phy_tree_file;static FILE     *pim_file; /* Ramu */static Boolean 	verbose;static char 	*tree_gaps;static sint first_seq, last_seq;                     /* array of weights; 1 for use this posn.; 0 don't */extern sint boot_ntrials;		/* number of bootstrap trials */extern unsigned sint boot_ran_seed;	/* random number generator seed */void phylogenetic_tree(char *phylip_name,char *clustal_name,char *dist_name, char *nexus_name, char *pim_name)/*    Calculate a tree using the distances in the nseqs*nseqs array tmat.   This is the routine for getting the REAL trees after alignment.*/{	char path[FILENAMELEN+1];	sint i, j;	sint overspill = 0;	sint total_dists;	static char **standard_tree;	static char **save_tree;	char lin2[10];	if(empty) {		error("You must load an alignment first");		return;	}	if(nseqs<2) {		error("Alignment has only %d sequences",nseqs);		return;	}	first_seq=1;	last_seq=nseqs;	get_path(seqname,path);	if(output_tree_clustal) {        if (clustal_name[0]!=EOS) {                if((clustal_phy_tree_file = open_explicit_file(                clustal_name))==NULL) return;        }        else {		if((clustal_phy_tree_file = open_output_file(		"\nEnter name for CLUSTAL    tree output file  ",path,		clustal_name,"nj")) == NULL) return;        }}if(output_tree_phylip) {        if (phylip_name[0]!=EOS) {                if((phylip_phy_tree_file = open_explicit_file(                phylip_name))==NULL) return;        }        else {                 if((phylip_phy_tree_file = open_output_file(		"\nEnter name for PHYLIP     tree output file  ",path,                phylip_name,"ph")) == NULL) return;        }}if(output_tree_distances){        if (dist_name[0]!=EOS) {                if((distances_phy_tree_file = open_explicit_file(                dist_name))==NULL) return;        }        else {		if((distances_phy_tree_file = open_output_file(		"\nEnter name for distance matrix output file  ",path,		dist_name,"dst")) == NULL) return;        }}if(output_tree_nexus){        if (nexus_name[0]!=EOS) {                if((nexus_phy_tree_file = open_explicit_file(                nexus_name))==NULL) return;        }        else {		if((nexus_phy_tree_file = open_output_file(		"\nEnter name for NEXUS tree output file  ",path,		nexus_name,"tre")) == NULL) return;        }}if(output_pim){        if (pim_name[0]!=EOS) {        	if((pim_file = open_explicit_file(		pim_name))==NULL) return;      }      else {        	if((pim_file = open_output_file(		"\nEnter name for % Identity matrix output file  ",path,                pim_name,"pim")) == NULL) return;      }}	boot_positions = (sint *)ckalloc( (seqlen_array[first_seq]+2) * sizeof (sint) );	for(j=1; j<=seqlen_array[first_seq]; ++j) 		boot_positions[j] = j;			if(output_tree_clustal) {		verbose = TRUE;     /* Turn on file output */		if(dnaflag)			overspill = dna_distance_matrix(clustal_phy_tree_file);		else 			overspill = prot_distance_matrix(clustal_phy_tree_file);	}	if(output_tree_phylip) {		verbose = FALSE;     /* Turn off file output */		if(dnaflag)			overspill = dna_distance_matrix(phylip_phy_tree_file);		else 			overspill = prot_distance_matrix(phylip_phy_tree_file);	}	if(output_tree_nexus) {		verbose = FALSE;     /* Turn off file output */		if(dnaflag)			overspill = dna_distance_matrix(nexus_phy_tree_file);		else 			overspill = prot_distance_matrix(nexus_phy_tree_file);	}        if(output_pim) { /* Ramu  */          	verbose = FALSE;     /* Turn off file output */          	if(dnaflag)           		calc_percidentity(pim_file);          	else            		calc_percidentity(pim_file);        }	if(output_tree_distances) {		verbose = FALSE;     /* Turn off file output */		if(dnaflag)			overspill = dna_distance_matrix(distances_phy_tree_file);		else 			overspill = prot_distance_matrix(distances_phy_tree_file);      		distance_matrix_output(distances_phy_tree_file);	}/* check if any distances overflowed the distance corrections */	if ( overspill > 0 ) {		total_dists = (nseqs*(nseqs-1))/2;		overspill_message(overspill,total_dists);	}	if(output_tree_clustal) verbose = TRUE;     /* Turn on file output */	standard_tree   = (char **) ckalloc( (nseqs+1) * sizeof (char *) );	for(i=0; i<nseqs+1; i++) 		standard_tree[i]  = (char *) ckalloc( (nseqs+1) * sizeof(char) );	save_tree   = (char **) ckalloc( (nseqs+1) * sizeof (char *) );	for(i=0; i<nseqs+1; i++) 		save_tree[i]  = (char *) ckalloc( (nseqs+1) * sizeof(char) );	if(output_tree_clustal || output_tree_phylip || output_tree_nexus) 		nj_tree(standard_tree,clustal_phy_tree_file);	for(i=1; i<nseqs+1; i++) 		for(j=1; j<nseqs+1; j++) 			save_tree[i][j]  = standard_tree[i][j];	if(output_tree_phylip) 		print_phylip_tree(standard_tree,phylip_phy_tree_file,0);	for(i=1; i<nseqs+1; i++) 		for(j=1; j<nseqs+1; j++) 			standard_tree[i][j]  = save_tree[i][j];	if(output_tree_nexus) 		print_nexus_tree(standard_tree,nexus_phy_tree_file,0);/*	print_tree(standard_tree,phy_tree_file);*/	tree_gaps=ckfree((void *)tree_gaps);	boot_positions=ckfree((void *)boot_positions);	if (left_branch != NULL) left_branch=ckfree((void *)left_branch);	if (right_branch != NULL) right_branch=ckfree((void *)right_branch);	if (tkill != NULL) tkill=ckfree((void *)tkill);	if (av != NULL) av=ckfree((void *)av);	for (i=0;i<nseqs+1;i++)		standard_tree[i]=ckfree((void *)standard_tree[i]);	standard_tree=ckfree((void *)standard_tree);	for (i=0;i<nseqs+1;i++)		save_tree[i]=ckfree((void *)save_tree[i]);	save_tree=ckfree((void *)save_tree);if(output_tree_clustal) {	fclose(clustal_phy_tree_file);		info("Phylogenetic tree file created:   [%s]",clustal_name);}if(output_tree_phylip) {	fclose(phylip_phy_tree_file);		info("Phylogenetic tree file created:   [%s]",phylip_name);}if(output_tree_distances) {	fclose(distances_phy_tree_file);		info("Distance matrix  file  created:   [%s]",dist_name);}if(output_tree_nexus) {	fclose(nexus_phy_tree_file);		info("Nexus tree file  created:   [%s]",nexus_name);}if(output_pim) {	fclose(pim_file);	info(" perc identity matrix file  created:   [%s]",pim_name);}}static void overspill_message(sint overspill,sint total_dists){	char err_mess[1024]="";	sprintf(err_mess,"%d of the distances out of a total of %d",	(pint)overspill,(pint)total_dists);	strcat(err_mess,"\n were out of range for the distance correction.");	strcat(err_mess,"\n");	strcat(err_mess,"\n SUGGESTIONS: 1) remove the most distant sequences");	strcat(err_mess,"\n           or 2) use the PHYLIP package");	strcat(err_mess,"\n           or 3) turn off the correction.");	strcat(err_mess,"\n Note: Use option 3 with caution! With this degree");	strcat(err_mess,"\n of divergence you will have great difficulty");	strcat(err_mess,"\n getting robust and reliable trees.");	strcat(err_mess,"\n\n");	warning(err_mess);}Boolean transition(sint base1, sint base2) /* TRUE if transition; else FALSE *//*    assumes that the bases of DNA sequences have been translated as   a,A = 0;   c,C = 1;   g,G = 2;   t,T,u,U = 3;  N = 4;     a,A = 0;   c,C = 2;   g,G = 6;   t,T,u,U =17;     A <--> G  and  T <--> C  are transitions;  all others are transversions.*/{	if( ((base1 == 0) && (base2 == 6)) || ((base1 == 6) && (base2 == 0)) )		return TRUE;                                     /* A <--> G */	if( ((base1 ==17) && (base2 == 2)) || ((base1 == 2) && (base2 ==17)) )		return TRUE;                                     /* T <--> C */    return FALSE;}void tree_gap_delete(void)   /* flag all positions in alignment that have a gap */{			  /* in ANY sequence */	sint seqn;	sint posn;	tree_gaps = (char *)ckalloc( (max_aln_length+1) * sizeof (char) );        	for(posn=1; posn<=seqlen_array[first_seq]; ++posn) {		tree_gaps[posn] = 0;     	for(seqn=1; seqn<=last_seq-first_seq+1; ++seqn)  {			if((seq_array[seqn+first_seq-1][posn] == gap_pos1) ||			   (seq_array[seqn+first_seq-1][posn] == gap_pos2)) {			   tree_gaps[posn] = 1;				break;			}		}	}}void distance_matrix_output(FILE *ofile){	sint i,j;		fprintf(ofile,"%6d",(pint)last_seq-first_seq+1);	for(i=1;i<=last_seq-first_seq+1;i++) {		fprintf(ofile,"\n%-*s ",max_names,names[i]);		for(j=1;j<=last_seq-first_seq+1;j++) {			fprintf(ofile,"%6.3f ",tmat[i][j]);			if(j % 8 == 0) {				if(j!=last_seq-first_seq+1) fprintf(ofile,"\n"); 				if(j != last_seq-first_seq+1 ) fprintf(ofile,"          ");			}		}	}}#ifdef ORIGINAL_NJ_TREEvoid nj_tree(char **tree_description, FILE *tree){	register int i;	sint l[4],nude,k;	sint nc,mini,minj,j,ii,jj;	double fnseqs,fnseqs2=0,sumd;	double diq,djq,dij,d2r,dr,dio,djo,da;	double tmin,total,dmin;	double bi,bj,b1,b2,b3,branch[4];	sint typei,typej;             /* 0 = node; 1 = OTU */		fnseqs = (double)last_seq-first_seq+1;/*********************** First initialisation ***************************/		if(verbose)  {		fprintf(tree,"\n\n\t\t\tNeighbor-joining Method\n");		fprintf(tree,"\n Saitou, N. and Nei, M. (1987)");		fprintf(tree," The Neighbor-joining Method:");		fprintf(tree,"\n A New Method for Reconstructing Phylogenetic Trees.");		fprintf(tree,"\n Mol. Biol. Evol., 4(4), 406-425\n");		fprintf(tree,"\n\n This is an UNROOTED tree\n");		fprintf(tree,"\n Numbers in parentheses are branch lengths\n\n");	}		if (fnseqs == 2) {		if (verbose) fprintf(tree,"Cycle   1     =  SEQ:   1 (%9.5f) joins  SEQ:   2 (%9.5f)",tmat[first_seq][first_seq+1],tmat[first_seq][first_seq+1]);		return;	}	mini = minj = 0;	left_branch 	= (double *) ckalloc( (nseqs+2) * sizeof (double)   );	right_branch    = (double *) ckalloc( (nseqs+2) * sizeof (double)   );	tkill 		= (sint *) ckalloc( (nseqs+1) * sizeof (sint) );	av   		= (double *) ckalloc( (nseqs+1) * sizeof (double)   );	for(i=1;i<=last_seq-first_seq+1;++i) 		{		tmat[i][i] = av[i] = 0.0;		tkill[i] = 0;		}/*********************** Enter The Main Cycle ***************************/ /*	for(nc=1; nc<=(last_seq-first_seq+1-3); ++nc) {  */            	/**start main cycle**/	for(nc=1; nc<=(last_seq-first_seq+1-3); ++nc) {		sumd = 0.0;		for(j=2; j<=last_seq-first_seq+1; ++j)			for(i=1; i<j; ++i) {				tmat[j][i] = tmat[i][j];				sumd = sumd + tmat[i][j];			}		tmin = 99999.0;/*.................compute SMATij values and find the smallest one ........*/		for(jj=2; jj<=last_seq-first_seq+1; ++jj) 			if(tkill[jj] != 1) 				for(ii=1; ii<jj; ++ii)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人av资源网站| 久久久亚洲高清| 秋霞午夜鲁丝一区二区老狼| 日韩一级黄色大片| 蜜乳av一区二区| 中文成人av在线| 久久精品国产久精国产| 亚洲一区二区在线播放相泽| 国产精品夜夜嗨| 欧美一区二区三区在线视频| 亚洲午夜精品17c| 国产精品123| 欧美变态口味重另类| 亚洲大片精品永久免费| 免费在线看成人av| 中文字幕乱码亚洲精品一区| 在线播放/欧美激情| 成人avav在线| 韩国精品主播一区二区在线观看| 亚洲精品日产精品乱码不卡| 久久免费偷拍视频| 日韩亚洲电影在线| 在线一区二区三区四区五区 | 精品国产凹凸成av人导航| av中文字幕不卡| 成人永久免费视频| 国产乱码精品一区二区三| 日韩高清欧美激情| 天天操天天色综合| 午夜精品久久久久久久蜜桃app| 国产精品久久久久久久久图文区 | 欧美嫩在线观看| 婷婷中文字幕一区三区| 亚洲精品一二三| 精品国产网站在线观看| 91久久人澡人人添人人爽欧美| 亚洲va欧美va人人爽| 中文字幕一区二区不卡| 欧美精品第1页| 99精品视频一区二区三区| 美女一区二区视频| 国产精品麻豆99久久久久久| 日韩免费在线观看| 青娱乐精品在线视频| 欧美高清视频www夜色资源网| 亚洲老司机在线| 精品国免费一区二区三区| 成人午夜视频福利| 日韩二区三区四区| 国产调教视频一区| 免费xxxx性欧美18vr| 91精品国产乱码久久蜜臀| 日韩电影在线一区二区| 久久久一区二区三区| 99久久国产综合色|国产精品| 奇米影视在线99精品| 亚洲国产精品久久人人爱| 亚洲欧洲无码一区二区三区| 91精品国产综合久久福利软件| 欧美日本在线视频| 欧美三级日韩在线| 色网综合在线观看| 69久久夜色精品国产69蝌蚪网| 欧美手机在线视频| 欧美日韩视频不卡| 欧美一区二区久久久| 久久婷婷色综合| 中文字幕亚洲欧美在线不卡| 亚洲自拍偷拍欧美| 久久国产精品一区二区| 丁香网亚洲国际| 日本道精品一区二区三区| 欧美日韩国产乱码电影| 日韩一级大片在线观看| 国产精品乱码人人做人人爱| 亚洲在线观看免费视频| 日本一不卡视频| 国产成人久久精品77777最新版本| av一区二区不卡| 欧美日韩aaa| 国产精品视频看| 亚洲午夜免费电影| 国产揄拍国内精品对白| 色哟哟精品一区| 欧美成人a∨高清免费观看| 国产精品久久久久久久浪潮网站| 亚洲第一主播视频| 国产精品亚洲第一区在线暖暖韩国 | 欧美成人艳星乳罩| 日韩美女久久久| 久久99国产精品成人| 色婷婷久久久综合中文字幕| 欧美一级艳片视频免费观看| 18欧美乱大交hd1984| 久久99久久久久| 91国偷自产一区二区三区成为亚洲经典 | 欧美老人xxxx18| 国产女同性恋一区二区| 亚洲一级电影视频| 国产成人亚洲精品狼色在线 | 欧美精选一区二区| 欧美国产禁国产网站cc| 丝瓜av网站精品一区二区| 国产91精品一区二区麻豆亚洲| 欧美美女黄视频| 国产精品福利av| 蜜臀国产一区二区三区在线播放| 波多野洁衣一区| 久久网站最新地址| 久久激情综合网| 欧美高清视频在线高清观看mv色露露十八| 久久久国际精品| 亚洲激情六月丁香| 国产91精品久久久久久久网曝门 | 色婷婷综合中文久久一本| 国产亚洲一区二区三区在线观看| 午夜av区久久| 在线观看三级视频欧美| 国产精品国产三级国产aⅴ中文 | 国产成人高清视频| 欧美大肚乱孕交hd孕妇| 视频在线观看一区二区三区| 色欧美片视频在线观看| 日韩伦理电影网| 成人永久免费视频| 日本一区二区在线不卡| 国产在线精品免费| 日韩免费高清视频| 免费在线观看日韩欧美| 欧美日韩国产成人在线免费| 一区二区三区**美女毛片| 99精品久久免费看蜜臀剧情介绍| 久久精品一区四区| 国模少妇一区二区三区| 精品少妇一区二区三区免费观看 | 91精品国产综合久久久蜜臀图片| 一区二区不卡在线播放| 91美女精品福利| 伊人色综合久久天天人手人婷| 成人app软件下载大全免费| 国产欧美日韩亚州综合 | 日韩高清不卡在线| 欧美日本韩国一区二区三区视频| 一区二区三区久久| 99re成人精品视频| 亚洲精品福利视频网站| 91免费视频观看| 亚洲综合网站在线观看| 欧美少妇xxx| 三级欧美在线一区| 欧美一区二区三区思思人| 麻豆精品在线视频| 久久久影视传媒| 91色在线porny| 亚洲高清免费观看 | 91麻豆精品国产无毒不卡在线观看| 亚洲成人免费av| 在线电影院国产精品| 日韩一区欧美二区| 久久综合色播五月| 成人av在线影院| 亚洲激情中文1区| 日韩一区和二区| 国产不卡一区视频| 亚洲精品乱码久久久久久久久 | 久久国产视频网| 国产午夜一区二区三区| av网站免费线看精品| 亚洲一区二区视频| 欧美成人猛片aaaaaaa| 风间由美一区二区av101| 亚洲激情图片一区| 欧美成人官网二区| 色综合久久久久久久久久久| 亚洲电影中文字幕在线观看| 精品久久久久一区| 91免费观看国产| 欧美aa在线视频| 国产精品理伦片| 欧美精品一级二级三级| 成人手机电影网| 石原莉奈在线亚洲二区| 国产精品精品国产色婷婷| 欧美精品在欧美一区二区少妇| 国产盗摄一区二区| 亚洲va国产va欧美va观看| 久久久久久久久岛国免费| 在线亚洲一区观看| 国产精品亚洲午夜一区二区三区 | 亚洲图片激情小说| 日韩欧美国产成人一区二区| 99热99精品| 麻豆精品在线观看| 亚洲一区二区三区不卡国产欧美| 精品国产91久久久久久久妲己| 91亚洲精品一区二区乱码| 久久国产精品免费| 一区二区三区四区蜜桃| 国产视频一区在线观看| 91精品国产手机|