2121 HAS_ALPHAMAP = True
2222except ModuleNotFoundError :
2323 warnings .warn (
24- "Dependency 'alphamap' not installed. If you want to use its functionality, install alphaquant with the ' alphamap' extra ."
24+ "Dependency 'alphamap' not installed. If you want to use its functionality, install it with `pip install \" alphaquant[ alphamap] \" ` ."
2525 )
2626 HAS_ALPHAMAP = False
2727
@@ -31,13 +31,6 @@ def __init__(self, condition1, condition2, results_directory, samplemap_file,
3131 order_along_protein_sequence = True , organism = 'Human' ,colorlist = aq_plot_colors .AlphaQuantColorMap ().colorlist , tree_level = 'seq' ,
3232 protein_identifier = 'gene_symbol' , label_rotation = 90 , add_stripplot = False ,
3333 narrowing_factor_for_fcplot = 1 / 14 , rescale_factor_x = 1.0 , rescale_factor_y = 2 ):
34-
35- if not HAS_ALPHAMAP :
36- raise ImportError (
37- "alphamap is required for AlphaMapVisualizer. "
38- "Install it with: pip install \" alphaquant[alphamap]\" "
39- )
40-
4134 """
4235 Initializes an object for visualizing peptide fold changes and AlphaMap sequence alignment.
4336 This class allows for the visualization of different proteins by using the visualize_protein method
@@ -61,7 +54,12 @@ def __init__(self, condition1, condition2, results_directory, samplemap_file,
6154 identifier (str): Identifier for proteins. Can be 'gene_symbol' or 'uniprot_id'.
6255
6356 """
64-
57+ if not HAS_ALPHAMAP :
58+ raise ImportError (
59+ "alphamap is required for AlphaMapVisualizer. "
60+ "Install it with: pip install \" alphaquant[alphamap]\" "
61+ )
62+
6563 self ._fc_visualizer = aq_plot_fc .FoldChangeVisualizer (condition1 , condition2 , results_directory , samplemap_file ,
6664 order_along_protein_sequence = order_along_protein_sequence , organism = organism , colorlist = colorlist ,
6765 tree_level = tree_level , protein_identifier = protein_identifier , label_rotation = label_rotation ,
0 commit comments