Open zhangwenda0518 opened 2 years ago
Hello Wenda,
Thank you for your interest in our tool. Based on the error info, it seems like there are problems in processing the BAM file (read_to_contig.bam). It seems that Inspector did not find any mapped reads in the BAM, which is definitely not usual. What species are you working with? Could you check file size of the read_to_contig.bam in the output directory? If the file size is reasonable (at similar level of the file size of input fastq.gz), could you look into the BAM and see if all reads are unaligned?
And for your questions:
Thanks, Maggi
I resolved the same issue by running dos2unix on the contig FASTA file before running Inspector. I could show through some testing that FASTA files formatted in CRLF were causing pysam to be unable to fetch chromosomes on line 358 of the _detectsortbam function in _debreakdetect.py. This was causing Inspector not to create the files in the _mapdepth/ folder required for the cov calculation on line 131 of inspector.py (which throws the ZeroDivisionError since it thinks no reads are mapped). After converting the FASTA file, Inspector ran without error.
I also tested this with the test data that comes with Inspector, and when contig_test.fa is run through unix2dos and then passed to Inspector, the ZeroDivisionError is thrown as expected.
Dear teacher, thank you for your work. I'm using Inspector for evaluation and correction. An error occurred:ZeroDivisionError: float division by zero。 The log is as follows. Inspector.log Inspector starting... 23/06/2022 11:01:15 Start Assembly evaluation with contigs: ['../../../../10.resoult/genome_assemblyed/pbipa.fasta'] TIME: Before read mapping 1.2830026149749756 TIME: Read Alignment: 178.04207849502563 nohup.txt
I run normally on other assemblies. Can you give me a solution?
In addition, I have two questions. First, how big QV value of genome evaluation belongs to a better assembly. Second, I want to know the difference between Inspector and nextpolish in correction, and whether I need to further use correction software on this basis.