-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Dev gcgi 1378 new gsicapbench inputs (#486) * Update default sample names and placeholder IDs/purity * Simplify by removing the benchmark_params.json file * Add new JSON diff script and tests * Added patient study id raw * Updated changelog * Allowed tumour and normal ids to be manually specified for provenance helper * Added oncokb definitions to 40x assays * Dev-GCGI-1446_fusion-total (#498) * Debugging * Debugging * Update clinically relevant variants count to reflect unique fusions after filtering by OncoKB levels * Update test checksum --------- Co-authored-by: Oumaima Hamza <[email protected]> * self.patient_id_raw defaults to None when not in use -- instead of being undefined, which causes an error * Dev gcgi 1326 whizbam links for fusions (#487) * Dump to json output * Process fusions and generate blob URLs from json template * gzip instead of pysam * skip header to use index * debugging * Fix column names * debugging * Fix genes combination scenario * Get template json * Specify path to file under plugin dir * no message * template json path * debugging * Reformat breakpoint * Search for bam and bai files * Use Node.js script for compression * Get tumour ID * Add positional argument * Add compression script relative path * Fix path * Change to CommonJS syntax * Add js scripts for compression * Convert to to CommonJS syntax * convert to CommonJS syntax * Compression using pysam.bgzip * base64 encoding * Convert into URL safe base64 * Mimic the JavaScript behavior * Fix blob URL format * Fix base64 encode * Compress json not the path to the file * Change whizbam URL * Change csv to tsv file * Fix and refactor fusion test * Changelog * Respond to PR comments: Improve warning/error messages and replace hardcoded values with variables * Clean up process_fusion function by adding helper functions * Add custom error class * Add whizbam_project parameter to the fusion plugin * Optimizing checks for files existence and URL assignment * Fix warning logging --------- Co-authored-by: Oumaima Hamza <[email protected]> * Release 1.7.8 update (#500) * Update changelog and version.py * Revert "Update changelog and version.py" This reverts commit 97bf3d7. * Update changelog and djerba version * Revert "Update changelog and djerba version" This reverts commit 26e27ac. * Update changelog and djerba version --------- Co-authored-by: Oumaima Hamza <[email protected]> * Refactor fusion plugin test; move setup operations to setUp(self) * Remove self.maxDiff = None --------- Co-authored-by: Iain Bancarz PhD <[email protected]> Co-authored-by: Aqsa Alam <[email protected]> Co-authored-by: Aqsa Alam <[email protected]> Co-authored-by: Oumaima Hamza <[email protected]>
- Loading branch information
1 parent
cdaea31
commit 01357cf
Showing
19 changed files
with
455 additions
and
120 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#! /usr/bin/env python3 | ||
|
||
"""Diff two Djerba JSON reports""" | ||
|
||
import argparse | ||
import sys | ||
|
||
sys.path.pop(0) # do not import from script directory | ||
|
||
from djerba.util.benchmark import report_equivalence_tester | ||
from djerba.util.logger import logger | ||
from djerba.util.validator import path_validator | ||
|
||
def get_parser(): | ||
"""Construct the parser for command-line arguments""" | ||
parser = argparse.ArgumentParser( | ||
description='Compare two JSON reports output by Djerba. Exit status is 0 if reports are equivalent, 1 otherwise. Run with --verbose for a summary and/or --print to view the full diff.', | ||
epilog='Run with -h/--help for additional information', | ||
) | ||
parser.add_argument('-r', '--report', metavar='PATH', help='Path to Djerba JSON report file. Must be supplied exactly twice.', required=True, action='append') | ||
parser.add_argument('-d', '--debug', action='store_true', help='More verbose logging') | ||
parser.add_argument('-l', '--log-path', metavar='PATH', help='Output file for log messages; defaults to STDERR') | ||
parser.add_argument('-p', '--print', action='store_true', help='Print a full diff to STDOUT; prints "NONE" if reports are identical') | ||
parser.add_argument('-q', '--quiet', action='store_true', help='Quiet mode; logging errors only') | ||
parser.add_argument('-v', '--verbose', action='store_true', help='Verbose logging') | ||
return parser | ||
|
||
def main(args): | ||
reports = args.report | ||
if len(reports)!=2: | ||
print("ERROR: Must have exactly 2 JSON report files, each specified wtih -r/--report", file=sys.stderr) | ||
sys.exit(1) | ||
log_level = logger.get_log_level(args.debug, args.verbose, args.quiet) | ||
if args.log_path: | ||
path_validator(log_level).validate_output_file(args.log_path) | ||
validator = path_validator(log_level, args.log_path) | ||
for report in reports: | ||
validator.validate_input_file(report) | ||
delta_path = None # TODO make configurable | ||
tester = report_equivalence_tester(reports, delta_path, log_level, args.log_path) | ||
if args.print: | ||
print(tester.get_diff_text()) | ||
if tester.is_equivalent(): | ||
sys.exit(0) | ||
else: | ||
sys.exit(1) | ||
|
||
if __name__ == '__main__': | ||
parser = get_parser() | ||
if len(sys.argv) == 1: | ||
parser.print_help(sys.stderr) | ||
sys.exit(1) | ||
main(parser.parse_args()) |
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 was deleted.
Oops, something went wrong.
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
47 changes: 47 additions & 0 deletions
47
src/lib/djerba/plugins/fusion/fusion_template_to_be_compressed.json
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,47 @@ | ||
{ | ||
"version": "2.15.11", | ||
"showSampleNames": false, | ||
"reference": { | ||
"id": "hg38", | ||
"name": "Human (GRCh38/hg38)", | ||
"fastaURL": "https://igv-genepattern-org.s3.amazonaws.com/genomes/seq/hg38/hg38.fa", | ||
"indexURL": "https://igv-genepattern-org.s3.amazonaws.com/genomes/seq/hg38/hg38.fa.fai", | ||
"cytobandURL": "https://igv-genepattern-org.s3.amazonaws.com/genomes/hg38/cytoBandIdeo.txt.gz", | ||
"aliasURL": "https://igv-genepattern-org.s3.amazonaws.com/genomes/hg38/hg38_alias.tab", | ||
"chromSizesURL": "https://hgdownload.soe.ucsc.edu/goldenPath/hg38/bigZips/hg38.chrom.sizes", | ||
"twoBitURL": "https://hgdownload.soe.ucsc.edu/goldenPath/hg38/bigZips/hg38.2bit", | ||
"chromosomeOrder": "chr1,chr2,chr3,chr4,chr5,chr6,chr7,chr8,chr9,chr10,chr11,chr12,chr13,chr14,chr15,chr16,chr17,chr18,chr19,chr20,chr21,chr22,chrX,chrY" | ||
}, | ||
"locus": [], | ||
"roi": [], | ||
"tracks": [ | ||
{ | ||
"type": "sequence", | ||
"order": -9007199254740991 | ||
}, | ||
{ | ||
"name": "", | ||
"url": "", | ||
"indexURL": "", | ||
"format": "bam", | ||
"type": "alignment", | ||
"samplingDepth": 1000, | ||
"sort": { | ||
"position": 0, | ||
"option": "BASE", | ||
"direction": "DESC" | ||
}, | ||
"order": 1 | ||
}, | ||
{ | ||
"name": "Refseq Genes", | ||
"format": "refgene", | ||
"url": "https://hgdownload.soe.ucsc.edu/goldenPath/hg38/database/ncbiRefSeq.txt.gz", | ||
"indexed": false, | ||
"order": 1000001, | ||
"infoURL": "https://www.ncbi.nlm.nih.gov/gene/?term=$$", | ||
"type": "annotation", | ||
"height": 70 | ||
} | ||
] | ||
} |
Oops, something went wrong.