Skip to content

Commit

Permalink
if a sampling size larger than the number of paths is provided, the w…
Browse files Browse the repository at this point in the history
…hole panel is used for genotyping. Paths are no longer duplicated to match the sampling size
  • Loading branch information
eblerjana committed Jan 31, 2024
1 parent 7c171f3 commit 76478a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,9 @@ int run_single_command(string precomputed_prefix, string readfile, string reffil
} else {
sampling_size = nr_paths;
}
} else if (sampling_size > nr_paths) {
// make sure that sampling size does not exceed nr_paths in panel
sampling_size = nr_paths;
}

PathSampler path_sampler(nr_paths);
Expand Down Expand Up @@ -937,6 +940,9 @@ int run_genotype_command(string precomputed_prefix, string readfile, string outn
} else {
sampling_size = nr_paths;
}
} else if (sampling_size > nr_paths) {
// make sure that sampling size does not exceed nr_paths in panel
sampling_size = nr_paths;
}

PathSampler path_sampler(nr_paths);
Expand Down

0 comments on commit 76478a5

Please sign in to comment.