qiita-spots / qiita

Qiita - A multi-omics databasing effort
http://qiita.microbio.me
BSD 3-Clause "New" or "Revised" License
120 stars 80 forks source link

Include return characters in error messages #1348

Closed jwdebelius closed 8 years ago

jwdebelius commented 9 years ago

As a temporary stop-gap in the movement toward more interpretable error messages, it would be extremely helpful in the Python error messages currently printed during processing came with return characters.

The current system, without any visual breaks, is hard to read:

Error Job results: ValueError(Failed to execute: process_sff.py -i /projects/qiita_data/raw_data/521_F5Y487X02.sff -o /projects/qiita_data/working_dir/sl_outPjNqNU; process_sff.py -i /projects/qiita_data/raw_data/521_F5Y487X01.sff -o /projects/qiita_data/working_dir/sl_outPjNqNU; split_libraries.py -f /projects/qiita_data/working_dir/sl_outPjNqNU/521_F5Y487X02.fna,/projects/qiita_data/working_dir/sl_outPjNqNU/521_F5Y487X01.fna -m /projects/qiita_data/working_dir/MMF_768ycmrnE/F5Y487X_MMF.txt -q /projects/qiita_data/working_dir/sl_outPjNqNU/521_F5Y487X02.qual,/projects/qiita_data/working_dir/sl_outPjNqNU/521_F5Y487X01.qual -d -o /projects/qiita_data/working_dir/sl_outPjNqNU --barcode_type golay_12 --max_ambig 6 --max_barcode_errors 1.5 --max_homopolymer 6 --max_primer_mismatch 0 --max_seq_len 1000 --min_qual_score 25 --min_seq_len 200 --qual_score_window 0 --reverse_primer_mismatches 0 --reverse_primers disable; convert_fastaqual_fastq.py -f /projects/qiita_data/working_dir/sl_outPjNqNU/seqs.fna -q /projects/qiita_data/working_dir/sl_outPjNqNU/seqs_filtered.qual -o /projects/qiita_data/working_dir/sl_outPjNqNU -F stdout: stderr: Traceback (most recent call last): File "/home/qiita/qiime/scripts/split_libraries.py", line 411, in main() File "/home/qiita/qiime/scripts/split_libraries.py", line 408, in main truncate_ambi_bases=opts.truncate_ambi_bases) File "/home/qiita/qiime/qiime/split_libraries.py", line 1289, in preprocess barcode_type, added_demultiplex_field) File "/home/qiita/qiime/qiime/split_libraries.py", line 310, in check_map 'identify problems.') ValueError: Errors were found with mapping file, please run validate_mapping_file.py to identify problems. Usage: convert_fastaqual_fastq.py [options] {-f/--fasta_file_path FASTA_FILE_PATH} [] indicates optional input (order unimportant) {} indicates required input (order unimportant) From a FASTA file and a matching QUAL file, generates a FASTQ file. A minimal FASTQ file omits the redundant sequence label on the quality scores; the quality scores for a sequence are assumed to follow immediately after the sequence with which they are associated. The output FASTQ file will be generated in the specified output directory with the same name as the input FASTA file, suffixed with '.fastq'. A FASTQ file will be split into FASTA and QUAL files, and generated in the designated output directory. Example usage: Print help message and exit convert_fastaqual_fastq.py -h Example: Using the input files seqs.fna and seqs.qual, generate seqs.fastq in the fastq_files directory convert_fastaqual_fastq.py -f seqs.fna -q seqs.qual -o fastq_files/ Example: Using input seqs.fastq generate fasta and qual files in fastaqual directory convert_fastaqual_fastq.py -c fastq_to_fastaqual -f seqs.fastq -o fastaqual convert_fastaqual_fastq.py: error: option -f: file does not exist: '/projects/qiita_data/working_dir/sl_outPjNqNU/seqs.fna' ) Python output: None Standard output: Standard error: Job GEN_DEMUX_FILE: Error Job results: ImpossibleDependency() Python output: None Standard output: Standard error: Job INSERT_PREPROCESSED: Error Job results: ImpossibleDependency() Python output: None Standard output: Standard error:

If visual breaks could be included, that would increase the readability immensely.

Error Job results: Traceback (most recent call last): File "/home/qiita/qiime/scripts/split_libraries.py", line 411, in main() File "/home/qiita/qiime/scripts/split_libraries.py", line 408, in main truncate_ambi_bases=opts.truncate_ambi_bases) File "/home/qiita/qiime/qiime/split_libraries.py", line 1289, in preprocess barcode_type, added_demultiplex_field) File "/home/qiita/qiime/qiime/split_libraries.py", line 310, in check_map 'identify problems.') ValueError: Errors were found with mapping file, please run validate_mapping_file.py to identify problems.

josenavas commented 9 years ago

Related to https://github.com/biocore/qiita/issues/1115 and https://github.com/biocore/qiita/issues/1269

We should be able to solve all of them at once.