Commit 1cadca46 authored by Raquel Bromberg's avatar Raquel Bromberg

Code cleaned up (commented code deleted)

parent 99830c1f
...@@ -22,7 +22,6 @@ class Coptim1_layer ...@@ -22,7 +22,6 @@ class Coptim1_layer
Coptim1_layer::Coptim1_layer(int number_of_genomes) Coptim1_layer::Coptim1_layer(int number_of_genomes)
{ {
//array_size = (((number_of_genomes*number_of_genomes)-number_of_genomes)/2.0);
array_size = get_index(number_of_genomes-2,number_of_genomes-1)+1; array_size = get_index(number_of_genomes-2,number_of_genomes-1)+1;
diagonal_size = number_of_genomes; diagonal_size = number_of_genomes;
array = new int[array_size]; array = new int[array_size];
......
...@@ -22,7 +22,6 @@ amino_acids::amino_acids() ...@@ -22,7 +22,6 @@ amino_acids::amino_acids()
{ {
} }
char amino_acids::get_aa(int i) char amino_acids::get_aa(int i)
{ {
if(i==0) if(i==0)
......
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
#include <cstdlib> #include <cstdlib>
//#include <omp.h>
#include <getopt.h> #include <getopt.h>
#include "mctr.h" #include "mctr.h"
...@@ -22,11 +21,6 @@ int main(int argc, char* argv[]) ...@@ -22,11 +21,6 @@ int main(int argc, char* argv[])
int fs=-1; int fs=-1;
int fo=-1; int fo=-1;
/* if(argc<2)
{
cout<<"Wrong input to cm.cpp: ./cm -p <full path> -f <filtering steps, =0 for unfiltered (e.g. all) data> -o <filtering option, =0 for unfiltered (e.g. all) data>"<<endl;
}*/
cout<<"Values stored in argv:"<<endl; cout<<"Values stored in argv:"<<endl;
for(int i=0; i<argc; i++) for(int i=0; i<argc; i++)
{ {
...@@ -40,9 +34,6 @@ int main(int argc, char* argv[]) ...@@ -40,9 +34,6 @@ int main(int argc, char* argv[])
case 'o': case 'o':
fo=atoi(optarg); fo=atoi(optarg);
break; break;
/* case 'p':
full_path = optarg;
break;*/
case 'f': case 'f':
fs=atoi(optarg); fs=atoi(optarg);
break; break;
...@@ -54,16 +45,12 @@ int main(int argc, char* argv[]) ...@@ -54,16 +45,12 @@ int main(int argc, char* argv[])
} }
} }
// cout<<"fo="<<fo<<endl;
// cout<<"p="<<full_path<<endl;
// cout<<"fs="<<fs<<endl;
cout<<"Calling run on real data"<<endl; cout<<"Calling run on real data"<<endl;
mctr m(full_path,"",fs,fo,partial_run); mctr m(full_path,"",fs,fo,partial_run);
m.run_it0(); m.run_it0();
cout<<"Calling run on scrambled data"<<endl; cout<<"Calling run on scrambled data"<<endl;
mctr mscr(full_path,"scr",fs,fo,partial_run);//scrambled mctr mscr(full_path,"scr",fs,fo,partial_run);
mscr.run_it0(); mscr.run_it0();
return 0; return 0;
......
...@@ -21,7 +21,6 @@ struct avg ...@@ -21,7 +21,6 @@ struct avg
struct Mproteome struct Mproteome
{ {
vector<string> proteins; vector<string> proteins;
//vector<double> bit_scores;
double bit_scores[20]; double bit_scores[20];
vector<string> files; vector<string> files;
int ordinal; int ordinal;
...@@ -47,7 +46,6 @@ struct v ...@@ -47,7 +46,6 @@ struct v
}; };
void do_counts(Mproteome p1, Mproteome p2, int tag_length, vector<int>& array, int& max, int& min,string& most_unlikely, int& uscore,int SOS_CUTOFF,bool partial_run,char partial_run_char); void do_counts(Mproteome p1, Mproteome p2, int tag_length, vector<int>& array, int& max, int& min,string& most_unlikely, int& uscore,int SOS_CUTOFF,bool partial_run,char partial_run_char);
avg calc_running_avgs(int array[], int max, int min);
bool check_composition(string s,int tag_length,amino_acids& aas,int SOSCUTOFF); bool check_composition(string s,int tag_length,amino_acids& aas,int SOSCUTOFF);
int get_num_bins(string path,string bfn); int get_num_bins(string path,string bfn);
int calc_sos_cutoff(string path,string bfn); int calc_sos_cutoff(string path,string bfn);
...@@ -92,11 +90,6 @@ int main(int argc, char* argv[]) ...@@ -92,11 +90,6 @@ int main(int argc, char* argv[])
abort(); abort();
} }
} }
//string FM = argv[3]; //always set to true
// int num_bins=atoi(argv[4]); //set it from within
// string PS = argv[5]; //always set to P
//int SOS_CUTOFF=atoi(argv[6]); //set it from within
amino_acids aas; amino_acids aas;
if(partial_run) if(partial_run)
...@@ -136,16 +129,11 @@ int main(int argc, char* argv[]) ...@@ -136,16 +129,11 @@ int main(int argc, char* argv[])
if(ordinal==proteomes.at(i).ordinal && org_name==proteomes.at(i).org_name) if(ordinal==proteomes.at(i).ordinal && org_name==proteomes.at(i).org_name)
{ {
proteomes.at(i).files.push_back(faa_path); proteomes.at(i).files.push_back(faa_path);
//cout<<"Already there. ordinal="<<ordinal<<" org_name="<<org_name<<endl;
//cout<<"pushing back "<<faa_path<<endl;
already_there=true; already_there=true;
} }
} }
if(!already_there) if(!already_there)
{ {
//cout<<"Not already there."<<endl;
//cout<<"ordinal = "<<ordinal<<" org_name = "<<org_name<<endl;
//cout<<"adding file "<<faa_path<<endl;
Mproteome mp_temp; Mproteome mp_temp;
mp_temp.ordinal=ordinal; mp_temp.ordinal=ordinal;
mp_temp.org_name=org_name; mp_temp.org_name=org_name;
...@@ -191,11 +179,9 @@ int main(int argc, char* argv[]) ...@@ -191,11 +179,9 @@ int main(int argc, char* argv[])
instream>>eater; instream>>eater;
} }
proteomes.at(i).proteins.push_back(protein); proteomes.at(i).proteins.push_back(protein);
//cout<<"info_line = "<<info_line<<endl<<protein<<endl;
} }
} }
instream.close(); instream.close();
// cout<<"Size of "<<i<<" proteins = "<<proteomes.at(i).proteins.size()<<endl;
} }
for(int j=0; j<20; j++) for(int j=0; j<20; j++)
...@@ -229,26 +215,19 @@ int main(int argc, char* argv[]) ...@@ -229,26 +215,19 @@ int main(int argc, char* argv[])
for(int i=0; i<proteomes.size(); i++) for(int i=0; i<proteomes.size(); i++)
{ {
outstream2<<i<<" "<<proteomes.at(i).total<<endl; outstream2<<i<<" "<<proteomes.at(i).total<<endl;
//cout<<"Doing bitting for proteome i="<<i<<endl;
for(int j=0; j<20; j++) for(int j=0; j<20; j++)
{ {
//cout<<j<<" "<<proteomes.at(i).bit_scores[j]<<" ";
//outstream2<<aas.get_aa(j)<<" "<<proteomes.at(i).bit_scores[j]<<" ";
proteomes.at(i).bit_scores[j]/=proteomes.at(i).total; //now frequencies. proteomes.at(i).bit_scores[j]/=proteomes.at(i).total; //now frequencies.
//cout<<proteomes.at(i).bit_scores[j]<<" ";
//outstream2<<proteomes.at(i).bit_scores[j]<<" ";
proteomes.at(i).bit_scores[j]=abs(log(proteomes.at(i).bit_scores[j])); proteomes.at(i).bit_scores[j]=abs(log(proteomes.at(i).bit_scores[j]));
//outstream2<<proteomes.at(i).bit_scores[j]<<" ";
proteomes.at(i).bit_scores[j]/=2.0; proteomes.at(i).bit_scores[j]/=2.0;
outstream2<<proteomes.at(i).bit_scores[j]<<endl; outstream2<<proteomes.at(i).bit_scores[j]<<endl;
//cout<<proteomes.at(i).bit_scores[j]<<endl;
} }
outstream2<<endl; outstream2<<endl;
} }
ofstream outstream; ofstream outstream;
string outfile = path+"/"+bfn+"/bin_corrections.txt"; string outfile = path+"/"+bfn+"/bin_corrections.txt";
outstream.open(outfile.c_str());//, ios::out | ios::app); outstream.open(outfile.c_str());
if(outstream.fail()) if(outstream.fail())
{ {
cout<<"Failed to open outstream to "<<outfile<<endl; cout<<"Failed to open outstream to "<<outfile<<endl;
...@@ -266,13 +245,9 @@ int main(int argc, char* argv[]) ...@@ -266,13 +245,9 @@ int main(int argc, char* argv[])
outstream<<num_bins<<endl<<endl; outstream<<num_bins<<endl<<endl;
// int i_starter=32;
//int j_starter=1687;
//bool start_writing=false;
if(PS=="P") if(PS=="P")
{ {
cout<<"Using omp...presumably..."<<endl; cout<<"Using omp..."<<endl;
vector<v> stored_counts; vector<v> stored_counts;
...@@ -294,8 +269,6 @@ int main(int argc, char* argv[]) ...@@ -294,8 +269,6 @@ int main(int argc, char* argv[])
int uscore=0; int uscore=0;
do_counts(proteomes.at(i),proteomes.at(j),tag_length,array,max,min,most_unlikely,uscore,SOS_CUTOFF,partial_run,partial_run_lead); do_counts(proteomes.at(i),proteomes.at(j),tag_length,array,max,min,most_unlikely,uscore,SOS_CUTOFF,partial_run,partial_run_lead);
do_counts(proteomes.at(j),proteomes.at(i),tag_length,array,max,min,most_unlikely,uscore,SOS_CUTOFF,partial_run,partial_run_lead); do_counts(proteomes.at(j),proteomes.at(i),tag_length,array,max,min,most_unlikely,uscore,SOS_CUTOFF,partial_run,partial_run_lead);
//avg result;
//result = calc_running_avgs(array,max,min);
v vtemp; v vtemp;
for(int f=0; f<array.size(); f++) for(int f=0; f<array.size(); f++)
...@@ -349,13 +322,8 @@ int main(int argc, char* argv[]) ...@@ -349,13 +322,8 @@ int main(int argc, char* argv[])
int max(0),min(0); int max(0),min(0);
string most_unlikely=""; string most_unlikely="";
int uscore=0; int uscore=0;
//do_counts(proteomes.at(i),proteomes.at(j), tag_length, array,max,min,most_unlikely,uscore);
//do_counts(proteomes.at(j),proteomes.at(i), tag_length, array,max,min,most_unlikely,uscore);
//avg result;
//result = calc_running_avgs(array,max,min);
outstream<<i<<" to "<<j<<endl; outstream<<i<<" to "<<j<<endl;
//outstream<<result.index<<endl<<result.avg<<endl;
for(int f=0; f<100; f++) for(int f=0; f<100; f++)
{ {
outstream<<array[f]<<endl; outstream<<array[f]<<endl;
...@@ -368,22 +336,14 @@ int main(int argc, char* argv[]) ...@@ -368,22 +336,14 @@ int main(int argc, char* argv[])
} }
} }
} }
//b. read them in from file
else if(FM=="F")
{
vector<Fproteome> proteomes;
}
else else
{ {
cout<<"Invalid option for File/Memory (FM)."<<endl; cout<<"Invalid option for File/Memory (FM)."<<endl;
exit(1); exit(1);
} }
//3. do all comparisons and write out.
} }
//void do_counts(Mproteome p1, Mproteome p2, int tag_length, int array[],int& max, int& min,string& most_unlikely,int& uscore)
void do_counts(Mproteome p1, Mproteome p2, int tag_length, vector<int>& array,int& max, int& min,string& most_unlikely,int& uscore,int SOS_CUTOFF,bool partial_run,char partial_run_lead) void do_counts(Mproteome p1, Mproteome p2, int tag_length, vector<int>& array,int& max, int& min,string& most_unlikely,int& uscore,int SOS_CUTOFF,bool partial_run,char partial_run_lead)
{ {
int sum=0; int sum=0;
...@@ -408,9 +368,6 @@ void do_counts(Mproteome p1, Mproteome p2, int tag_length, vector<int>& array,in ...@@ -408,9 +368,6 @@ void do_counts(Mproteome p1, Mproteome p2, int tag_length, vector<int>& array,in
double score=0.0; double score=0.0;
for(int k=0; k<tag_length && (j+k)<p1.proteins.at(i).length(); k++) for(int k=0; k<tag_length && (j+k)<p1.proteins.at(i).length(); k++)
{ {
// bool composition_ok=check_composition(p1.proteins.at(i).substr(k,tag_length),tag_length,aas,SOS_CUTOFF);
// if(composition_ok)
// {
s+=p1.proteins.at(i)[j+k]; s+=p1.proteins.at(i)[j+k];
int index=aas.get_aa(p1.proteins.at(i)[j+k]); int index=aas.get_aa(p1.proteins.at(i)[j+k]);
...@@ -421,12 +378,10 @@ void do_counts(Mproteome p1, Mproteome p2, int tag_length, vector<int>& array,in ...@@ -421,12 +378,10 @@ void do_counts(Mproteome p1, Mproteome p2, int tag_length, vector<int>& array,in
if( (score+.5)<min || min==0) if( (score+.5)<min || min==0)
{ {
min=score+.5; min=score+.5;
//cout<<"min score = "<<min<<" sequence = "<<s<<endl;
} }
if( (score+.5)>max) if( (score+.5)>max)
{ {
max=score+.5; max=score+.5;
//cout<<"max score = "<<max<<" sequence = "<<s<<endl;
uscore=max; uscore=max;
most_unlikely=s; most_unlikely=s;
} }
...@@ -436,12 +391,6 @@ void do_counts(Mproteome p1, Mproteome p2, int tag_length, vector<int>& array,in ...@@ -436,12 +391,6 @@ void do_counts(Mproteome p1, Mproteome p2, int tag_length, vector<int>& array,in
k=tag_length; k=tag_length;
j+=k-1; j+=k-1;
} }
// }
// else
// {
// k=tag_length;
// j+=k-1;
// }
} }
} }
} }
...@@ -458,9 +407,6 @@ void do_counts(Mproteome p1, Mproteome p2, int tag_length, vector<int>& array,in ...@@ -458,9 +407,6 @@ void do_counts(Mproteome p1, Mproteome p2, int tag_length, vector<int>& array,in
double score=0.0; double score=0.0;
for(int k=0; k<tag_length && (j+k)<p1.proteins.at(i).length(); k++) for(int k=0; k<tag_length && (j+k)<p1.proteins.at(i).length(); k++)
{ {
// bool composition_ok=check_composition(p1.proteins.at(i).substr(k,tag_length),tag_length,aas,SOS_CUTOFF);
// if(composition_ok)
// {
s+=p1.proteins.at(i)[j+k]; s+=p1.proteins.at(i)[j+k];
int index=aas.get_aa(p1.proteins.at(i)[j+k]); int index=aas.get_aa(p1.proteins.at(i)[j+k]);
...@@ -471,12 +417,10 @@ void do_counts(Mproteome p1, Mproteome p2, int tag_length, vector<int>& array,in ...@@ -471,12 +417,10 @@ void do_counts(Mproteome p1, Mproteome p2, int tag_length, vector<int>& array,in
if( (score+.5)<min || min==0) if( (score+.5)<min || min==0)
{ {
min=score+.5; min=score+.5;
//cout<<"min score = "<<min<<" sequence = "<<s<<endl;
} }
if( (score+.5)>max) if( (score+.5)>max)
{ {
max=score+.5; max=score+.5;
//cout<<"max score = "<<max<<" sequence = "<<s<<endl;
uscore=max; uscore=max;
most_unlikely=s; most_unlikely=s;
} }
...@@ -486,12 +430,6 @@ void do_counts(Mproteome p1, Mproteome p2, int tag_length, vector<int>& array,in ...@@ -486,12 +430,6 @@ void do_counts(Mproteome p1, Mproteome p2, int tag_length, vector<int>& array,in
k=tag_length; k=tag_length;
j+=k-1; j+=k-1;
} }
// }
// else
// {
// k=tag_length;
// j+=k-1;
// }
} }
} }
} }
...@@ -539,56 +477,6 @@ bool check_composition(string s,int tag_length,amino_acids& aas,int SOSCUTOFF) ...@@ -539,56 +477,6 @@ bool check_composition(string s,int tag_length,amino_acids& aas,int SOSCUTOFF)
return true; return true;
} }
avg calc_running_avgs(int array[],int max, int min)
{
/*
avg chosen_avg;
chosen_avg.avg=0;
chosen_avg.index=0;
cout<<"In calc_running_avgs"<<endl;
for(int i=0; i<1000; i++)
{
cout<<i<<" "<<array[i]<<endl;
}
vector<avg> rolling_avg;
//go forwards
double denom=0;
double sum=0;
double cur_avg=0;
for(int i=min; i<max; i++)
{
if(array[i]>0)
{
sum+=array[i];
denom+=1;
cur_avg=sum/denom;
avg atemp;
atemp.avg=log(cur_avg);
atemp.index=i;
rolling_avg.push_back(atemp);
}
}
for(int i=rolling_avg.size()-1; i>=0; i--)
{
double diff=log(array[rolling_avg.at(i).index])-rolling_avg.at(i).avg;
//double diff=log(counts.at(rolling_avg.at(i).index))-rolling_avg.at(i).avg;
//cout<<i<<" "<<rolling_avg.at(i).index<<" "<<rolling_avg.at(i).avg<<" "<<diff<<endl;
if(abs(diff)<0.08)
{
chosen_avg=rolling_avg.at(i);
//cout<<"Choosing the avg. This better only appear once."<<endl;
break;
}
}
//cout<<"chosen avg = "<<chosen_avg.index<<" "<<chosen_avg.avg<<endl;
return chosen_avg;
*/
}
int get_num_bins(string path,string bfn) int get_num_bins(string path,string bfn)
{ {
ifstream instream; ifstream instream;
......
...@@ -50,8 +50,8 @@ int main(int argc, char* argv[]) ...@@ -50,8 +50,8 @@ int main(int argc, char* argv[])
for(int j=i+1; j<ref_set_size+main_set_size; j++) for(int j=i+1; j<ref_set_size+main_set_size; j++)
{ {
int total_size_j;// = organisms.at(j).get_total_num_aa(); int total_size_j;
vector<int> aa_array_j;// = organisms.at(j).get_aa_array(); vector<int> aa_array_j;
get_hist_data(u.int_to_string(j),total_size_j,aa_array_j,path_frag); get_hist_data(u.int_to_string(j),total_size_j,aa_array_j,path_frag);
double entropy=0; double entropy=0;
......
...@@ -43,7 +43,6 @@ vector<string> directory_reader::load_names(string dir) ...@@ -43,7 +43,6 @@ vector<string> directory_reader::load_names(string dir)
} }
else else
{ {
//cout<<"Rejecting directory named "<<temp<<endl;
} }
} }
closedir(dp); closedir(dp);
......
...@@ -63,14 +63,6 @@ void exp_grid::get_exps(double min_slope_par, double max_slope_par, vector<float ...@@ -63,14 +63,6 @@ void exp_grid::get_exps(double min_slope_par, double max_slope_par, vector<float
yvals = y_fit; yvals = y_fit;
wvals = w_fit; wvals = w_fit;
/* //for debugging
for(int i=0; i<x_fit.size(); i++)
{
cout<<i<<" "<<xvals.at(i)<<" "<<yvals.at(i)<<" "<<wvals.at(i)<<endl;
}
exit(1);
*/
min_slope_par=0; min_slope_par=0;
max_slope_par=0.3; max_slope_par=0.3;
...@@ -88,15 +80,6 @@ void exp_grid::get_exps(double min_slope_par, double max_slope_par, vector<float ...@@ -88,15 +80,6 @@ void exp_grid::get_exps(double min_slope_par, double max_slope_par, vector<float
cout<<"wvals.size(0 = "<<wvals.size()<<endl; cout<<"wvals.size(0 = "<<wvals.size()<<endl;
exit(1); exit(1);
} }
/* else
{
cout<<"Writing out values for xvals, yvals, and wvals"<<endl;
cout<<"Size of xvals = "<<xvals.size()<<endl;
for(int i=0; i<xvals.size(); i++)
{
cout<<i<<" "<<xvals.at(i)<<" "<<yvals.at(i)<<" "<<wvals.at(i)<<endl;
}
}*/
bool done=false; bool done=false;
int previous_val=-1; int previous_val=-1;
...@@ -166,27 +149,17 @@ void exp_grid::get_exps(double min_slope_par, double max_slope_par, vector<float ...@@ -166,27 +149,17 @@ void exp_grid::get_exps(double min_slope_par, double max_slope_par, vector<float
} }
} }
//cout<<"Calculating match_score_cutoff: ";
//cout<<"xvals.at(0) = "<<xvals.at(0)<<endl;
double n1=0.1*F/G; double n1=0.1*F/G;
//cout<<"n1="<<n1<<endl;
double n2=b1-b2; double n2=b1-b2;
//cout<<"n2="<<n2<<endl;
if(n1<=0 || n2==0) if(n1<=0 || n2==0)
{ {
//cout<<"setting match_score_cutoff to -1"<<endl;
match_score_cutoff=-1; match_score_cutoff=-1;
} }
else else
{ {
// cout<<"n1 and n2 acceptable."<<endl;
match_score_cutoff = log(n1)/(n2)+xvals.at(0); match_score_cutoff = log(n1)/(n2)+xvals.at(0);
//cout<<"match_score_cutoff="<<match_score_cutoff<<endl;
} }
msc_par=match_score_cutoff; msc_par=match_score_cutoff;
/* int staller;
cout<<"Stalling: ";
cin>>staller;*/
} }
void exp_grid::assign_array(double min_b1, double max_b1, double min_b2, double max_b2, double stepper) void exp_grid::assign_array(double min_b1, double max_b1, double min_b2, double max_b2, double stepper)
...@@ -226,14 +199,6 @@ void exp_grid::calc_constants(double& alpha,double& alpha1,double& beta,double& ...@@ -226,14 +199,6 @@ void exp_grid::calc_constants(double& alpha,double& alpha1,double& beta,double&
gamma+=wvals.at(i)*yvals.at(i)*exp(-1.0*b1*xvals.at(i)); gamma+=wvals.at(i)*yvals.at(i)*exp(-1.0*b1*xvals.at(i));
gamma1+=wvals.at(i)*yvals.at(i)*exp(-1.0*b2*xvals.at(i)); gamma1+=wvals.at(i)*yvals.at(i)*exp(-1.0*b2*xvals.at(i));
} }
/*
alpha*=2.0;
alpha1*=2.0;
beta*=2.0;
gamma*=2.0;
gamma1*=2.0;
*/
} }
double exp_grid::get_genomic_distance() double exp_grid::get_genomic_distance()
...@@ -296,7 +261,7 @@ double exp_grid::get_wt_rmsd(vector<float> rmsd_wts) ...@@ -296,7 +261,7 @@ double exp_grid::get_wt_rmsd(vector<float> rmsd_wts)
} }
else else
{ {
val = -2; //according to Zbyszek. val = -2;
} }
if(yvals.at(i)>0) if(yvals.at(i)>0)
......
...@@ -17,14 +17,10 @@ class file_info ...@@ -17,14 +17,10 @@ class file_info
~file_info(); ~file_info();
void read_line(); void read_line();
void set_file_name(string file_name_par); void set_file_name(string file_name_par);
// char get_caa();
// void delete_pFile();
string get_current_line(); string get_current_line();
// void open(string path_par);
void set_path(string path_par); void set_path(string path_par);
void open(); void open();
void set_position(); void set_position();
// string file_name;
string path; string path;
int total_tags; int total_tags;
int strings_read_in; int strings_read_in;
...@@ -49,9 +45,7 @@ file_info::file_info() ...@@ -49,9 +45,7 @@ file_info::file_info()
file_info::~file_info() file_info::~file_info()
{ {
cout<<"Top of file_info destructor."<<endl; cout<<"Top of file_info destructor."<<endl;
// fclose(pFile);
cout<<"Closed the file."<<endl; cout<<"Closed the file."<<endl;
//delete pFile;
cout<<"Bottom of file_info destructor."<<endl; cout<<"Bottom of file_info destructor."<<endl;
} }
...@@ -98,8 +92,6 @@ void file_info::set_path(string path_par) ...@@ -98,8 +92,6 @@ void file_info::set_path(string path_par)
fgetpos(pFile,&position); //point to the first sequence in the file.