MutationMapPlotter

MutationMapPlotter(self, mutation_map=None, fname=None)

Generate a mutation map plot

Arguments

  • mutation_map: mutation map object
  • fname: alternatively, specify path to the mutation map

save_to_file

MutationMapPlotter.save_to_file(self, fname)

Save object to an hdf5 file

Arguments

  • fname: file path

plot_mutmap

MutationMapPlotter.plot_mutmap(self, input_entry, model_seq_input, scoring_key, model_output, ax=None, show_letter_scale=False, cmap=None, limit_region=None, limit_region_genomic=None, annotation_vcf=None, annotation_variants=None, ignore_stored_var_annotation=False, rc_plot=False, minimum_letter_height=None, cbar=True, var_box_color='black', show_var_id=True, grad_inp_style_lh=False)

Generate a mutation map plot

Arguments

  • input_entry: index of the region generated by the dataloader. (Integer)
  • model_seq_input: Model input sequence key as defined in model.yaml. e.g. seq
  • scoring_key: Key given for the scoring method. E.g.: diff
  • model_output: Model output name for which the mutation map should be plotted
  • ax: matplotlib axis object
  • show_letter_scale: Display letter scale for seqlogo
  • cmap: Colourmap for the heatmap
  • limit_region: Limit the plotted region: Tuple of (x_start, x_end) where both x_* are integer in [0,sequence_length)
  • limit_region_genomic: Like limit_region but a tuple of genomic positions. Values outside the queried regions are ignored. Region definition has to 0-based!
  • annotation_vcf: VCF used for additional variant annotation in the plot. Only SNVs will be used.
  • annotation_variants: dictionary with key: chr, pos, id, ref, alt and values are lists of strings, except for pos which is a list of integers of 1-based variant positions.
  • ignore_stored_var_annotation: Ignore annotations that have been stored with the mutation map on generation.
  • rc_plot: Reverse-complement plotting
  • minimum_letter_height: Require a minimum height of the reference base. proportion of maximum letter height. e.g. 0.2