CostaLab / reg-gen

Regulatory Genomics Toolbox: Python library and set of tools for the integrative analysis of high throughput regulatory genomics data.
https://reg-gen.readthedocs.io/
Other
103 stars 30 forks source link

RGT_Differential_Error #246

Open rm1238 opened 1 year ago

rm1238 commented 1 year ago

Hello,

Sorry to bother you again. I was trying to run a differential analysis and the error below popped back:

### Traceback (most recent call last):

File "/Users/ivancorea/miniconda3/bin/rgt-hint", line 33, in

sys.exit(load_entry_point('RGT==1.0.0', 'console_scripts', 'rgt-hint')())

File "/Users/ivancorea/miniconda3/lib/python3.8/site-packages/rgt/HINT/Main.py", line 95, in main

args.func(args)

File "/Users/ivancorea/miniconda3/lib/python3.8/site-packages/rgt/HINT/DifferentialAnalysis.py", line 183, in diff_analysis_run

motif_pwm.append(get_pwm(fasta, mpbs_regions, args.window_size))

File "/Users/ivancorea/miniconda3/lib/python3.8/site-packages/rgt/HINT/DifferentialAnalysis.py", line 476, in get_pwm

dna_seq_rev = AuxiliaryFunctions.revcomp(str(fasta.fetch(region.chrom,

File "/Users/ivancorea/miniconda3/lib/python3.8/site-packages/rgt/Util.py", line 1161, in revcomp

return "".join([revDict[e] for e in s[::-1]])

File "/Users/ivancorea/miniconda3/lib/python3.8/site-packages/rgt/Util.py", line 1161, in

return "".join([revDict[e] for e in s[::-1]])

KeyError: '7'****

Any suggestions on how to fix it would be greatly appreciated.

Thank you,

Ricardo

lzj1769 commented 1 year ago

Hi @rm1238

Can you check the input regions to if how the chromosome was named?

Specifically, the mpbs_regions file.

rm1238 commented 1 year ago

Hi there,

The chromosome name seems normal to me. See screenshot attached. Also see screenshot of error for clarity. I aligned my data to GRCh38.d1.vd1. I have worked with this assembly in the past with RGT-HINT and did not have an issue.

Any suggestions are greatly appreciated.

Thanks,

Ricardo

Screenshot 2023-03-27 at 10 17 12 Screenshot 2023-03-27 at 10 16 15
rm1238 commented 1 year ago

Hi Zhijian,

Just looping back to ask if you had a suggestion as to how to correct this error. Thank you again,

Ricardo

lzj1769 commented 1 year ago

Hi Ricardo,

Sorry for the late reply.

To figure it out, would it be possible for you to share some data that can reproduce this error?

I will then dive deeper to see what is going wrong.

Best, Zhijian

rm1238 commented 1 year ago

Hi Zhijian,

How can I share data with you? I have shared some files in the past but not sure posting a live on Github is a good idea. Can you email me at rm1238@rutgers.edu to set up the data share?

Ricardo