|
test-o-matic.cppGo to the documentation of this file.00001 #include "gn/gnFASSource.h" 00002 #include "gn/gnSequence.h" 00003 #include "gn/gnTranslator.h" 00004 #include "gn/gnStringSpec.h" 00005 #include <fstream> 00006 int main() 00007 { 00008 ifstream gbk1("cpneuJ.gbk"); 00009 ifstream gbk2("test_rc.gbk"); 00010 00011 uint32 badline = 0; 00012 char buf[30000]; 00013 char buf2[30000]; 00014 while(gbk1.good() && gbk2.good()){ 00015 gbk1.getline(buf, 30000); 00016 gbk2.getline(buf2, 30000); 00017 if(strcmp(buf, buf2)){ 00018 cout << "mismatched line: " << badline << "\n"; 00019 cout << buf << endl << buf2 << endl; 00020 cout << "Length 1: " << strlen(buf) << " Length 2: " << strlen(buf2) << endl; 00021 cin >> buf; 00022 } 00023 badline++; 00024 } 00025 00026 /* gnStringSpec s(""); 00027 cout <<s.GetLength()<<endl; 00028 00029 gnSequence t = "ACTATATA"; 00030 if(t == string("TATATA")){ 00031 cout << "ASDFASDFSADF"; 00032 }*/ 00033 } 00034 /* // define a string to store the sequence file name 00035 00036 string filename; 00037 string nseq,pseq; 00038 // define a gnSequence to store the sequence 00039 gnSequence file_sequence; 00040 gnSequence prot_trans; 00041 00042 //nseq = "BXXBXXBXXBXXBXXBXXBXXBXXBXXBXXBXXBXXBXXBXXBXXBXXBXXBXXBXXBXXBXXBXX"; 00043 //nseq = "WSTYYYBBB"; 00044 //nseq="ATGCUXGCNGGGTATGAATEQILPFP"; 00045 //nseq="ATGGTXAGCGGNTAR"; 00046 cout<<nseq<<" (original)----> \n"; 00047 gnSequence aSeq(nseq); 00048 cout<<aSeq<<" (gnSequence)----> \n"; 00049 00050 gnTranslator::ProteinDNAConverter->ToProtein(nseq); 00051 00052 cout << nseq << '\n';; 00053 00054 00055 00056 00057 // prot_trans.append(nseq); 00058 // output the first ten bases of the sequence 00059 // cout << prot_trans.subseq(1,10); 00060 00061 return 0; 00062 00063 } 00064 00065 /*#include "gn/gnSequence.h" 00066 #include <iostream> 00067 #include <string> 00068 #include "gn/gnTranslator.h" 00069 #include "gn/gnFASSource.h" 00070 00071 int main(int argc, char* argv[]){ 00072 gnSequence gps; 00073 string seq_filename; 00074 string out_filename; 00075 00076 /* Get the name of the dnx file to convert to FastA / 00077 cout << "Debug-o-matic!\n"; 00078 cout << "Please give the name of the fof to test: "; 00079 cin >> seq_filename; 00080 00081 gps.LoadSource(seq_filename); 00082 00083 cout << "Output filename: "; 00084 cin >> out_filename; 00085 gnFASSource::Write(gps, out_filename); 00086 00087 return 0; 00088 00089 }*/ Generated at Fri Nov 30 15:36:52 2001 for libGenome by 1.2.8.1 written by Dimitri van Heesch, © 1997-2001 |