Skip to content
Snippets Groups Projects
Commit 63669d43 authored by Holly Ruess's avatar Holly Ruess
Browse files

fix issue 58 single rep

parent aff51033
Branches
Tags
1 merge request!55Resolve "add plotProfile"
Pipeline #4233 failed with stages
in 15 seconds
...@@ -301,31 +301,32 @@ def main(): ...@@ -301,31 +301,32 @@ def main():
# if so replace with pool_control # if so replace with pool_control
# unless single control was used # unless single control was used
if not single_control:
path_to_pool_control = cwd + '/' + pool_control if not single_control:
if control_df.values.max() > cutoff_ratio: path_to_pool_control = cwd + '/' + pool_control
logger.info("Number of reads in controls differ by " + if control_df.values.max() > cutoff_ratio:
" > factor of %f. Using pooled controls." % (cutoff_ratio)) logger.info("Number of reads in controls differ by " +
design_new_df['control_tag_align'] = path_to_pool_control " > factor of %f. Using pooled controls." % (cutoff_ratio))
else: design_new_df['control_tag_align'] = path_to_pool_control
for index, row in design_new_df.iterrows(): else:
exp_no_reads = utils.count_lines(row['tag_align']) for index, row in design_new_df.iterrows():
con_no_reads = utils.count_lines(row['control_tag_align']) exp_no_reads = utils.count_lines(row['tag_align'])
if con_no_reads < exp_no_reads: con_no_reads = utils.count_lines(row['control_tag_align'])
logger.info("Fewer reads in control than experiment." + if con_no_reads < exp_no_reads:
"Using pooled controls for replicate %s." logger.info("Fewer reads in control than experiment." +
% row['replicate']) "Using pooled controls for replicate %s."
% row['replicate'])
design_new_df.loc[index, 'control_tag_align'] = \
path_to_pool_control
else:
if paired:
control = row['control_tag_align']
control_basename = os.path.basename(
utils.strip_extensions(control, STRIP_EXTENSIONS))
control_tmp = bedpe_to_tagalign(control, control_basename)
path_to_control = cwd + '/' + control_tmp
design_new_df.loc[index, 'control_tag_align'] = \ design_new_df.loc[index, 'control_tag_align'] = \
path_to_pool_control path_to_control
else:
if paired:
control = row['control_tag_align']
control_basename = os.path.basename(
utils.strip_extensions(control, STRIP_EXTENSIONS))
control_tmp = bedpe_to_tagalign(control, control_basename)
path_to_control = cwd + '/' + control_tmp
design_new_df.loc[index, 'control_tag_align'] = \
path_to_control
else: else:
path_to_pool_control = cwd + '/' + pool_control path_to_pool_control = cwd + '/' + pool_control
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment