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

SV/Add Makefile and additional features to Hap-IBD #1

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

svohr
Copy link
Collaborator

@svohr svohr commented Nov 19, 2024

This PR adds a Makefile and basic additional features to Hap-IBD. The Makefile makes it easier to rebuild the jar from source. I removed the jar indexing step because it is deprecated.

Additional Features:

  • Accept indels encoded as I and D as markers for IBD detection. Without this feature, Hap-IBD will throw an exception if it encounters these variants.
  • Add an includesamples option similar to the excludesamples option already provided in Hap-IBD but works by excluding all samples that are NOT included in the includesamples file.
  • Allow the minor allele count filter to be disabled by setting min-mac=0. This change allows for the same markers to be used for independent runs with different sets of individuals.

@svohr svohr changed the title SV/Add Makefile SV/Add Makefile and additional features to Hap-IBD Nov 20, 2024
@@ -403,6 +403,8 @@ private static char flipBase(char c) {
case 'G' : return 'C';
case 'T' : return 'A';
case 'N' : return 'N';
case 'I' : return 'I';
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Insertions and deletions are the same on both strands.

Set<String> exclude = Utilities.idSet(excludeSamplesFile);
return Filter.excludeFilter(exclude);
}
else if (includeSamplesFile!=null) {
Set<String> include = Utilities.idSet(includeSamplesFile);
return Filter.includeFilter(include);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Conveniently, the Filter class already has an includeFilter defined.


// algorithm parameters
min_mac = Validate.intArg("min-mac", argsMap, false, DEF_MIN_MAC, 1, IMAX);
min_mac = Validate.intArg("min-mac", argsMap, false, DEF_MIN_MAC, 0, IMAX);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

min-mac is only used here and if it set to 0 the filtering step is skipped, the same as the case when all markers meet the min-mac requirement.

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

Successfully merging this pull request may close these issues.

1 participant