nloyfer / wgbs_tools

tools for working with Bisulfite Sequencing data while preserving reads intrinsic dependencies
Other
125 stars 33 forks source link

issues with beta2bw.py #19

Closed e-manduchi closed 1 year ago

e-manduchi commented 1 year ago

Hello, I have generated pat and beta files with 'wgbstools bam2pat'. Prior to running this, I had to sort my bam files with 'samtools sort'.

I then issued command wgbstools beta2bw --dump_cov --genome hg19 -o pat_beta/trackFiles pat_beta/*beta

to generate bw files for both the beta values and the coverage and I found 2 issues:

  1. I got an error at line 73 (convert bedGraphs to bigWigs) complaining that the bedGraph files needed to be sorted first. I resolved this by modifying the python code by adding a 'bedtools sort' step prior to line 73.
  2. No coverage bw files were generated.

I'm not sure if these issues are due to my incorrect usage of the software or reflect small bugs.

Thanks for your attention

nloyfer commented 1 year ago

Thank you for reporting these issues. They are indeed bugs, so I fixed them in a6ba1d1.

Sorting the bedGraph

I only tested wgbstools beta2bw using an old version of bedGraphToBigWig, that did handle unsorted input. I updated beta2bw.py to always sort the bedGraph, so now it supports the latest bedGraphToBigWig.

Coverage bigwig

This was an old feature I removed at some point, and forgot to remove the --dump_cov flag. Since you expressed interest in this feature, I restored it.

e-manduchi commented 1 year ago

Thank you for the fixes!