Skip to content

Commit

Permalink
change back to original matplotlib rcParams
Browse files Browse the repository at this point in the history
  • Loading branch information
sshen8 committed Apr 23, 2024
1 parent 7e799bc commit 1177db9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions umi_tools/whitelist_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
import itertools
import collections
import matplotlib
# change back to original user params after plotting
_rcParams_orig = matplotlib.rcParams.copy()
import copy
import regex

# require to run on systems with no X11
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.lines as mlines

Expand Down Expand Up @@ -100,6 +100,9 @@ def getKneeEstimateDensity(cell_barcode_counts,

if plotfile_prefix:

# require to run on systems with no X11
matplotlib.use('Agg')

# colour-blind friendly colours - https://gist.github.com/thriveth/8560036
CB_color_cycle = ['#377eb8', '#ff7f00', '#4daf4a',
'#f781bf', '#a65628', '#984ea3',
Expand Down Expand Up @@ -244,6 +247,8 @@ def getKneeEstimateDensity(cell_barcode_counts,

outf.write("%s\t%s\n" % (local_mins_count, threshold_type))

matplotlib.rcParams.update(_rcParams_orig)

return final_barcodes


Expand Down

0 comments on commit 1177db9

Please sign in to comment.