Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plot_cluster_size and generate_network .py errors #49

Open
aebaci opened this issue Apr 9, 2024 · 3 comments
Open

plot_cluster_size and generate_network .py errors #49

aebaci opened this issue Apr 9, 2024 · 3 comments

Comments

@aebaci
Copy link

aebaci commented Apr 9, 2024

Hi. I tried both plotting scripts and both gave errors:
./plot_cluster_size_distribution.py -i ../out1.kinfin_results/cluster_counts_by_taxon.txt -o clustersizedist_out1 -c tab20
[+] Start ...
[+] Plotting "loglogpowerlaw" ...
Traceback (most recent call last):
File "./plot_cluster_size_distribution.py", line 238, in
dataObj.plot_cluster_sizes('loglogpowerlaw')
File "./plot_cluster_size_distribution.py", line 140, in plot_cluster_sizes
mask = np.where(y >= 1, y, "nan")
TypeError: '>=' not supported between instances of 'list' and 'int'
#same happened when I didn't set the -c and -o

./generate_network.py -m ../out1.kinfin_results/all/all.all.cluster_metrics.txt -c ~/WorkKinfin/Kinfin1Interproscan/configkinfin.csv -o outdom1
[+] Parsing SpeciesClassification file: /home/antonella/WorkKinfin/Kinfin1Interproscan/configkinfin.csv ...
[+] Parsing ../out1.kinfin_results/all/all.all.cluster_metrics.txt ...
[-] No column header ending in '_count' found in #cluster_id,cluster_status,cluster_type,cluster_protein_count,cluster_proteome_count,TAXON_protein_count,TAXON_mean_count,non_taxon_mean_count,representation,log2_mean(TAXON/others),pvalue(TAXON vs. others),TAXON_coverage,TAXON_count,non_TAXON_count,TAXON_taxa,non_TAXON_taxa. Please use TAXON.cluster_summary.txt
./generate_network.py -m ../out1.kinfin_results/all/all.cluster_summary.txt -c ~/WorkKinfin/Kinfin1Interproscan/configkinfin.csv -o outdom1
[+] Parsing SpeciesClassification file: /home/antonella/WorkKinfin/Kinfin1Interproscan/configkinfin.csv ...
[+] Parsing ../out1.kinfin_results/all/all.cluster_summary.txt ...
[-] No column header ending in '_count' found in #cluster_id,cluster_protein_count,protein_median_count,TAXON_count,attribute,attribute_cluster_type,protein_span_mean,protein_span_sd,all_count,all_median,all_cov. Please use TAXON.cluster_summary.txt
#I can see several headings having "_count" as ending in these files

With the only file that worked was with the TAXON.cluster_summary.txt (not with the TAXON.*.cluster_metrics.txt)

./generate_network.py -m ../out2.kinfin_results/TAXON/TAXON.cluster_summary.txt -c ~/WorkKinfin/Kinfin1Interproscan/configkinfin2.csv -o out2TAXON
[+] Parsing SpeciesClassification file: /home/antonella/WorkKinfin/Kinfin1Interproscan/configkinfin2.csv ...
[+] Parsing ../out2.kinfin_results/TAXON/TAXON.cluster_summary.txt ...
[+] Max edge weight is 10280, ...
[+] Building graphs
Name: Graph
Type: Graph
Number of nodes: 30
Number of edges: 435
Average degree: 29.0000
[+] Saving network out2TAXON.graph.graphml
[+] Saving network out2TAXON.graph.gexf

@DRL
Copy link
Owner

DRL commented Apr 9, 2024

if you post ../out1.kinfin_results/cluster_counts_by_taxon.txt i can take a look...

re ./generate_network.py ... from the headers it looks like your files are CSVs instead of TSVs ... could that be?

@aebaci
Copy link
Author

aebaci commented Apr 9, 2024 via email

@DRL
Copy link
Owner

DRL commented Apr 9, 2024

I made some changes which might have fixed it, but I can't tell with only 10 lines ... you let me know if the issue persists and with more lines I can do more.

The errors come from matplotlib and other libraries having changed over the years and if nobody runs the code, nobody notices that things break over time ...

For the future, can you please check out this guide on how to format markdown text so that your issues are easier to read.

cheers,

dom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants