Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ChIA-PET_network
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
LBMC
ReGArDS
ChIA-PET_network
Commits
5f9c7b75
Commit
5f9c7b75
authored
4 years ago
by
nfontrod
Browse files
Options
Downloads
Patches
Plain Diff
src/find_interaction_cluster/clip_figures/clip_analyser.py: fix bedtools intersect function
parent
17441b57
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/find_interaction_cluster/clip_figures/clip_analyser.py
+3
-2
3 additions, 2 deletions
src/find_interaction_cluster/clip_figures/clip_analyser.py
with
3 additions
and
2 deletions
src/find_interaction_cluster/clip_figures/clip_analyser.py
+
3
−
2
View file @
5f9c7b75
...
...
@@ -50,7 +50,7 @@ def bedtools_intersect(gene_bed: Path, clip_bed: Path,
"""
res
=
sp
.
check_output
(
f
"
bedtools intersect -a
{
gene_bed
}
"
f
"
-b
{
clip_bed
}
-c
"
,
shell
=
True
)
f
"
-b
{
clip_bed
}
-c
-s
"
,
shell
=
True
)
res
=
StringIO
(
str
(
res
,
"
utf-8
"
))
id_col
=
f
"
id_
{
feature
}
"
columns
=
[
"
chr
"
,
"
start
"
,
"
end
"
,
id_col
,
"
name
"
,
"
strand
"
,
"
clip_peak
"
]
...
...
@@ -182,7 +182,7 @@ def create_table(feature: str, clip_file: Path,
:param com_file: A file containing communities
:return: The final dataframe that can be used to create clip figures
>>>
cf
=
find_or_create_community
(
""
,
3
,
3
,
True
,
1.5
,
"
gene
"
)
>>>
cf
=
find_or_create_community
(
""
,
3
,
3
,
True
,
1.5
,
"
ALL
"
,
"
gene
"
)
>>>
create_table
(
"
gene
"
,
ConfigClip
.
test_clip_bed
,
...
ConfigClip
.
test_gene_bed
,
cf
)
id_gene
clip_peak
peak_density
community
community_size
...
...
@@ -407,6 +407,7 @@ def clip_folder_analysis(clip_folder: Path, project: str, weight: int,
processes
.
append
(
pool
.
apply_async
(
create_figure
,
args
))
[
p
.
get
(
timeout
=
None
)
for
p
in
processes
]
if
__name__
==
"
__main__
"
:
import
doctest
doctest
.
testmod
()
\ No newline at end of file
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