Thank you for quick reply.
I tried running this command but still error is showing
jgi_summarize_bam_contig_depths --outputDepth depth.txt --referenceFasta final.contigs.fa sorted.bam
I get following result:
Output depth matrix to depth.txt Reference fasta file final.contigs.fa jgi_summarize_bam_contig_depths v2.15-6-g8b5702b 2021-10-17T15:10:38 Output matrix to depth.txt Reading reference fasta file: final.contigs.fa ... 6008 sequences 0: Opening bam: sorted.bam Error: referenceFile: final.contigs.fa contig 0 is not the same as in the bam headers (bam reports k141_502 flag=1 multi=2.0000 len=306 with 306 len, reference loaded k141_4762 with 313 len)!
I created the BAM file with following code. should I use referenceFasta as g1_trimmed.fastq
bbmap.sh in= g1_trimmed.fastq out=mapped.bam