AlexandrovLab / SigProfilerClusters

Tool for analyzing the inter-mutational distances between SNV-SNV and INDEL-INDEL mutations. Tool separates mutations into clustered and non-clustered groups on a sample-dependent basis.
BSD 2-Clause "Simplified" License
11 stars 1 forks source link

plot rainfall error #25

Open temizna opened 4 months ago

temizna commented 4 months ago

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 commented 4 months ago

-------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 commented 4 months ago

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 commented 4 months ago

-------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

43_Liver_tumor_2.mut.dna.pass.ad3.dp10.vaf0.05.vcf https://drive.google.com/file/d/1yqyqOlvgioQGSZe73Lt0M4T0196xXIAO/view?usp=drive_web 78_liver_tumor.mut.dna.pass.ad3.dp10.vaf0.05.vcf https://drive.google.com/file/d/11IJ4pizAZzL-yF76wgRbNoVuIld-JTWX/view?usp=drive_web 131_renal_node_1.mut.dna.pass.ad3.dp10.vaf0.05.vcf https://drive.google.com/file/d/1UwM3iq1jd5nABSdsqwlU7zJu7bs71q9n/view?usp=drive_web CD_4NQO_178_tumor_S26.mut.dna.pass.ad3.dp10.vaf0.05.vcf https://drive.google.com/file/d/1J6Q67tlgau7_0beryJVLZgjTfZz82KOs/view?usp=drive_web CD_4NQO_247_tumor_S28.mut.dna.pass.ad3.dp10.vaf0.05.vcf https://drive.google.com/file/d/1D2PkHkovdJyOPgC83lpOvujC0EGBKvro/view?usp=drive_web

On Fri, Jun 21, 2024 at 12:51 AM Mousumy Kundu @.***> wrote:

Hi @temizna https://github.com/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

— Reply to this email directly, view it on GitHub https://github.com/AlexandrovLab/SigProfilerClusters/issues/25#issuecomment-2181995496, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE7I5FYTWH26SHSZF6FZXMTZIOWNLAVCNFSM6AAAAABJQDCPD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBRHE4TKNBZGY . You are receiving this because you were mentioned.Message ID: @.***>

MousumyCSE commented 4 months ago

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 commented 3 months ago

How do you create a new conda environment for the tools? I did not see an option like that on the github pages. I used pip to install these

A

On Fri, Jun 21, 2024 at 12:46 PM Mousumy Kundu @.***> wrote:

Hi @temizna https://github.com/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

— Reply to this email directly, view it on GitHub https://github.com/AlexandrovLab/SigProfilerClusters/issues/25#issuecomment-2183180238, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE7I5F2VTQPMUU3Q6HB6FTDZIRRJFAVCNFSM6AAAAABJQDCPD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBTGE4DAMRTHA . You are receiving this because you were mentioned.Message ID: @.***>

MousumyCSE commented 3 months ago

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 commented 3 months ago

I have python 3.11. Do you think that is causing the issue? I use grch38 and mm10 for human and mouse.

On Tue, Jun 25, 2024 at 11:30 AM Mousumy Kundu @.***> wrote:

Hi @temizna https://github.com/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

— Reply to this email directly, view it on GitHub https://github.com/AlexandrovLab/SigProfilerClusters/issues/25#issuecomment-2189412675, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE7I5FYIVWZ7O63U5EVHVM3ZJGLLLAVCNFSM6AAAAABJQDCPD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBZGQYTENRXGU . You are receiving this because you were mentioned.Message ID: @.***>

MousumyCSE commented 3 months ago

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: https://github.com/AlexandrovLab/SigProfilerClusters/issues/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 commented 3 months ago

mm10

On Tue, Jun 25, 2024 at 11:50 AM Mousumy Kundu @.***> wrote:

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 https://github.com/AlexandrovLab/SigProfilerClusters/issues/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

— Reply to this email directly, view it on GitHub https://github.com/AlexandrovLab/SigProfilerClusters/issues/25#issuecomment-2189453429, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE7I5F5J7TRLXGXCDKQSM43ZJGNWPAVCNFSM6AAAAABJQDCPD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBZGQ2TGNBSHE . You are receiving this because you were mentioned.Message ID: @.***>

temizna commented 3 months ago

I followed your advice and I am still getting the same plot rainfall error:

Traceback (most recent call last): File "", line 1, in File "/Users/temizna/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 "/Users/temizna/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'

On Tue, Jun 25, 2024 at 11:56 AM Nuri Temiz @.***> wrote:

mm10

On Tue, Jun 25, 2024 at 11:50 AM Mousumy Kundu @.***> wrote:

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 https://github.com/AlexandrovLab/SigProfilerClusters/issues/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

— Reply to this email directly, view it on GitHub https://github.com/AlexandrovLab/SigProfilerClusters/issues/25#issuecomment-2189453429, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE7I5F5J7TRLXGXCDKQSM43ZJGNWPAVCNFSM6AAAAABJQDCPD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBZGQ2TGNBSHE . You are receiving this because you were mentioned.Message ID: @.***>

MousumyCSE commented 3 months ago

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 commented 3 months ago

I am getting a sigplofilerplotting error and also scypy error:

temizna$ pip install --force-reinstall -v "SipProfilerPlotting==1.3.23"

Using pip 24.0 from /Users/temizna/anaconda3/envs/sigprofiler/lib/python3.10/site-packages/pip (python 3.10)

ERROR: Could not find a version that satisfies the requirement SipProfilerPlotting==1.3.23 (from versions: none)

ERROR: No matching distribution found for SipProfilerPlotting==1.3.23

sigprofilermatrixgenerator 1.2.26 requires scipy>=1.12.0; python_version >= "3.9", but you have scipy 1.10.1 which is incompatible.

On Thu, Jun 27, 2024 at 12:27 PM Mousumy Kundu @.***> wrote:

HI @temizna https://github.com/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 https://github.com/user-attachments/files/16018755/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

— Reply to this email directly, view it on GitHub https://github.com/AlexandrovLab/SigProfilerClusters/issues/25#issuecomment-2195272114, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE7I5F2MAWQBN2JOI6EA2BLZJRDOLAVCNFSM6AAAAABJQDCPD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJVGI3TEMJRGQ . You are receiving this because you were mentioned.Message ID: @.***>

MousumyCSE commented 3 months ago

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 commented 3 months ago

did all that still getting the following error: Traceback (most recent call last): File "", line 1, in File "/Users/temizna/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 "/Users/temizna/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'

On Thu, Jun 27, 2024 at 2:01 PM Mousumy Kundu @.***> wrote:

Hi @temizna https://github.com/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

— Reply to this email directly, view it on GitHub https://github.com/AlexandrovLab/SigProfilerClusters/issues/25#issuecomment-2195476519, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE7I5F2IV2RYO4KSCUK2CJLZJROSJAVCNFSM6AAAAABJQDCPD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJVGQ3TMNJRHE . You are receiving this because you were mentioned.Message ID: @.***>

MousumyCSE commented 3 months ago

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 commented 3 months ago

I can meet Tuesday July 9 in the afternoon central time. I am free from 1 pm central till 5 pm central.

Thanks.

Alpay

On Mon, Jul 1, 2024 at 1:04 PM Mousumy Kundu @.***> wrote:

Hi @temizna https://github.com/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

— Reply to this email directly, view it on GitHub https://github.com/AlexandrovLab/SigProfilerClusters/issues/25#issuecomment-2200730983, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE7I5F5M3GSF5G2W2YL6SKDZKGK2VAVCNFSM6AAAAABJQDCPD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBQG4ZTAOJYGM . You are receiving this because you were mentioned.Message ID: @.***>

MousumyCSE commented 3 months ago

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

Best, Mousumy

temizna commented 3 months ago

@.***

On Mon, Jul 1, 2024 at 1:34 PM Mousumy Kundu @.***> wrote:

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

Best, Mousumy

— Reply to this email directly, view it on GitHub https://github.com/AlexandrovLab/SigProfilerClusters/issues/25#issuecomment-2200778012, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE7I5FZWFEXIOONPYJ5ID5DZKGOLNAVCNFSM6AAAAABJQDCPD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBQG43TQMBRGI . You are receiving this because you were mentioned.Message ID: @.***>

MousumyCSE commented 3 months ago

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

blastchinchillas commented 2 months ago

Dont know whether this issue solved or not, but according to my reply in the other issue (https://github.com/AlexandrovLab/SigProfilerClusters/issues/27#issuecomment-2289608845), it might be you are tring to use contexts=["96"] as input. Using contexts="96" may help.

temizna commented 2 months ago

I will try that. Thanks.

On Wednesday, August 14, 2024, blastchinchillas @.***> wrote:

Dont know whether this issue solved or not, but according to my reply in the other issue (#27 (comment) https://github.com/AlexandrovLab/SigProfilerClusters/issues/27#issuecomment-2289608845), it might be you are tring to use contexts=["96"] as input. Using contexts="96" may help.

— Reply to this email directly, view it on GitHub https://github.com/AlexandrovLab/SigProfilerClusters/issues/25#issuecomment-2289617497, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE7I5FYU4T6ULAHMLGZLUX3ZROSWNAVCNFSM6AAAAABJQDCPD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBZGYYTONBZG4 . You are receiving this because you were mentioned.Message ID: @.***>