Closed msbentsen closed 1 year ago
I received this error from a user and was able to reproduce. When running count_within with stranded=True, and subsequent distance analysis, it is not possible to plot the distribution of TF pair distances.
count_within
stranded=True
Steps to reproduce:
import tfcomb.objects C = tfcomb.objects.CombObj() C.TFBS_from_motifs(regions="../data/GM12878_hg38_chr4_ATAC_peaks.bed", motifs="../data/HOCOMOCOv11_HUMAN_motifs.txt", genome="../data/hg38_chr4.fa.gz", threads=4) C.count_within(max_overlap=0.0, threads=4, stranded=True) C.market_basket() selection = C.select_significant_rules(x_threshold=0.5) selection.analyze_distances(threads=6) TF1, TF2 = selection.distObj.peaks.iloc[0,:2] selection.distObj.plot((TF1, TF2), style="hist")
This occurs due to a discrepancy between selection.count_names and selection.distObj.TF_names
selection.count_names
selection.distObj.TF_names
I will create a PR with a fix, but I might ask for some help with review.
fixed with #56
I received this error from a user and was able to reproduce. When running
count_within
withstranded=True
, and subsequent distance analysis, it is not possible to plot the distribution of TF pair distances.Steps to reproduce:
This occurs due to a discrepancy between
selection.count_names
andselection.distObj.TF_names
I will create a PR with a fix, but I might ask for some help with review.