Commit dcfc568d authored by sallet's avatar sallet
Browse files

able to create variants output file

parent 9bfcdc46
......@@ -1867,7 +1867,7 @@ void Prediction :: DeleteOutOfRange ( int s,int e, char strand )
// --------------------------
// print prediction (master)
// --------------------------
void Prediction :: Print ( DNASeq* x, MasterSensor *ms, FILE *OPTIM_OUT, const char append )
void Prediction :: Print ( DNASeq* x, MasterSensor *ms, FILE *OPTIM_OUT, const char append, const char variant )
{
MS = ms;
......@@ -1906,7 +1906,9 @@ void Prediction :: Print ( DNASeq* x, MasterSensor *ms, FILE *OPTIM_OUT, const c
for ( int i=0; i<strlen ( outputFormat ); i++ )
{
char filename[FILENAME_MAX];
strcpy ( filename,PAR.getC ( "prefixName" ) );
strcpy ( filename, PAR.getC ( "prefixName" ) );
if ( variant ) strcat ( filename, ".variants" );
switch ( outputFormat[i] )
{
case 'a':
......@@ -1925,6 +1927,7 @@ void Prediction :: Print ( DNASeq* x, MasterSensor *ms, FILE *OPTIM_OUT, const c
fclose ( OUT );
{
std::string filename_gff3 ( PAR.getC ( "prefixName" ) );
if ( variant ) filename_gff3 += ".variants";
filename_gff3 += ".gff3";
std::ofstream out ( filename_gff3.c_str(),ccmode );
// , std::ios_base::binary);
......
......@@ -219,7 +219,7 @@ class Prediction
void TrimAndUpdate (DNASeq*);
void SanityCheck();
void DeleteOutOfRange(int s,int e, char strand);
void Print (DNASeq*, MasterSensor*, FILE *OTP_OUT=NULL, char append = 0);
void Print (DNASeq*, MasterSensor*, FILE *OTP_OUT=NULL, char append = 0, char variant = 0);
void PrintGeneInfo (FILE*);
void PlotPred ();
State* GetStateAtPos(int);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment