From 579d174b7d33be3b5273640a3b2df158f61103a9 Mon Sep 17 00:00:00 2001 From: Tobias Schraink Date: Fri, 4 Dec 2020 20:25:58 -0500 Subject: [PATCH] fixed indexing issue in ptm_per_module in gene_ontology_analysis.py The fixed line would always throw an error because floats are used for indexing a list, which python does not allow. --- phosphodisco/gene_ontology_analysis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phosphodisco/gene_ontology_analysis.py b/phosphodisco/gene_ontology_analysis.py index 4e6ee9a..6c0adfc 100755 --- a/phosphodisco/gene_ontology_analysis.py +++ b/phosphodisco/gene_ontology_analysis.py @@ -74,7 +74,7 @@ def ptm_per_module( raise ValueError('Module sequences must be at least 15 AAs long') if len(list(module_seq_dict.values())[0]) > 15: module_seq_dict = { - k: [seq[(len(seq)/2-0.5)-7: (len(seq)/2-0.5)+8] + k: [seq[int((len(seq)/2-0.5)-7): int((len(seq)/2-0.5)+8)] for seq in v] for k, v in module_seq_dict.items() } background_seqs = set(background_seqs)