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 rainfall error #25

Open
temizna opened this issue Jun 18, 2024 · 19 comments
Open

plot rainfall error #25

temizna opened this issue Jun 18, 2024 · 19 comments
Assignees

Comments

@temizna
Copy link

temizna commented Jun 18, 2024

Traceback (most recent call last):
File "", line 1, in
File "/Library/Python/3.10/lib/python/site-packages/SigProfilerClusters/SigProfilerClusters.py", line 706, in analysis
plottingFunctions.rainfall(chrom_based, project, input_path, chrom_path, chromLengths, centromeres, contexts, includedVAFs, includedCCFs, correction, windowSize, bedRanges)
File "/Library/Python/3.10/lib/python/site-packages/SigProfilerClusters/plottingFunctions.py", line 1182, in rainfall
for sample in sorted(samplesSet, key=natural_sortkey):
TypeError: '<' not supported between instances of 'str' and 'int'

@temizna
Copy link
Author

temizna commented Jun 20, 2024

-------Python and Package Versions-------
Python Version: 3.10.8
SigProfilerMatrixGenerator Version: 1.2.14
SigProfilerPlotting version: 1.3.12
matplotlib version: 3.4.3
scipy version: 1.9.3
numpy version: 1.23.4

@MousumyCSE
Copy link
Collaborator

Hi @temizna,

Thanks for reaching out!
I did run SigProfilerClusters pipeline with one of the example file and it has run successfully. It will be great if you can share one of your input files so that I can run at my end.

Best,
Mousumy

@temizna
Copy link
Author

temizna commented Jun 21, 2024 via email

@MousumyCSE
Copy link
Collaborator

Hi @temizna,

Thank you for sending!

Could you please let me know how you are running the cluster pipeline? Additionally please share the log files(.err and .out file). By this time my suggestion will be to create a new conda environment and re-install the tools and run it again.

Best,
Mousumy

@temizna
Copy link
Author

temizna commented Jun 25, 2024 via email

@MousumyCSE
Copy link
Collaborator

Hi @temizna,

I hope you have installed Anaconda or Miniconda in your computer. If you haven't installed Anaconda or Miniconda yet, you can download and install it from their respective websites.

Then create a new conda Environment with Python 3.10. Please see below how you can create an environment:

Create a new environment with Python 3.10

conda create --name myenv python=3.10

Activate the new environment

conda activate myenv

Next, you can re-install the tools using pip (for example: pip install SigProfilerClusters). Please follow wiki page(https://osf.io/qpmzw/wiki/home/) to install the required genome.

Hope that was helpful. Please let me know which genome you are using(GRCh37 or GRCh38) to run the SigProfilerClusters tool?

Best,
Mousumy

@temizna
Copy link
Author

temizna commented Jun 25, 2024 via email

@MousumyCSE
Copy link
Collaborator

I am guessing, it's not a python version issue.
You sent me the python and package versions where it looks you are using Python 3.10.8. However, we have checked with Python 3.11 and it works if you run the SigProfilerClusters tool within python script by defining the main function(please see this issue: #23).

I hope the example files you have shared with me, all are human(GRCh38) sample. Please let me know if I am not correct.

-------Python and Package Versions------- Python Version: 3.10.8 SigProfilerMatrixGenerator Version: 1.2.14 SigProfilerPlotting version: 1.3.12 matplotlib version: 3.4.3 scipy version: 1.9.3 numpy version: 1.23.4

I

@temizna
Copy link
Author

temizna commented Jun 25, 2024 via email

@temizna
Copy link
Author

temizna commented Jun 27, 2024 via email

@MousumyCSE
Copy link
Collaborator

HI @temizna,

Sorry to hear that.
I ran the SigProfilerClusters pipeline with one of your example file and it works at my end(please see the attached
rainfallPlots_clustered_test_corrected.pdf
).

This is how I am running the pipeline:
from SigProfilerMatrixGenerator.scripts import SigProfilerMatrixGeneratorFunc as matGen
matrices = matGen.SigProfilerMatrixGeneratorFunc("test", "mm10", "/Desktop/SigProfilerIssues/SPC_rainfall_plot_issue/",plot=True, exome=False, bed_file=None, chrom_based=False, tsb_stat=False, seqInfo=False, cushion=100)

from SigProfilerSimulator import SigProfilerSimulator as sigSim
sigSim.SigProfilerSimulator("test", "/Desktop/SigProfilerIssues/SPC_rainfall_plot_issue/", "mm10", contexts=['96'], simulations=100, chrom_based=False, exome=False, vcf=False, cushion=100)

from SigProfilerClusters import SigProfilerClusters as hp
hp.analysis("test", "mm10", "96", ["96"], "/Desktop/SigProfilerIssues/SPC_rainfall_plot_issue/", analysis="all", sortSims=True, subClassify=True, correction=True, calculateIMD=True, includedVAFs=False, includedCCFs=False, exome=False)

Can I please ask you to update the packages according to the versions that I am using:
-------Python and Package Versions-------
Python Version: 3.10.14
SigProfilerMatrixGenerator Version: 1.2.26
SigProfilerPlotting version: 1.3.23
matplotlib version: 3.4.3
scipy version: 1.10.1
numpy version: 1.23.5

Hope that will solve your issues. Please let me know if you have any questions.

Best,
Mousumy

@temizna
Copy link
Author

temizna commented Jun 27, 2024 via email

@MousumyCSE
Copy link
Collaborator

Hi @temizna,

Please create a new environment using conda and re-install the tools. Here are the commands below:

Create a new environment

conda create -n SPC_new python=3.10
conda activate SPC_new

Install compatible versions of numpy, pandas, and scipy

conda install numpy=1.23.5 pandas=1.5.3 scipy=1.12.0

#install the tool
pip install SigProfilerClusters

Please run the SigProfilerClusters pipeline again and let me know if that works at your end.

Best,
Mousumy

@temizna
Copy link
Author

temizna commented Jun 28, 2024 via email

@MousumyCSE
Copy link
Collaborator

Hi @temizna,

Sorry to hear that!
It's hard to figure out why it is not working at your end. May be we can set up a quick Zoom call this week or early next week if that works for you.

Best,
Mousumy

@temizna
Copy link
Author

temizna commented Jul 1, 2024 via email

@MousumyCSE
Copy link
Collaborator

Thank you for letting me know. Could you please share your email address!

Best,
Mousumy

@temizna
Copy link
Author

temizna commented Jul 1, 2024 via email

@MousumyCSE
Copy link
Collaborator

Sorry, but your email address is not readable to me. It will be great if you could send an email at mkundu@health.ucsd.edu.

Best,
Mousumy

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