pinellolab / CRISPResso2

Analysis of deep sequencing data for rapid and intuitive interpretation of genome editing experiments
Other
270 stars 94 forks source link

Numpy Error #447

Closed ahrimj21 closed 3 weeks ago

ahrimj21 commented 3 months ago

The command should run Crispresso and create the outputs of the Crispresso batch file, however it is giving out a numpy error instead. @shayanhoss

CRISPResso command to reproduce the behavior: CRISPRessoBatch --batch_settings /Users/ahrim/Desktop/Summer_Lab/Ahrim_SummerWork/Data/2024-05-17_crispressobatch_input-Red.tsv --skip_failed

Full Error: ERROR: module 'numpy' has no attribute 'float'. np.float was a deprecated alias for the builtin float. To avoid this error in existing code, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

WARNING:root:CRISPResso command failed (return value 255) on batch #7: "CRISPResso -o /Users/ahrim/Desktop/Summer_Lab/Ahrim_SummerWork/Data/CRISPRessoBatch_on_2024-05-17_crispressobatch_input-Red --name A08 --fastq_r1 /Users/ahrim/Desktop/Summer_Lab/Ahrim_SummerWork/Data/fastqs/Red/DH20240417RedV4A08_S345_L001_R1_001.fastq.gz --n_processes 1 --min_single_bp_quality 0 --fastq_r2 /Users/ahrim/Desktop/Summer_Lab/Ahrim_SummerWork/Data/fastqs/Red/DH20240417RedV4A08_S345_L001_R2_001.fastq.gz --exclude_bp_from_right 15 --prime_editing_pegRNA_extension_quantification_window_size 5 --max_paired_end_reads_overlap 100 --amplicon_seq GCGAACCTCGATTGTGGTCACAACGGGACAGGAAGGAGTACAGGGCCAAGAGTGAGCCAAGACCAGAATCTGGGACAATCCAGGGTGAATTTGTTTTATACCTGTGCTCTCCTTGATCTCCCCTCAGAGTACCCAAAGGCAAGTGGAACAGCTCTAATGGGGTTGAAGAAAAGGAGACTTGGGTGGAAGAGGATGAACTGTTTCAAGTTCAGGGTAAGCAGAAGATTCTCCTTGGCCTCTTCTTGATGCTTGCTGAAGTACAGATGCGTG --aln_seed_min 2 --aln_seed_count 5 --flexiguide_homology 80 --flash_command flash --plot_window_size 20 --conversion_nuc_from C --needleman_wunsch_gap_incentive 1 --amplicon_name 11 --min_paired_end_reads_overlap 10 --max_rows_alleles_around_cut_to_plot 50 --min_average_read_quality 0 --needleman_wunsch_gap_open -20 --quantification_window_size 15 --min_frequency_alleles_around_cut_to_plot 0.2 --coding_seq AGTACCCAAAGGCAAGTGGAACAGCTCTAATGGGGTTGAAGAAAAGGAGACTTGGGTGGAAGAGGATGAACTGTTTCAAGTTCAGG --prime_editing_pegRNA_scaffold_min_match_length 1 --conversion_nuc_to T --guide_seq GGTTGAAGAAAAGGAGACTT --quantification_window_center "-3" --trimmomatic_command trimmomatic --default_min_aln_score 60 --min_bp_quality_or_N 0 --aln_seed_len 10 --needleman_wunsch_gap_extend -2 --needleman_wunsch_aln_matrix_loc EDNAFULL --exclude_bp_from_left 15" zsh: parse error near `at:'

kclem commented 3 months ago

@ahrimj21 Sorry about this error.

Can you run with the --debug flag and paste the output here?

ahrimj21 commented 3 months ago

Traceback (most recent call last): File "/opt/anaconda3/envs/crispresso2_env/lib/python3.8/site-packages/CRISPResso2/CRISPRessoCORE.py", line 3210, in main mod_pcts.append(np.concatenate((['Insertions'], np.array(all_insertion_count_vectors[ref_name]).astype(np.float)/tot))) File "/opt/anaconda3/envs/crispresso2_env/lib/python3.8/site-packages/numpy/init.py", line 305, in getattr raise AttributeError(former_attrs__[attr]) AttributeError: module 'numpy' has no attribute 'float'. np.float was a deprecated alias for the builtin float. To avoid this error in existing code, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations CRITICAL @ Fri, 21 Jun 2024 21:47:01: Traceback (most recent call last): File "/opt/anaconda3/envs/crispresso2_env/lib/python3.8/site-packages/CRISPResso2/CRISPRessoCORE.py", line 3210, in main mod_pcts.append(np.concatenate((['Insertions'], np.array(all_insertion_count_vectors[ref_name]).astype(np.float)/tot))) File "/opt/anaconda3/envs/crispresso2_env/lib/python3.8/site-packages/numpy/init.py", line 305, in getattr raise AttributeError(former_attrs__[attr]) AttributeError: module 'numpy' has no attribute 'float'. np.float was a deprecated alias for the builtin float. To avoid this error in existing code, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

CRITICAL @ Fri, 21 Jun 2024 21:47:01: Unexpected error, please check your input.

ERROR: module 'numpy' has no attribute 'float'. np.float was a deprecated alias for the builtin float. To avoid this error in existing code, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

WARNING:root:CRISPResso command failed (return value 255) on batch #4: "CRISPResso -o /Users/ahrim/CRISPRessoBatch_on_2024-05-17_crispressobatch_input-Red --name A05 --trimmomatic_command trimmomatic --amplicon_name 11 --needleman_wunsch_aln_matrix_loc EDNAFULL --coding_seq AGTACCCAAAGGCAAGTGGAACAGCTCTAATGGGGTTGAAGAAAAGGAGACTTGGGTGGAAGAGGATGAACTGTTTCAAGTTCAGG --needleman_wunsch_gap_incentive 1 --debug --max_paired_end_reads_overlap 100 --min_bp_quality_or_N 0 --amplicon_seq GCGAACCTCGATTGTGGTCACAACGGGACAGGAAGGAGTACAGGGCCAAGAGTGAGCCAAGACCAGAATCTGGGACAATCCAGGGTGAATTTGTTTTATACCTGTGCTCTCCTTGATCTCCCCTCAGAGTACCCAAAGGCAAGTGGAACAGCTCTAATGGGGTTGAAGAAAAGGAGACTTGGGTGGAAGAGGATGAACTGTTTCAAGTTCAGGGTAAGCAGAAGATTCTCCTTGGCCTCTTCTTGATGCTTGCTGAAGTACAGATGCGTG --flexiguide_homology 80 --fastq_r2 /Users/ahrim/Desktop/Summer_Lab/Ahrim_SummerWork/Data/fastqs/Red/DH20240417RedV4A05_S321_L001_R2_001.fastq.gz --plot_window_size 20 --flash_command flash --conversion_nuc_to T --max_rows_alleles_around_cut_to_plot 50 --min_paired_end_reads_overlap 10 --quantification_window_size 15 --prime_editing_pegRNA_extension_quantification_window_size 5 --exclude_bp_from_left 15 --min_frequency_alleles_around_cut_to_plot 0.2 --needleman_wunsch_gap_extend -2 --exclude_bp_from_right 15 --needleman_wunsch_gap_open -20 --n_processes 1 --guide_seq GGTTGAAGAAAAGGAGACTT --aln_seed_min 2 --fastq_r1 /Users/ahrim/Desktop/Summer_Lab/Ahrim_SummerWork/Data/fastqs/Red/DH20240417RedV4A05_S321_L001_R1_001.fastq.gz --prime_editing_pegRNA_scaffold_min_match_length 1 --conversion_nuc_from C --aln_seed_count 5 --min_average_read_quality 0 --aln_seed_len 10 --min_single_bp_quality 0 --quantification_window_center "-3" --default_min_aln_score 60"

Colelyman commented 3 months ago

Sorry that you are running into this error, would you mind sharing the version of numpy you have installed? I think this may be due to having version 2.0.0 of numpy installed. We will fix this in the next release, but in the meantime everything should work if you install version 1.26.4 of numpy. Let us know if this works or not!

ahrimj21 commented 3 months ago

I have numpy version 1.24.3 installed.

Colelyman commented 3 months ago

Thanks, do you know what version of CRISPResso you have installed? It looks like the latest version (v2.3.1) has this bug fixed https://github.com/pinellolab/CRISPResso2/blob/master/CRISPResso2/CRISPRessoCORE.py#L3764

Please let us know if you still see this error on v2.3.1!

ahrimj21 commented 3 months ago

I have CRISPResso version 2.2.8! I will try installing the latest version right now and let you know. Thank you

tangxj98 commented 3 weeks ago

Hi, just an update. I had the same error. I update the package and the numpy error is gone. But please update your installation instruction in your webpage. It should be conda install crispresso2

Instead of conda install crispresso

The later would by default install v2.2.8 somehow.

Colelyman commented 3 weeks ago

Hi @tangxj98,

Thanks for letting us know, it has been updated on the installation page now!

Thanks, Cole