Skip to content
Snippets Groups Projects
Commit 481f6287 authored by Venkat Malladi's avatar Venkat Malladi
Browse files

Fix single replicate issue.

parent e991c627
No related merge requests found
Pipeline #1391 passed with stage
in 5 hours, 14 minutes, and 3 seconds
...@@ -241,20 +241,22 @@ def main(): ...@@ -241,20 +241,22 @@ def main():
design_new_df = design_df design_new_df = design_df
# Check controls against cutoff_ratio # Check controls against cutoff_ratio
# if so replace with pool_control # if so replace with pool_control
# unless single control was used
path_to_pool_control = cwd + '/' + pool_control path_to_pool_control = cwd + '/' + pool_control
if control_df.values.max() > 1.2 and not single_control: if not single_control:
logger.info("Number of reads in controls differ by " + if control_df.values.max() > 1.2:
" > 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."
design_new_df.loc[index, 'control_tag_align'] = \ % row['replicate'])
design_new_df.loc[index, 'control_tag_align'] = \
path_to_pool_control path_to_pool_control
# Add in pseudo replicates # Add in pseudo replicates
......
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