-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #421 from apriltuesday/parallel-evidence
Issue 416 - Parallelise evidence string generation
- Loading branch information
Showing
11 changed files
with
365 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import argparse | ||
import glob | ||
|
||
from cmat.output_generation.report import Report | ||
|
||
parser = argparse.ArgumentParser('Aggregate counts reports') | ||
parser.add_argument('--counts-yml', nargs='+', help='YAML files containing intermediate counts', required=True) | ||
|
||
|
||
if __name__ == '__main__': | ||
args = parser.parse_args() | ||
|
||
# Load all the reports | ||
filenames = [f for files in args.counts_yml for f in glob.glob(files)] | ||
reports = [] | ||
for filename in filenames: | ||
r = Report() | ||
r.load_from_file(filename) | ||
reports.append(r) | ||
|
||
# Sum them up and output the results | ||
complete_report = sum(reports, start=Report()) | ||
complete_report.print_report() | ||
complete_report.dump_to_file(dir_out='.') | ||
complete_report.write_unmapped_terms(dir_out='.') | ||
if not complete_report.check_counts(): | ||
raise RuntimeError('Aggregate counts not consistent') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import argparse | ||
|
||
from cmat.clinvar_xml_io import ClinVarDataset | ||
|
||
parser = argparse.ArgumentParser('Count number of RCV records in the XML, print to stdout') | ||
parser.add_argument('--clinvar-xml', help='ClinVar XML release', required=True) | ||
|
||
|
||
if __name__ == '__main__': | ||
args = parser.parse_args() | ||
print(sum(1 for _ in ClinVarDataset(args.clinvar_xml))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.