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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Blaise LI
libhts
Commits
00f3e419
Commit
00f3e419
authored
7 years ago
by
Blaise Li
Browse files
Options
Downloads
Patches
Plain Diff
Library function to make empty bigwig files.
parent
755568ef
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libhts/__init__.py
+3
-1
3 additions, 1 deletion
libhts/__init__.py
libhts/libhts.py
+9
-0
9 additions, 0 deletions
libhts/libhts.py
with
12 additions
and
1 deletion
libhts/__init__.py
+
3
−
1
View file @
00f3e419
from
.libhts
import
(
do_deseq2
,
gtf_2_genes_exon_lengths
,
median_ratio_to_pseudo_ref_size_factors
,
do_deseq2
,
gtf_2_genes_exon_lengths
,
make_empty_bigwig
,
median_ratio_to_pseudo_ref_size_factors
,
plot_boxplots
,
plot_counts_distribution
,
plot_histo
,
plot_lfc_distribution
,
plot_MA
,
plot_norm_correlations
,
plot_paired_scatters
,
plot_scatter
,
...
...
This diff is collapsed.
Click to expand it.
libhts/libhts.py
+
9
−
0
View file @
00f3e419
...
...
@@ -39,6 +39,7 @@ from rpy2.rinterface import RRuntimeError
from
rpy2.robjects.packages
import
importr
deseq2
=
importr
(
"
DESeq2
"
)
from
pybedtools
import
BedTool
import
pyBigWig
import
networkx
as
nx
...
...
@@ -175,6 +176,14 @@ def spikein_gtf_2_lengths(spikein_gtf):
name
=
(
"
union_exon_len
"
)).
rename_axis
(
"
gene
"
))
def
make_empty_bigwig
(
filename
,
chrom_sizes
):
bw_out
=
pyBigWig
.
open
(
filename
,
"
w
"
)
bw_out
.
addHeader
(
list
(
chrom_sizes
.
items
()))
for
(
chrom
,
chrom_len
)
in
bw_out
.
chroms
().
items
():
bw_out
.
addEntries
(
chrom
,
0
,
values
=
np
.
nan_to_num
(
np
.
zeros
(
chrom_len
)[
0
::
10
]),
span
=
10
,
step
=
10
)
bw_out
.
close
()
def
do_deseq2
(
cond_names
,
conditions
,
counts_data
,
formula
=
None
,
contrast
=
None
,
deseq2_args
=
None
):
"""
Runs a DESeq2 differential expression analysis.
"""
...
...
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
register
or
sign in
to comment