This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Bedtools -Sorted Genome File

Bedtools coverage says to use the -sorted option for bedtools coverage, I need to provide a genome file that:

Defines the expected chromosome order in the input files for use with the -sorted option.

How is the file supposed to look? I included one that listed out all of the chromosomes, but received an error that genome file has no valid entries.

bedtools

1 answer

Hello gtasource,

this file needs the chromosome name and the length of the chromosomes. You can extract these information from your alignment file as the information are in the header:

$ samtools view -H file.bam|grep @SQ|sed 's/@SQ\tSN:\|LN://g'' > genome.txt

fin swimmer

Log in to answer this question.