def determineOtherOptions(args): opts = dict() opts[OptionConstants.NO_PREPEND] = not args.prepend opts[OptionConstants.VCF_OUT_INFER_GENOTYPES] = MutUtils.str2bool( args.infer_genotypes) opts[OptionConstants.INFER_ONPS] = args.infer_onps opts[ OptionConstants.CUSTOM_CANONICAL_TX_LIST_FILE] = args.canonical_tx_file return opts
def determineOtherOptions(args, logger): opts = dict() opts[OptionConstants.NO_PREPEND] = not args.prepend opts[OptionConstants.VCF_OUT_INFER_GENOTYPES] = MutUtils.str2bool(args.infer_genotypes) if args.input_format == "VCF" and args.output_format == "VCF": if opts[OptionConstants.VCF_OUT_INFER_GENOTYPES]: logger.warn("Infer genotypes option has been set to true. " "Because the input is a VCF file, infer genotypes will have no effect on the output.") return opts
def determineOtherOptions(args): opts = dict() opts[OptionConstants.NO_PREPEND] = not args.prepend opts[OptionConstants.VCF_OUT_INFER_GENOTYPES] = MutUtils.str2bool(args.infer_genotypes) opts[OptionConstants.INFER_ONPS] = args.infer_onps opts[OptionConstants.CUSTOM_CANONICAL_TX_LIST_FILE] = args.canonical_tx_file opts[OptionConstants.COLLAPSE_FILTER_COLS] = args.collapse_filter_cols opts[OptionConstants.REANNOTATE_TCGA_MAF_COLS] = args.reannotate_tcga_maf_cols opts[OptionConstants.ALLOW_ANNOTATION_OVERWRITING] = args.allow_overwriting opts[OptionConstants.COLLAPSE_NUMBER_ANNOTATIONS] = args.collapse_number_annotations return opts
def testGenotypeFieldIsHonored(self): """ Tests that no issues arise with genotype values >1 when multiple variants appear on one line. """ inputFilename = os.path.join(*["testdata", "vcf", "example.severalGTs.vcf"]) creator = VcfInputMutationCreator(inputFilename) muts = creator.createMutations() ctr = 0 for mut in muts: if MutUtils.str2bool(mut["alt_allele_seen"]): self.assertTrue(mut['sample_name'] != "NA 00001") ctr += 1 self.assertTrue(ctr == 7, str(ctr) + " mutations with alt seen, but expected 7. './.' should not show as a variant.")
def determineOtherOptions(args): opts = dict() opts[OptionConstants.NO_PREPEND] = not args.prepend opts[OptionConstants.VCF_OUT_INFER_GENOTYPES] = MutUtils.str2bool( args.infer_genotypes) opts[OptionConstants.INFER_ONPS] = args.infer_onps opts[ OptionConstants.CUSTOM_CANONICAL_TX_LIST_FILE] = args.canonical_tx_file opts[OptionConstants.COLLAPSE_FILTER_COLS] = args.collapse_filter_cols opts[OptionConstants. REANNOTATE_TCGA_MAF_COLS] = args.reannotate_tcga_maf_cols opts[OptionConstants.ALLOW_ANNOTATION_OVERWRITING] = args.allow_overwriting opts[OptionConstants. COLLAPSE_NUMBER_ANNOTATIONS] = args.collapse_number_annotations return opts
def determineOtherOptions(args): opts = dict() opts[OptionConstants.NO_PREPEND] = not args.prepend opts[OptionConstants.VCF_OUT_INFER_GENOTYPES] = MutUtils.str2bool(args.infer_genotypes) return opts