ksahlin / BESST

BESST - scaffolder for genomic assemblies
Other
57 stars 13 forks source link

make test failed on command line runBESST #74

Closed tangerzhang closed 5 years ago

tangerzhang commented 5 years ago

Does anyone could help me to solve the following error when making test: Processing is finished. (2019-07-08 15:06:15) Execution of 'python BESST/runBESST'. Command line: /public/home/zhangxt/software/gatb-minia-pipeline2/tools/memused python /public/home/zhangxt/software/gatb-minia-pipeline2/BESST/runBESST -c assembly_k61.contigs.fa -f assembly.lib_0.bam -o assembly_besst -orientation fr --iter 10000 Number of initial contigs: 1 Estimating insert size from 10001 mappings with quality over --min_mapq 11. Choosing mode: 495 mu_adjusted:499.4076, sigma_adjusted:49.8135148553, skewness_adjusted:-0.0259150237889 Creating contig graph with library: assembly.lib_0.bam Too few contigs to calculate coverage on. Got: 1 contigs. If you have specified -z_min or --min_mapq, consider lower them. If not, check the BAM file for proper alignments. Exiting here before scaffolding... maximal memory used: 67 MB (2019-07-08 15:06:18) Execution of 'python BESST/runBESST' failed. Command line: /public/home/zhangxt/software/gatb-minia-pipeline2/tools/memused python /public/home/zhangxt/software/gatb-minia-pipeline2/BESST/runBESST -c assembly_k61.contigs.fa -f assembly.lib_0.bam -o assembly_besst -orientation fr --iter 10000 make: *** [test] ERROR 1

ksahlin commented 5 years ago

The log says:

"Too few contigs to calculate coverage on. Got: 1 contigs. If you have specified -z_min or --min_mapq, consider lower them. If not, check the BAM file for proper alignments. Exiting here before scaffolding..."

So it looks like there is something wrong/unexpected with the input. How many contigs does assembly_k61.contigs.fa contain? How does the reads in assembly.lib_0.bam map to the contigs? (can be investigated with samtools flagstat assembly.lib_0.bam or samtools stats assembly.lib_0.bam)?

tangerzhang commented 5 years ago

Hi ksahlin, There is only one contig in the file assembly_k61.contigs.fa. The file assembly.lib_0.bam looks good and there are 20000 reads in this bam file. samtools flagstat assembly.lib_0.bam output the following message:

0 + 0 secondary
0 + 0 supplementary
0 + 0 duplicates
20000 + 0 mapped (100.00% : N/A)
20000 + 0 paired in sequencing
10000 + 0 read1
10000 + 0 read2
20000 + 0 properly paired (100.00% : N/A)
20000 + 0 with itself and mate mapped
0 + 0 singletons (0.00% : N/A)
0 + 0 with mate mapped to a different chr
0 + 0 with mate mapped to a different chr (mapQ>=5)

Since I am running make test, I assume that there should not be the problem in the input files. Anything I can do to solve this problem?

ksahlin commented 5 years ago

No scaffolding can be performed if there is only one contig. It seems that you’re running gatb-pipeline. Maybe @rchikhi knows how to solve this?

rchikhi commented 5 years ago

Hi, yeah, I never coded that check but if your assembly ends up producing a single contig, then the BESST step will fail but you should still be able to use assembly_k61.contigs.fa as your final output

ksahlin commented 5 years ago

Thanks @rchikhi! Closing this one.