Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libhts
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Blaise LI
libhts
Commits
06c17d33
Commit
06c17d33
authored
Dec 14, 2017
by
Blaise Li
Browse files
Options
Downloads
Patches
Plain Diff
Code cleaning and documenting.
parent
ed111f22
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
libhts/libhts.py
+14
-14
14 additions, 14 deletions
libhts/libhts.py
with
14 additions
and
14 deletions
libhts/libhts.py
+
14
−
14
View file @
06c17d33
...
...
@@ -264,32 +264,32 @@ def plot_norm_correlations(correlations):
#correlations.plot.kde(ax=ax1)
#sns.violinplot(data=correlations, orient="h", ax=ax2)
#ax2.set_xlabel("Pearson correlation coefficient")
ax
=
sns
.
violinplot
(
data
=
correlations
,
cut
=
0
)
ax
.
set_ylabel
(
"
Pearson correlation coefficient
"
)
ax
is
=
sns
.
violinplot
(
data
=
correlations
,
cut
=
0
)
ax
is
.
set_ylabel
(
"
Pearson correlation coefficient
"
)
def
plot_counts_distribution
(
data
,
xlabel
):
# TODO: try to plot with semilog x axis
#ax = data.plot.kde(legend=None)
#ax.set_xlabel(xlabel)
#ax.legend(ncol=len(REPS))
#ax
is
= data.plot.kde(legend=None)
#ax
is
.set_xlabel(xlabel)
#ax
is
.legend(ncol=len(REPS))
try
:
ax
=
data
.
plot
.
kde
()
ax
is
=
data
.
plot
.
kde
()
except
ValueError
as
e
:
msg
=
""
.
join
([
"
There seems to be a problem with the data.
\n
"
,
"
The data matrix has %d lines and %d columns.
\n
"
%
(
len
(
data
),
len
(
data
.
columns
))])
warnings
.
warn
(
msg
)
raise
ax
.
set_xlabel
(
xlabel
)
ax
is
.
set_xlabel
(
xlabel
)
def
plot_boxplots
(
data
,
ylabel
):
fig
=
plt
.
figure
(
figsize
=
(
6
,
12
))
ax
=
fig
.
add_subplot
(
111
)
data
.
plot
.
box
(
ax
=
ax
)
ax
.
set_ylabel
(
ylabel
)
for
label
in
ax
.
get_xticklabels
():
ax
is
=
fig
.
add_subplot
(
111
)
data
.
plot
.
box
(
ax
=
ax
is
)
ax
is
.
set_ylabel
(
ylabel
)
for
label
in
ax
is
.
get_xticklabels
():
label
.
set_rotation
(
90
)
plt
.
tight_layout
()
...
...
@@ -352,9 +352,9 @@ def plot_lfc_distribution(res, contrast, fold_type=None):
fold_type
=
"
log2FoldChange
"
lfc
=
getattr
(
res
,
fold_type
).
dropna
()
lfc
.
name
=
contrast
ax
=
sns
.
kdeplot
(
lfc
)
ax
.
set_xlabel
(
fold_type
)
ax
.
set_ylabel
(
"
frequency
"
)
ax
is
=
sns
.
kdeplot
(
lfc
)
ax
is
.
set_xlabel
(
fold_type
)
ax
is
.
set_ylabel
(
"
frequency
"
)
def
make_status2colour
(
down_statuses
,
up_statuses
):
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment