Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Blaise LI
bioinfo_utils
Commits
0372a1b8
Commit
0372a1b8
authored
Feb 19, 2020
by
Blaise Li
Browse files
Skipping size factor graph for small data.
parent
49776bd1
Changes
1
Show whitespace changes
Inline
Side-by-side
RNA_Seq_Cecere/RNA-seq.snakefile
View file @
0372a1b8
...
@@ -1617,7 +1617,8 @@ rule test_size_factor:
...
@@ -1617,7 +1617,8 @@ rule test_size_factor:
# The filter amounts to counts_data.mean(axis=1) > 4
# The filter amounts to counts_data.mean(axis=1) > 4
#np.log10(counts_data[counts_data.sum(axis=1) > 4 * len(counts_data.columns)] + 1).plot.kde()
#np.log10(counts_data[counts_data.sum(axis=1) > 4 * len(counts_data.columns)] + 1).plot.kde()
#np.log10(counts_data[counts_data.prod(axis=1) > 0]).plot.kde()
#np.log10(counts_data[counts_data.prod(axis=1) > 0]).plot.kde()
assert len(counts_data) > 1, "Counts data with only one row cannot have its distribution estimated using KDE."
# assert len(counts_data) > 1, "Counts data with only one row cannot have its distribution estimated using KDE."
if len(counts_data) > 1:
pp = PdfPages(output.norm_counts_distrib_plot)
pp = PdfPages(output.norm_counts_distrib_plot)
for normalizer in params.size_factor_types:
for normalizer in params.size_factor_types:
if normalizer == "median_ratio_to_pseudo_ref":
if normalizer == "median_ratio_to_pseudo_ref":
...
@@ -1677,6 +1678,9 @@ rule test_size_factor:
...
@@ -1677,6 +1678,9 @@ rule test_size_factor:
# "The data matrix has %d lines and %d columns.\n" % (len(data), len(data.columns))])
# "The data matrix has %d lines and %d columns.\n" % (len(data), len(data.columns))])
# warnings.warn(msg + "\nSkipping %s_%s" % (wildcards.orientation, wildcards.biotype))
# warnings.warn(msg + "\nSkipping %s_%s" % (wildcards.orientation, wildcards.biotype))
pp.close()
pp.close()
else:
# Make the file empty
open(output.norm_counts_distrib_plot, "w").close()
# TODO: Deal with 0-counts cases:
# TODO: Deal with 0-counts cases:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment