chrisquince / STRONG

Strain Resolution ON Graphs
MIT License
44 stars 9 forks source link

bedtools coverage with -sorted flag #107

Open marcomeola opened 3 years ago

marcomeola commented 3 years ago

The command in line 40 of the https://github.com/chrisquince/STRONG/blob/master/SnakeNest/Binning.snake script should be changed from:

shell: "bedtools coverage -a {input.bed} -b {input.sample} -mean > {output} 2>{log} " to shell: "bedtools coverage -a {input.bed} -b {input.sample} -mean -sorted > {output} 2>{log} "

which would heavily reduce memory requirements.

marcomeola commented 3 years ago

In order for the bedtools coverage command with the -sorted flag to work properly, the split.bed file needs to be reordered the same way as the sorted.bam files. However, bedtools sort (NODE_100000, NODE_100001, NODE_100002) and samtools sort (NODE_1, NODE_2, NODE_2) give different outputs.