Thx! BBMAP was very helpful!
I have assembled bacterial genomes using SPADES. Now I am going to submit them to Genbank, but I need to know the coverage of each assembly. Should I provide the raw read coverage or the filtered final coverage? If the second possibility is true, how do I access these values from the SPADES log file?
3 answers
The best way to calculate coverage is by mapping, not by looking at the assembler's logs. For example, with BBMap:
bbmap.sh in=reads.fq ref=contigs.fa covstats=covstats.txt
That will print a message like this:
Average coverage: 278.50
Percent scaffolds with any coverage: 100.00
Percent of reference bases covered: 99.98
...in addition to creating covstats.txt which will list the coverage statistics for each individual scaffold. The reads you use for mapping should be the ones you fed into Spades.
The contigs also have length and coverage information by which you can compute the average coverage.
$ grep '^>' contigs.fasta | awk -F _ 'BEGIN {OFS="\t"} {print $0,$4,$6}' | more
>NODE_1_length_766747_cov_499.885 766747 499.885
>NODE_2_length_581296_cov_457.579 581296 457.579
>NODE_3_length_399441_cov_525.578 399441 525.578
I am not 100% sure, but I think this is the k-mer coverage and not the read coverage. S.a. Confusion about the kmer coverage and http://seqanswers.com/forums/showthread.php?t=6887
You could search for "Average coverage" throughout the spades.log file.
Log in to answer this question.
Hello All,
This post was useful - thanks! I have got this result by using bbmap.sh on my data. Could you please tell me how to interpret the coverage here? Average coverage is 209.654 - what does this mean? I would really appreciate your input.
Thanks!
I have tried to obtain this same output file by: bbmap.sh in=reads.fq ref=contigs.fa covstats=covstats.txt But my bbmap.sh does not recognise covstats as parameter? Do you mind posting here the bbmap version you are using and the command you used?
Thanks, Chiara