diff --git a/ChangeLog.txt b/ChangeLog.txt index ffa7aa1..fbe2d8d 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -38,4 +38,7 @@ Version 2.07b (Mar 16, 2018) vector += function). Version 2.08 (May 1, 2018) - * Fixed a bug in ployA option which required argument should turn off. ( options.cpp) + * Fixed a bug due to the "--polyA" command line argument expecting an argument (it should be a boolean flag). + +Version 2.09 (Aug 17, 2018) + * Added informative error messages to fasta.cpp and FaQCs.cpp to help users diagnose corrupted input files. diff --git a/FaQCs.cpp b/FaQCs.cpp index eb4f917..6948215 100644 --- a/FaQCs.cpp +++ b/FaQCs.cpp @@ -370,10 +370,10 @@ void process_paired(vector &m_filter_stats, if(ret1 != ret2){ if(ret1){ - cerr << "Found an unmatched read one" << endl; + cerr << "Did not find a match to read one: " << r1.def << endl; } else{ - cerr << "Found an unmatched read two" << endl; + cerr << "Did not find a match to read two: " << r2.def << endl; } throw __FILE__ "I/O error"; diff --git a/README.md b/README.md index 3eb9d88..345f699 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ FULL USAGE ``` Usage: FaQCs [options] [-u unpaired.fastq] -p reads1.fastq reads2.fastq -d out_directory -Version 2.08 +Version 2.09 Input File(s): -u Unpaired reads -1 First paired read file diff --git a/fastq.cpp b/fastq.cpp index 731fcc1..07673b2 100644 --- a/fastq.cpp +++ b/fastq.cpp @@ -60,6 +60,8 @@ bool next_read(gzFile m_fin, string &m_def, string &m_seq, string &m_quality) while(true){ if(gzgets(m_fin, buffer, buffer_len) == NULL){ + + cerr << "Error in read: " << m_def << endl; throw __FILE__ ":next_read: Unable to read sequence"; } @@ -77,10 +79,14 @@ bool next_read(gzFile m_fin, string &m_def, string &m_seq, string &m_quality) // Skip the '+'. Note that we *don't* actually test to make sure we read a single '+' on a line // by itself. if(gzgets(m_fin, buffer, buffer_len) == NULL){ + + cerr << "Error in read: " << m_def << endl; throw __FILE__ ":next_read: Unable to read '+'"; } if( strpbrk(buffer, "\n\r") == NULL ){ + + cerr << "Error in read: " << m_def << endl; throw __FILE__ ":next_read: Error reading '+' delimiter"; } @@ -93,6 +99,8 @@ bool next_read(gzFile m_fin, string &m_def, string &m_seq, string &m_quality) while(true){ if(gzgets(m_fin, buffer, buffer_len) == NULL){ + + cerr << "Error in read: " << m_def << endl; throw __FILE__ ":next_read: Unable to read quality"; } @@ -108,6 +116,8 @@ bool next_read(gzFile m_fin, string &m_def, string &m_seq, string &m_quality) } if( m_seq.size() != m_quality.size() ){ + + cerr << "Error in read: " << m_def << endl; throw __FILE__ ":next_read: |Sequence| != |Quality|"; }