Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
chipseq_analysis
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Astrocyte
Workflows
BICF
chipseq_analysis
Commits
07e41458
Commit
07e41458
authored
5 years ago
by
Jeremy Mathews
Browse files
Options
Downloads
Patches
Plain Diff
fix indentation in pool and pseudoreplicate
parent
efc98ccc
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
workflow/scripts/pool_and_psuedoreplicate.py
+18
-18
18 additions, 18 deletions
workflow/scripts/pool_and_psuedoreplicate.py
with
18 additions
and
18 deletions
workflow/scripts/pool_and_psuedoreplicate.py
+
18
−
18
View file @
07e41458
...
...
@@ -229,14 +229,14 @@ def generate_design(paired, cutoff_ratio, design_df, cwd, no_reps, no_unique_con
design_new_df
.
at
[
3
,
'
tag_align
'
]
=
design_new_df
.
at
[
0
,
'
tag_align
'
]
# Make 2 self psuedoreplicates
pool
_pseudoreplicates_dict
=
{}
self
_pseudoreplicates_dict
=
{}
for
rep
,
tag_file
in
zip
(
design_df
[
'
replicate
'
],
design_df
[
'
tag_align
'
]):
replicate_prefix
=
experiment_id
+
'
_
'
+
str
(
rep
)
pool
_pseudoreplicates_dict
=
\
self
_pseudoreplicates_dict
=
\
self_psuedoreplication
(
tag_file
,
replicate_prefix
,
paired
)
# Update design to include new self pseudo replicates
for
rep
,
pseudorep_file
in
pool
_pseudoreplicates_dict
.
items
():
for
rep
,
pseudorep_file
in
self
_pseudoreplicates_dict
.
items
():
path_to_file
=
cwd
+
'
/
'
+
pseudorep_file
replicate
=
rep
+
1
design_new_df
.
loc
[
replicate
,
'
tag_align
'
]
=
path_to_file
...
...
@@ -312,25 +312,25 @@ def generate_design(paired, cutoff_ratio, design_df, cwd, no_reps, no_unique_con
path_to_pool_control
=
cwd
+
'
/
'
+
pool_control
design_new_df
[
'
control_tag_align
'
]
=
path_to_pool_control
# Add in pseudo replicates
tmp_metadata
=
design_new_df
.
loc
[
0
].
copy
()
tmp_metadata
[
'
control_tag_align
'
]
=
path_to_pool_control
for
rep
,
pseudorep_file
in
pool_pseudoreplicates_dict
.
items
():
tmp_metadata
[
'
sample_id
'
]
=
experiment_id
+
'
_pr
'
+
str
(
rep
)
tmp_metadata
[
'
replicate
'
]
=
str
(
rep
)
+
'
_pr
'
# Add in pseudo replicates
tmp_metadata
=
design_new_df
.
loc
[
0
].
copy
()
tmp_metadata
[
'
control_tag_align
'
]
=
path_to_pool_control
for
rep
,
pseudorep_file
in
pool_pseudoreplicates_dict
.
items
():
tmp_metadata
[
'
sample_id
'
]
=
experiment_id
+
'
_pr
'
+
str
(
rep
)
tmp_metadata
[
'
replicate
'
]
=
str
(
rep
)
+
'
_pr
'
tmp_metadata
[
'
xcor
'
]
=
'
Calculate
'
path_to_file
=
cwd
+
'
/
'
+
pseudorep_file
tmp_metadata
[
'
tag_align
'
]
=
path_to_file
design_new_df
=
design_new_df
.
append
(
tmp_metadata
)
# Add in pool experiment
tmp_metadata
[
'
sample_id
'
]
=
experiment_id
+
'
_pooled
'
tmp_metadata
[
'
replicate
'
]
=
'
pooled
'
tmp_metadata
[
'
xcor
'
]
=
'
Calculate
'
path_to_file
=
cwd
+
'
/
'
+
p
seudorep_fil
e
path_to_file
=
cwd
+
'
/
'
+
p
ool_experiment_s
e
tmp_metadata
[
'
tag_align
'
]
=
path_to_file
design_new_df
=
design_new_df
.
append
(
tmp_metadata
)
# Add in pool experiment
tmp_metadata
[
'
sample_id
'
]
=
experiment_id
+
'
_pooled
'
tmp_metadata
[
'
replicate
'
]
=
'
pooled
'
tmp_metadata
[
'
xcor
'
]
=
'
Calculate
'
path_to_file
=
cwd
+
'
/
'
+
pool_experiment_se
tmp_metadata
[
'
tag_align
'
]
=
path_to_file
design_new_df
=
design_new_df
.
append
(
tmp_metadata
)
return
design_new_df
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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