Thanks Bastien. Is this the command to do so:
bedtools genomecov -ibam bamfile.bam -bga -g genomelength.txt
• 1 views
•
link
Dear All,
I have a bam file aligned to a reference genome. I would like to know if there is a way to calculate the over all length of aligned genome.
Thanks in advance. Sam.
Thanks Bastien. Is this the command to do so:
bedtools genomecov -ibam bamfile.bam -bga -g genomelength.txt
More something like this (get the depth at each position):
bedtools genomecov -ibam input_file.bam -d -split > output_depth.txt
From the output file (output_depth.txt), count the number of line with NOT 0 in the 3rd column (with awk for example) divided by the number of line in the file. You will get the percentage of reference positions covered by at least one read.
Log in to answer this question.