lbcb-sci / racon

Ultrafast consensus module for raw de novo genome assembly of long uncorrected reads
MIT License
197 stars 34 forks source link

Empty consensus file error #4

Closed ardakdemir closed 5 years ago

ardakdemir commented 5 years ago

The issue is fixed by @rvaser's suggestion to replace qualities outputted by Chiron with "!"s.

I am using the standard minimap2-miniasm-racon pipeline but if I use basecalling results from Chiron, get empty consensus files outputted by racon.

I checked and confirmed that minimap/miniasm succesfully generates contigs by overlapping the reads and finds the mapping between the contigs and raw reads. Below is my pipeline:

minimap2/minimap2 -x ava-ont -k15 -w5  ${out_file}merge_${i}_par.fastq ${out_file}merge_${i}_par.fastq > ${out_file}reads_${i}.paf
miniasm/miniasm  -e2 -n1 -f   ${out_file}merge_${i}_par.fastq ${out_file}reads_${i}.paf > ${out_file}raw_contigs_${i}.gfa
awk '$1 ~/S/ {print ">"$2"\n"$3}' ${out_file}raw_contigs_${i}.gfa > ${out_file}raw_contigs_${i}.fasta
echo "Running minimap with raw_contigs and merge_1_par.fastq"
minimap2/minimap2   ${out_file}raw_contigs_${i}.fasta ${out_file}merge_${i}_par.fastq > ${out_file}mapping_${i}.paf
echo "Racon mapping"
${RACON}   ${out_file}merge_${i}_par.fastq ${out_file}mapping_${i}.paf ${out_file}raw_contigs_${i}.fasta >  ${out_file}consensus_${i}_0.fasta

I verified that the pipeline works for other basecaller outpus, i.e Guppy and URnano so I think this is due to the output generated by Chiron. Is there a way to tackle this issue?

rvaser commented 5 years ago

Hello, can you please check whether base qualities in Chiron FASTQ file are all equal to "!" or something similar?

Best regards, Robert

ardakdemir commented 5 years ago

It worked! Thanks a lot!!

So this means that racon makes use of the qualities, right? Is it possible to make Racon be not affected by quality scores?

Thanks a lot

Arda

rvaser commented 5 years ago

Hi Arda, Racon uses qualities if you pass a FASTQ file, you can also use FASTA files. If you have FASTQ files with dummy qualities, pass parameter -q -1 which will disable filtering in windows based on average base quality (default is 10).

Best regards, Robert