Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle cluster_count values of zero or less in stage1 setup #456

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

dozy
Copy link
Member

@dozy dozy commented May 7, 2019

just use zero for subsample fraction (i.e. don't divide by zero)

@dozy dozy requested a review from srl147 May 7, 2019 15:11
@dozy dozy changed the title handle cluster_count values of zero or less - just use zero for subsa… handle cluster_count values of zero or less in stage1 setup May 7, 2019
@dozy
Copy link
Member Author

dozy commented May 7, 2019

extra tests not yet added

Copy link
Contributor

@srl147 srl147 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks fine, I just checked and samtools view -s ####.0 works on a empty cram file and I assume the downstream checks will happily work on empty fastq file(s)

After discussing this with Marina, why don't you change the logic slightly. A fraction of 0 seems to be interpreted as take everything

if ($cluster_count <= 10000)
p4_params{seed_frac} = sprintf q[%.8f], $id_run + 0.0;
else
$p4_params{seed_frac} = sprintf q[%.8f], (10_000.0 / $cluster_count) + $id_run;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants