reg-gen
reg-gen copied to clipboard
KeyError: "sequence 'chr22' not present" for rgt-motifanalysis matching
Hello RGT,
Thanks for developing this amazing package.
I met the error KeyError: "sequence 'chr22' not present"
when following the full-site test tutorial here (http://www.regulatory-genomics.org/motif-analysis/introduction/).
Could you please help me with this issue?
Thanks!
Best,
YJ
cd RGT_MotifAnalysis_FullSiteTest
rgt-motifanalysis matching --input-files input/regions_K562.bed input/background.bed --organism hg19
>> output location: /home/hyjforesight/RGT_MotifAnalysis_FullSiteTest/match
>> genome: hg19
>> pseudocounts: 1.0
>> fpr threshold: 0.0001
>> loading input files..
>>> regions_K562, 358 regions
>>> background, 515 regions
>> loading motif databases..
>>> jaspar_vertebrates
>> motifs loaded: 746
>> matching [regions_K562], 358 regions... Traceback (most recent call last):
File "/home/hyjforesight/.local/bin/rgt-motifanalysis", line 8, in <module>
sys.exit(main())
File "/home/hyjforesight/.local/lib/python3.9/site-packages/rgt/motifanalysis/Main.py", line 58, in main
args.func(args)
File "/home/hyjforesight/.local/lib/python3.9/site-packages/rgt/motifanalysis/Match.py", line 399, in main
sequence = str(genome_file.fetch(genomic_region.chrom, genomic_region.initial, genomic_region.final))
File "pysam/libcfaidx.pyx", line 303, in pysam.libcfaidx.FastaFile.fetch
KeyError: "sequence 'chr22' not present"
Hi, have you prepared the genomes beforehand? http://www.regulatory-genomics.org/rgt/rgt-data-folder/
hello @fabio-t
Thanks for the response.
Yes, I did python ~/rgtdata/setupGenomicData.py --hg19
, but the error continues.
hello @fabio-t Is it because it's not hg19? Thanks! Best, YJ