Hello!
I converted my SAM file to BAM using this command:
samtools view -S -b .SAM > M6X2D.BAM
I need to calculate genome coverage, so I'm using this command:
samtools depth .BAM > .txt
But I got this error:
[bam_pileup_core] the input is not sorted (chromosomes out of order)
[bam_plp_destroy] memory leak: 1. Continue anyway.
I did a google search and saw the following command could be used to sort my BAM file:
samtools sort -n .BAM
But it doesn't help. I would appreciate any advice and guidance on what I can do to get the depth command to work.
I did get the depth command to work for one genome, but only 2 out of 46 contigs made it to the .txt file.
Thank you!
I converted my SAM file to BAM using this command:
samtools view -S -b .SAM > M6X2D.BAM
I need to calculate genome coverage, so I'm using this command:
samtools depth .BAM > .txt
But I got this error:
[bam_pileup_core] the input is not sorted (chromosomes out of order)
[bam_plp_destroy] memory leak: 1. Continue anyway.
I did a google search and saw the following command could be used to sort my BAM file:
samtools sort -n .BAM
But it doesn't help. I would appreciate any advice and guidance on what I can do to get the depth command to work.
I did get the depth command to work for one genome, but only 2 out of 46 contigs made it to the .txt file.
Thank you!
Comment