Closed KaltenbacherT closed 1 year ago
Hi,
Thank you for the issue - I discovered a bug in the reading of meme files. I fixed it now on the TF-COMB@dev branch, so you can fetch the new version using:
pip install git+https://github.com/loosolab/TF-COMB@dev
The version should then show as:
import tfcomb
tfcomb.__version__
>>> '1.0.4-b'
Let me know if that fixes the issue, thank you!
Hi, thank you for fixing this so fast. Meme files are now accepted without problems.
In the C.TFBS_from_motifs I provide a meme formated file I also used for the TOBIAS analysis but then always following error appears:
multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/lib/python3.8/multiprocessing/pool.py", line 125, in worker result = (True, func(*args, kwds)) File "/home/rad/.local/lib/python3.8/site-packages/tfcomb/utils.py", line 1716, in calculate_TFBS region_TFBS = motifs.scan_sequence(seq, region) File "/home/rad/.local/lib/python3.8/site-packages/tobias/utils/motifs.py", line 429, in scan_sequence self.setup_moods_scanner("+") File "/home/rad/.local/lib/python3.8/site-packages/tobias/utils/motifs.py", line 369, in setup_moods_scanner raise Exception("Missing prefix and/or threshold! Please consider running 'motif.set_prefix()' and 'motif.get_threshold()' on the respective motif(s).") Exception: **Missing prefix and/or threshold! Please consider running 'motif.set_prefix()' and 'motif.get_threshold()' on the respective motif(s). """
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "TF_Comb3.py", line 47, in
C.TFBS_from_motifs(regions=args.regions,
File "/home/rad/.local/lib/python3.8/site-packages/tfcomb/objects.py", line 469, in TFBS_from_motifs
results = [job.get() for job in jobs]
File "/home/rad/.local/lib/python3.8/site-packages/tfcomb/objects.py", line 469, in
results = [job.get() for job in jobs]
File "/usr/lib/python3.8/multiprocessing/pool.py", line 771, in get
raise self._value
Exception: Missing prefix and/or threshold! Please consider running 'motif.set_prefix()' and 'motif.get_threshold()' on the respective motif(s).
The Meme Motif File is downloaded from HOCOMOCOv11 database. The JASPAR format works, however I require the meme format as I integrated a new motif i calculated with MEME-Suite which I only have in the meme format.
I played around with the meme format but it isn't getting resolved. Can u please help me how to resolve this? Thanks in advance!
P.S. The meme format file I am using looks like this:
MEME version 4
ALPHABET= ACGT
strands: + -
Background letter frequencies A 0.25 C 0.25 G 0.25 T 0.25
MOTIF AHR_MOUSE.H11MO.0.B letter-probability matrix: alength= 4 w= 9 nsites= 154 0.26314477735061276 0.11859745819448689 0.36641340309888065 0.25184436135601973 0.07065186803239253 0.07710428433167413 0.2251456131484061 0.6270982344875272 0.14105450572642986 0.2850314719772257 0.13449544731512686 0.4394185749812176 0.0165402342545919 0.008555293579961341 0.9474208905975482 0.027483581567898402 0.0 0.9766155308814389 0.009695999390622859 0.013688469727938113 0.022350405419921632 0.005133176147976808 0.9702350068107785 0.0022814116213230235 0.0 0.02235040541992163 0.004562823242646056 0.9730867713374324 0.0 0.0 1.0 0.0 0.279810224889837 0.43437346977265195 0.10496230952256 0.180853995814951 URL http://hocomoco.autosome.ru/motif/AHR_MOUSE.H11MO.0.B
MOTIF AIRE_MOUSE.H11MO.0.C letter-probability matrix: alength= 4 w= 18 nsites= 41 0.39772727272727304 0.261363636363636 0.125 0.21590909090909102 0.181818181818182 0.181818181818182 0.136363636363636 0.5 0.1363636363636361 0.1363636363636361 0.2045454545454552 0.5227272727272725 0.04545454545454543 0.0 0.8863636363636365 0.06818181818181825 0.0 0.0 0.8181818181818178 0.18181818181818218 0.3181818181818183 0.04545454545454544 0.02272727272727272 0.6136363636363635 0.3863636363636362 0.09090909090909095 0.022727272727272714 0.5000000000000002 0.363636363636364 0.136363636363636 0.136363636363636 0.363636363636364 0.34090909090909094 0.06818181818181819 0.13636363636363596 0.45454545454545486 0.522727272727273 0.09090909090909091 0.13636363636363602 0.25000000000000006 0.38636363636363613 0.04545454545454542 0.06818181818181823 0.5000000000000002 0.22727272727272718 0.1363636363636361 0.06818181818181826 0.5681818181818185 0.0 0.022727272727272714 0.8863636363636365 0.09090909090909095 0.0 0.0 0.9772727272727273 0.02272727272727273 0.22727272727272704 0.09090909090909091 0.25000000000000006 0.4318181818181821 0.06818181818181819 0.18181818181818196 0.18181818181818196 0.5681818181818179 0.45454545454545414 0.02272727272727271 0.15909090909090906 0.3636363636363641 0.403409090909091 0.267045454545455 0.10795454545454498 0.221590909090909 URL http://hocomoco.autosome.ru/motif/AIRE_MOUSE.H11MO.0.C