adoebley / Griffin

A flexible framework for nucleosome profiling of cell-free DNA
Other
25 stars 16 forks source link

GC Frequency Calculation error: 'chrom_sizes_dict' is not defined #8

Closed ColinMcKenz closed 1 year ago

ColinMcKenz commented 1 year ago

Hello @adoebley,

I ran into an issue when attempting to set up an hg19 reference. To the best of my knowledge, I should have the necessary /Ref files set up properly for my hg19 reference and the config.yaml should point to the correct files. Running the griffin_genome_GC_frequency.snakefile eventually throws an error some time into the run:

interval 175000 : chr17 51919624 51919632 seconds: 1231.0 Traceback (most recent call last): File "../../scripts/griffin_calc_GC_frequency.py", line 127, in adjusted_end = chrom_sizes_dict[chrom] NameError: name 'chrom_sizes_dict' is not defined

Looking at the griffin_calc_GC_frequency.py script, it seems that 'chrom_size_dict' is defined on line 89, but there is nowhere in that script that 'chrom_sizes_dict' is defined:

chrom_size_dict = chrom_sizes.set_index(0).to_dict()[1]

There are references to both 'chrom_size_dict' and 'chrom_sizes_dict' in multiple places in the script, not sure if they are meant to refer to the same thing or if there should be two different dictionaries defined.

Regards, Colin McKenzie

adoebley commented 1 year ago

Hi, Thanks for bringing this to my attention! I have now fixed it in the most recent commit. Please, let me know if you run into any other issues.