<commit_before>import os.path
import gzip
import json
import unittest
from datetime import datetime

from types import SimpleNamespace

from eva_cttv_pipeline.evidence_string_generation import clinvar
from eva_cttv_pipeline.evidence_string_generation import clinvar_to_evidence_strings
from eva_cttv_pipeline.evidence_string_generation import consequence_type as CT
from eva_cttv_pipeline.evidence_string_generation import evidence_strings
from tests.evidence_string_generation import test_clinvar_to_evidence_strings
from tests.evidence_string_generation import config

DATE_LAST_UPDATED = 1412982000000
DATE_ASSERTED = datetime.fromtimestamp((DATE_LAST_UPDATED / 1000)).isoformat()


MAPPINGS = SimpleNamespace()


def _get_test_cellbase_record_gene():
    return {"chromosome":"3","start":150645894,"end":150645894,"reference":"A","alternate":"C","source":"clinvar","clinvarSet":{"recordStatus":"current","title":"NM_001195794.1(CLRN1):c.567T>G (p.Tyr189Ter) AND Usher syndrome, type 3","referenceClinVarAssertion":{"clinVarAccession":{"acc":"RCV000004642","version":3,"type":"RCV","dateUpdated":1435446000000},"recordStatus":"current","clinicalSignificance":{"reviewStatus":"CRITERIA_PROVIDED_SINGLE_SUBMITTER","description":"Pathogenic","dateLastEvaluated":1435100400000},"assertion":{"type":"VARIATION_TO_DISEASE"},"attributeSet":[{"attribute":{"value":"Autosomal recessive inheritance","integerValue":263,"type":"ModeOfInheritance"},"xref":[{"db":"Laboratory for Molecular Medicine, Partners HealthCare Personalized Medicine","id":"11483565","status":"CURRENT"}]}],"observedIn":[{"sample":{"origin":"germline","species":{"value":"human","taxonomyId":9606},"affectedStatus":"not provided"},"method":[{"methodType":"CLINICAL_TESTING"},{"methodType":"LITERATURE_ONLY"}],"observedData":[{"attribute":{"integerValue":2,"type":"NumFamiliesWithVariant"},"id":6557764},{"attribute":{"value":"not provided","type":"Description"},"id":6557764},{"attribute":{"value":"Fields et al. (2002) demonstrated that the Fin(major) USH3A mutation in exon 3 of the USH3A gene, which had been identified by Joensuu et al. (2001) as 300C-T (TYR100TER), should be referred to as 528T-G, resulting in a tyr176-to-ter substitution. Joensuu et al. (2001) had identified homozygosity for this mutation in a Finnish family segregating Usher syndrome type IIIA (USH3A; 276902) and found it in a further 52 Finnish patients. Fields et al. (2002) found this mutation in 11 of 28 mutated alleles from affected individuals of Finnish and other northern European ancestry.","type":"Description"},"citation":[{"id":[{"value":"11524702","source":"PubMed"}],"type":"general"},{"id":[{"value":"12145752","source":"PubMed"}],"type":"general"}],"id":6557764},{"attribute":{"integerValue":3,"type":"VariantAlleles"},"id":6557764}]}],"measureSet":{"measure":[{"name":[{"elementValue":{"value":"NM_001195794.1(CLRN1):c.567T>G (p.Tyr189Ter)","type":"Preferred"}}],"attributeSet":[{"attribute":{"value":"0.000076887590","type":"AlleleFrequency"},"xref":[{"db":"dbSNP","id":"121908140","status":"CURRENT"},{"db":"NHLBI GO Exome Sequencing Project (ESP)","id":"ESP6500SI-V2","url":"http://evs.gs.washington.edu/EVS/","status":"CURRENT"}]},{"attribute":{"value":"NM_174878.2:c.528T>G","type":"HGVS, coding","change":"c.528T>G"}},{"attribute":{"value":"NM_001256819.1:c.*142T>G","type":"HGVS, coding, RefSeq","change":"c.*142T>G"}},{"attribute":{"value":"NM_052995.2:c.300T>G","type":"HGVS, coding, RefSeq","change":"c.300T>G"}},{"attribute":{"value":"NM_001195794.1:c.567T>G","type":"HGVS, coding, RefSeq","change":"c.567T>G"}},{"attribute":{"value":"NG_009168.1:g.49893T>G","type":"HGVS, genomic, RefSeqGene","change":"g.49893T>G"}},{"attribute":{"value":"NC_000003.12:g.150928107A>C","integerValue":38,"type":"HGVS, genomic, top level","change":"g.150928107A>C"}},{"attribute":{"value":"NC_000003.11:g.150645894A>C","integerValue":37,"type":"HGVS, genomic, top level, previous","change":"g.150645894A>C"}},{"attribute":{"value":"NR_046380.2:n.1009T>G","type":"HGVS, non-coding","change":"n.1009T>G"}},{"attribute":{"value":"NR_046380.1:n.1010T>G","type":"HGVS, previous","change":"n.1010T>G"}},{"attribute":{"value":"p.Tyr176X","type":"HGVS, protein"}},{"attribute":{"value":"NP_443721.1:p.Tyr100Ter","type":"HGVS, protein, RefSeq","change":"p.Tyr100Ter"},"xref":[{"db":"dbSNP","id":"121908140","type":"rs","status":"CURRENT"}]},{"attribute":{"value":"NP_777367.1:p.Tyr176Ter","type":"HGVS, protein, RefSeq","change":"p.Tyr176Ter"},"xref":[{"db":"dbSNP","id":"121908140","type":"rs","status":"CURRENT"}]},{"attribute":{"value":"NP_001182723.1:p.Tyr189Ter","type":"HGVS, protein, RefSeq","change":"p.Tyr189Ter"},"xref":[{"db":"dbSNP","id":"121908140","type":"rs","status":"CURRENT"}]},{"attribute":{"value":"NM_174878.2:EXON 3","type":"Location"}},{"attribute":{"value":"3 prime UTR variant","type":"MolecularConsequence"},"xref":[{"db":"Sequence Ontology","id":"SO:0001624","status":"CURRENT"},{"db":"RefSeq","id":"NM_001256819.1:c.*142T>G","status":"CURRENT"}]},{"attribute":{"value":"nonsense","type":"MolecularConsequence"},"xref":[{"db":"Sequence Ontology","id":"SO:0001587","status":"CURRENT"},{"db":"RefSeq","id":"NM_001195794.1:c.567T>G","status":"CURRENT"}]},{"attribute":{"value":"non-coding transcript variant","type":"MolecularConsequence"},"xref":[{"db":"Sequence Ontology","id":"SO:0001619","status":"CURRENT"},{"db":"RefSeq","id":"NR_046380.2:n.1009T>G","status":"CURRENT"}]},{"attribute":{"value":"Y176*","type":"ProteinChange1LetterCode"},"xref":[{"db":"OMIM","id":"606397.0001","type":"Allelic variant","status":"CURRENT"}]},{"attribute":{"value":"Y100*","type":"ProteinChange1LetterCode"}},{"attribute":{"value":"Y189*","type":"ProteinChange1LetterCode"}},{"attribute":{"value":"TYR176TER","type":"ProteinChange3LetterCode"},"xref":[{"db":"OMIM","id":"606397.0001","type":"Allelic variant","status":"CURRENT"}]}],"cytogeneticLocation":["3q25.1"],"sequenceLocation":[{"assembly":"GRCh38","chr":"3","accession":"NC_000003.12","start":150928107,"stop":150928107,"displayStart":150928107,"displayStop":150928107,"variantLength":1,"referenceAllele":"A","alternateAllele":"C","assemblyAccessionVersion":"GCF_000001405.26","assemblyStatus":"current"},{"assembly":"GRCh37","chr":"3","accession":"NC_000003.11","start":150645894,"stop":150645894,"displayStart":150645894,"displayStop":150645894,"variantLength":1,"referenceAllele":"A","alternateAllele":"C","assemblyAccessionVersion":"GCF_000001405.25","assemblyStatus":"previous"}],"measureRelationship":[{"name":[{"elementValue":{"value":"clarin 1","type":"Preferred"}}],"symbol":[{"elementValue":{"value":"CLRN1","type":"Preferred"}}],"sequenceLocation":[{"assembly":"GRCh38","chr":"3","accession":"NC_000003.12","start":150918910,"stop":150973019,"displayStart":150918910,"displayStop":150973019,"strand":"-","variantLength":46837,"assemblyAccessionVersion":"GCF_000001405.26","assemblyStatus":"current"},{"assembly":"GRCh37","chr":"3","accession":"NC_000003.11","start":150643949,"stop":150690785,"displayStart":150643949,"displayStop":150690785,"strand":"-","variantLength":46837,"assemblyAccessionVersion":"GCF_000001405.25","assemblyStatus":"previous"}],"type":"variant in gene","xref":[{"db":"Gene","id":"7401","status":"CURRENT"},{"db":"OMIM","id":"606397","type":"MIM","status":"CURRENT"}]}],"type":"single nucleotide variant","id":19431,"xref":[{"db":"OMIM","id":"606397.0001","type":"Allelic variant","status":"CURRENT"},{"db":"dbSNP","id":"121908140","type":"rs","status":"CURRENT"}]}],"name":[{"elementValue":{"value":"NM_001195794.1(CLRN1):c.567T>G (p.Tyr189Ter)","type":"Preferred"}}],"type":"Variant","id":4392},"traitSet":{"trait":[{"name":[{"elementValue":{"value":"Usher syndrome, type 3","type":"Preferred"},"xref":[{"db":"Genetic Alliance","id":"Usher+syndrome%2C+type+3/7326","status":"CURRENT"},{"db":"Office of Rare Diseases","id":"5442","status":"CURRENT"}]},{"elementValue":{"value":"Usher Syndrome, Type III","type":"Alternate"}},{"elementValue":{"value":"USHER SYNDROME, TYPE IIIA","type":"Alternate"},"xref":[{"db":"OMIM","id":"276902","type":"MIM","status":"CURRENT"},{"db":"OMIM","id":"606397.0002","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0007","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0001","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0004","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0005","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0003","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0008","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0006","type":"Allelic variant","status":"CURRENT"}]},{"elementValue":{"value":"Usher syndrome, type 3A","type":"Alternate"}},{"elementValue":{"value":"Orphanet:886","type":"EFO id"}},{"elementValue":{"value":"Usher syndrome","type":"EFO name"}},{"elementValue":{"value":"http://www.orpha.net/ORDO/Orphanet_886","type":"EFO URL"}}],"symbol":[{"elementValue":{"value":"USH3","type":"Preferred"},"xref":[{"db":"OMIM","id":"276902","type":"MIM","status":"CURRENT"},{"db":"Office of Rare Diseases","id":"5442","status":"CURRENT"}]},{"elementValue":{"value":"USH3A","type":"Alternate"},"xref":[{"db":"OMIM","id":"276902","type":"MIM","status":"CURRENT"},{"db":"Office of Rare Diseases","id":"5442","status":"CURRENT"}]}],"attributeSet":[{"attribute":{"value":"Neonatal/infancy","type":"age of onset"},"xref":[{"db":"Orphanet","id":"886","status":"CURRENT"},{"db":"Orphanet","id":"231183","status":"CURRENT"}]}],"citation":[{"id":[{"value":"21697857","source":"PubMed"}],"type":"Translational/Evidence-based","abbrev":"EuroGenetest, 2011"}],"type":"Disease","id":5092,"xref":[{"db":"MedGen","id":"C1568248","status":"CURRENT"},{"db":"Orphanet","id":"231183","status":"CURRENT"},{"db":"Orphanet","id":"886","status":"CURRENT"},{"db":"OMIM","id":"276902","type":"MIM","status":"CURRENT"}]}],"type":"Disease","id":1209},"dateCreated":1344812400000,"dateLastUpdated":1435359600000,"id":62145},"clinVarAssertion":[{"clinVarSubmissionID":{"submitter":"OMIM","title":"CLRN1, TYR176TER_USHER SYNDROME, TYPE IIIA","localKey":"606397.0001_USHER SYNDROME, TYPE IIIA","submitterDate":1435100400000},"clinVarAccession":{"acc":"SCV000024816","version":2,"type":"SCV","orgID":3,"dateUpdated":1435359600000},"recordStatus":"current","clinicalSignificance":{"reviewStatus":"NO_ASSERTION_CRITERIA_PROVIDED","description":["Pathogenic"],"dateLastEvaluated":1435100400000},"assertion":{"type":"variation to disease"},"externalID":{"db":"OMIM","id":"606397.0001","type":"Allelic variant","status":"CURRENT"},"observedIn":[{"sample":{"origin":"germline","species":{"value":"human"},"affectedStatus":"not provided"},"method":[{"methodType":"LITERATURE_ONLY"}],"observedData":[{"attribute":{"value":"Fields et al. (2002) demonstrated that the Fin(major) USH3A mutation in exon 3 of the USH3A gene, which had been identified by Joensuu et al. (2001) as 300C-T (TYR100TER), should be referred to as 528T-G, resulting in a tyr176-to-ter substitution. Joensuu et al. (2001) had identified homozygosity for this mutation in a Finnish family segregating Usher syndrome type IIIA (USH3A; 276902) and found it in a further 52 Finnish patients. Fields et al. (2002) found this mutation in 11 of 28 mutated alleles from affected individuals of Finnish and other northern European ancestry.","type":"Description"},"citation":[{"id":[{"value":"12145752","source":"PubMed"}]},{"id":[{"value":"11524702","source":"PubMed"}]}],"xref":[{"db":"OMIM","id":"276902","type":"MIM","status":"CURRENT"}]}]}],"measureSet":{"measure":[{"name":[{"elementValue":{"value":"CLRN1, TYR176TER","type":"Preferred"}}],"attributeSet":[{"attribute":{"value":"TYR176TER","type":"NonHGVS"}}],"measureRelationship":[{"symbol":[{"elementValue":{"value":"CLRN1","type":"Preferred"}}],"type":"variant in gene"}],"type":"Variation","xref":[{"db":"OMIM","id":"606397.0001","type":"Allelic variant","status":"CURRENT"}]}],"type":"Variant"},"traitSet":{"trait":[{"name":[{"elementValue":{"value":"USHER SYNDROME, TYPE IIIA","type":"Preferred"}}],"type":"Disease"}],"type":"Disease"},"id":24816},{"clinVarSubmissionID":{"submitter":"Laboratory for Molecular Medicine,Partners HealthCare Personalized Medicine","localKey":"11483565|OMIM:276902","submitterDate":1422489600000},"clinVarAccession":{"acc":"SCV000203992","version":1,"type":"SCV","orgID":21766,"dateUpdated":1422576000000},"recordStatus":"current","clinicalSignificance":{"reviewStatus":"CLASSIFIED_BY_SINGLE_SUBMITTER","description":["Pathogenic"],"citation":[{"id":[{"value":"11524702","source":"PubMed"}]}],"comment":[{"value":"The Tyr176X variant in CLRN1 has been previously identified in 52 homozygous and 2 compound heterozygous individuals with Usher syndrome type III (Joensuu 2001). This variant has been identified in 1/8,600 European American chromosomes by the NHLBI Exome Sequencing Project (http://evs.gs.washington.edu/EVS/; dbSNP rs121908140). Although this variant has been seen in the general population, its frequency is low enough to be consistent with a recessive carrier frequency. This nonsense variant leads to a premature termination codon at position 176, which is predicted to lead to a truncated or absent protein. In summary, this variant meets our criteria to be classified as pathogenic in a recessive manner for Usher syndrome (http://pcpgm.partners.org/LMM)."}],"dateLastEvaluated":1388620800000},"assertion":{"type":"variation to disease"},"externalID":{"db":"Laboratory for Molecular Medicine (Partners HealthCare Personalized Medicine)","id":"11483565","status":"CURRENT"},"attributeSet":[{"attribute":{"value":"Autosomal recessive inheritance","type":"ModeOfInheritance"}}],"observedIn":[{"sample":{"origin":"germline","species":{"value":"human","taxonomyId":9606},"affectedStatus":"not provided","familyData":{"numFamiliesWithVariant":2}},"method":[{"methodType":"CLINICAL_TESTING"}],"observedData":[{"attribute":{"integerValue":3,"type":"VariantAlleles"}}]}],"measureSet":{"measure":[{"name":[{"elementValue":{"value":"NM_174878.2:c.528T>G","type":"Alternate"}},{"elementValue":{"value":"p.Tyr176X","type":"Alternate"}}],"attributeSet":[{"attribute":{"value":"NM_174878.2:EXON 3","type":"Location"}},{"attribute":{"value":"NC_000003.11:g.150645894A>C","type":"HGVS"}}],"sequenceLocation":[{"assembly":"GRCh37","chr":"3","start":150645894,"stop":150645894,"variantLength":1,"referenceAllele":"A","alternateAllele":"C"}],"measureRelationship":[{"symbol":[{"elementValue":{"value":"CLRN1","type":"Preferred"}}],"type":"variant in gene"}],"type":"Variation","xref":[{"db":"dbSNP","id":"121908140","type":"rsNumber","status":"CURRENT"}]}],"type":"Variant"},"traitSet":{"trait":[{"name":[{"elementValue":{"value":"Usher syndrome, type 3A","type":"Preferred"}}],"type":"Disease","xref":[{"db":"OMIM","id":"276902","type":"MIM","status":"CURRENT"}]}],"type":"Disease"},"submissionName":"LMM_all.variants_NCBI_3.16.2013","id":366075}],"id":6973966}}


def get_args_CTTVGeneticsEvidenceString_init():
    clinvarRecord = \
        clinvar.ClinvarRecord({"recordStatus": "current", "title": "NM_001195794.1(CLRN1):c.567T>G (p.Tyr189Ter) AND Usher syndrome, type 3", "referenceClinVarAssertion":{"clinVarAccession":{"acc": "RCV000004642", "version":3, "type": "RCV", "dateUpdated":1435446000000}, "recordStatus": "current", "clinicalSignificance":{"reviewStatus": "CRITERIA_PROVIDED_SINGLE_SUBMITTER", "description": "Pathogenic", "dateLastEvaluated":1435100400000}, "assertion":{"type": "VARIATION_TO_DISEASE"}, "attributeSet":[{"attribute":{"value": "Autosomal recessive inheritance", "integerValue":263, "type":"ModeOfInheritance"}, "xref":[{"db":"Laboratory for Molecular Medicine, Partners HealthCare Personalized Medicine","id":"11483565","status":"CURRENT"}]}], "observedIn":[{"sample":{"origin":"germline","species":{"value":"human","taxonomyId":9606},"affectedStatus":"not provided"},"method":[{"methodType":"CLINICAL_TESTING"},{"methodType":"LITERATURE_ONLY"}],"observedData":[{"attribute":{"integerValue":2,"type":"NumFamiliesWithVariant"},"id":6557764},{"attribute":{"value":"not provided","type":"Description"},"id":6557764},{"attribute":{"value":"Fields et al. (2002) demonstrated that the Fin(major) USH3A mutation in exon 3 of the USH3A gene, which had been identified by Joensuu et al. (2001) as 300C-T (TYR100TER), should be referred to as 528T-G, resulting in a tyr176-to-ter substitution. Joensuu et al. (2001) had identified homozygosity for this mutation in a Finnish family segregating Usher syndrome type IIIA (USH3A; 276902) and found it in a further 52 Finnish patients. Fields et al. (2002) found this mutation in 11 of 28 mutated alleles from affected individuals of Finnish and other northern European ancestry.","type":"Description"},"citation":[{"id":[{"value":"11524702","source":"PubMed"}],"type":"general"},{"id":[{"value":"12145752","source":"PubMed"}],"type":"general"}],"id":6557764},{"attribute":{"integerValue":3,"type":"VariantAlleles"},"id":6557764}]}], "measureSet":{"measure":[{"name":[{"elementValue":{"value":"NM_001195794.1(CLRN1):c.567T>G (p.Tyr189Ter)","type":"Preferred"}}],"attributeSet":[{"attribute":{"value":"0.000076887590","type":"AlleleFrequency"},"xref":[{"db":"dbSNP","id":"121908140","status":"CURRENT"},{"db":"NHLBI GO Exome Sequencing Project (ESP)","id":"ESP6500SI-V2","url":"http://evs.gs.washington.edu/EVS/","status":"CURRENT"}]},{"attribute":{"value":"NM_174878.2:c.528T>G","type":"HGVS, coding","change":"c.528T>G"}},{"attribute":{"value":"NM_001256819.1:c.*142T>G","type":"HGVS, coding, RefSeq","change":"c.*142T>G"}},{"attribute":{"value":"NM_052995.2:c.300T>G","type":"HGVS, coding, RefSeq","change":"c.300T>G"}},{"attribute":{"value":"NM_001195794.1:c.567T>G","type":"HGVS, coding, RefSeq","change":"c.567T>G"}},{"attribute":{"value":"NG_009168.1:g.49893T>G","type":"HGVS, genomic, RefSeqGene","change":"g.49893T>G"}},{"attribute":{"value":"NC_000003.12:g.150928107A>C","integerValue":38,"type":"HGVS, genomic, top level","change":"g.150928107A>C"}},{"attribute":{"value":"NC_000003.11:g.150645894A>C","integerValue":37,"type":"HGVS, genomic, top level, previous","change":"g.150645894A>C"}},{"attribute":{"value":"NR_046380.2:n.1009T>G","type":"HGVS, non-coding","change":"n.1009T>G"}},{"attribute":{"value":"NR_046380.1:n.1010T>G","type":"HGVS, previous","change":"n.1010T>G"}},{"attribute":{"value":"p.Tyr176X","type":"HGVS, protein"}},{"attribute":{"value":"NP_443721.1:p.Tyr100Ter","type":"HGVS, protein, RefSeq","change":"p.Tyr100Ter"},"xref":[{"db":"dbSNP","id":"121908140","type":"rs","status":"CURRENT"}]},{"attribute":{"value":"NP_777367.1:p.Tyr176Ter","type":"HGVS, protein, RefSeq","change":"p.Tyr176Ter"},"xref":[{"db":"dbSNP","id":"121908140","type":"rs","status":"CURRENT"}]},{"attribute":{"value":"NP_001182723.1:p.Tyr189Ter","type":"HGVS, protein, RefSeq","change":"p.Tyr189Ter"},"xref":[{"db":"dbSNP","id":"121908140","type":"rs","status":"CURRENT"}]},{"attribute":{"value":"NM_174878.2:EXON 3","type":"Location"}},{"attribute":{"value":"3 prime UTR variant","type":"MolecularConsequence"},"xref":[{"db":"Sequence Ontology","id":"SO:0001624","status":"CURRENT"},{"db":"RefSeq","id":"NM_001256819.1:c.*142T>G","status":"CURRENT"}]},{"attribute":{"value":"nonsense","type":"MolecularConsequence"},"xref":[{"db":"Sequence Ontology","id":"SO:0001587","status":"CURRENT"},{"db":"RefSeq","id":"NM_001195794.1:c.567T>G","status":"CURRENT"}]},{"attribute":{"value":"non-coding transcript variant","type":"MolecularConsequence"},"xref":[{"db":"Sequence Ontology","id":"SO:0001619","status":"CURRENT"},{"db":"RefSeq","id":"NR_046380.2:n.1009T>G","status":"CURRENT"}]},{"attribute":{"value":"Y176*","type":"ProteinChange1LetterCode"},"xref":[{"db":"OMIM","id":"606397.0001","type":"Allelic variant","status":"CURRENT"}]},{"attribute":{"value":"Y100*","type":"ProteinChange1LetterCode"}},{"attribute":{"value":"Y189*","type":"ProteinChange1LetterCode"}},{"attribute":{"value":"TYR176TER","type":"ProteinChange3LetterCode"},"xref":[{"db":"OMIM","id":"606397.0001","type":"Allelic variant","status":"CURRENT"}]}],"cytogeneticLocation":["3q25.1"],"sequenceLocation":[{"assembly":"GRCh38","chr":"3","accession":"NC_000003.12","start":150928107,"stop":150928107,"displayStart":150928107,"displayStop":150928107,"variantLength":1,"referenceAllele":"A","alternateAllele":"C","assemblyAccessionVersion":"GCF_000001405.26","assemblyStatus":"current"},{"assembly":"GRCh37","chr":"3","accession":"NC_000003.11","start":150645894,"stop":150645894,"displayStart":150645894,"displayStop":150645894,"variantLength":1,"referenceAllele":"A","alternateAllele":"C","assemblyAccessionVersion":"GCF_000001405.25","assemblyStatus":"previous"}],"measureRelationship":[{"name":[{"elementValue":{"value":"clarin 1","type":"Preferred"}}],"symbol":[{"elementValue":{"value":"CLRN1","type":"Preferred"}}],"sequenceLocation":[{"assembly":"GRCh38","chr":"3","accession":"NC_000003.12","start":150918910,"stop":150973019,"displayStart":150918910,"displayStop":150973019,"strand":"-","variantLength":46837,"assemblyAccessionVersion":"GCF_000001405.26","assemblyStatus":"current"},{"assembly":"GRCh37","chr":"3","accession":"NC_000003.11","start":150643949,"stop":150690785,"displayStart":150643949,"displayStop":150690785,"strand":"-","variantLength":46837,"assemblyAccessionVersion":"GCF_000001405.25","assemblyStatus":"previous"}],"type":"variant in gene","xref":[{"db":"Gene","id":"7401","status":"CURRENT"},{"db":"OMIM","id":"606397","type":"MIM","status":"CURRENT"}]}],"type":"single nucleotide variant","id":19431,"xref":[{"db":"OMIM","id":"606397.0001","type":"Allelic variant","status":"CURRENT"},{"db":"dbSNP","id":"121908140","type":"rs","status":"CURRENT"}]}],"name":[{"elementValue":{"value":"NM_001195794.1(CLRN1):c.567T>G (p.Tyr189Ter)","type":"Preferred"}}],"type":"Variant","id":4392}, "traitSet":{"trait":[{"name":[{"elementValue":{"value":"Usher syndrome, type 3","type":"Preferred"},"xref":[{"db":"Genetic Alliance","id":"Usher+syndrome%2C+type+3/7326","status":"CURRENT"},{"db":"Office of Rare Diseases","id":"5442","status":"CURRENT"}]},{"elementValue":{"value":"Usher Syndrome, Type III","type":"Alternate"}},{"elementValue":{"value":"USHER SYNDROME, TYPE IIIA","type":"Alternate"},"xref":[{"db":"OMIM","id":"276902","type":"MIM","status":"CURRENT"},{"db":"OMIM","id":"606397.0002","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0007","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0001","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0004","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0005","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0003","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0008","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0006","type":"Allelic variant","status":"CURRENT"}]},{"elementValue":{"value":"Usher syndrome, type 3A","type":"Alternate"}},{"elementValue":{"value":"Orphanet:886","type":"EFO id"}},{"elementValue":{"value":"Usher syndrome","type":"EFO name"}},{"elementValue":{"value":"http://www.orpha.net/ORDO/Orphanet_886","type":"EFO URL"}}],"symbol":[{"elementValue":{"value":"USH3","type":"Preferred"},"xref":[{"db":"OMIM","id":"276902","type":"MIM","status":"CURRENT"},{"db":"Office of Rare Diseases","id":"5442","status":"CURRENT"}]},{"elementValue":{"value":"USH3A","type":"Alternate"},"xref":[{"db":"OMIM","id":"276902","type":"MIM","status":"CURRENT"},{"db":"Office of Rare Diseases","id":"5442","status":"CURRENT"}]}],"attributeSet":[{"attribute":{"value":"Neonatal/infancy","type":"age of onset"},"xref":[{"db":"Orphanet","id":"886","status":"CURRENT"},{"db":"Orphanet","id":"231183","status":"CURRENT"}]}],"citation":[{"id":[{"value":"21697857","source":"PubMed"}],"type":"Translational/Evidence-based","abbrev":"EuroGenetest, 2011"}],"type":"Disease","id":5092,"xref":[{"db":"MedGen","id":"C1568248","status":"CURRENT"},{"db":"Orphanet","id":"231183","status":"CURRENT"},{"db":"Orphanet","id":"886","status":"CURRENT"},{"db":"OMIM","id":"276902","type":"MIM","status":"CURRENT"}]}],"type":"Disease","id":1209}, "dateCreated":1344812400000, "dateLastUpdated":1435359600000, "id":62145}, "clinVarAssertion":[{"clinVarSubmissionID":{"submitter":"OMIM","title":"CLRN1, TYR176TER_USHER SYNDROME, TYPE IIIA","localKey":"606397.0001_USHER SYNDROME, TYPE IIIA","submitterDate":1435100400000},"clinVarAccession":{"acc":"SCV000024816","version":2,"type":"SCV","orgID":3,"dateUpdated":1435359600000},"recordStatus":"current","clinicalSignificance":{"reviewStatus":"NO_ASSERTION_CRITERIA_PROVIDED","description":["Pathogenic"],"dateLastEvaluated":1435100400000},"assertion":{"type":"variation to disease"},"externalID":{"db":"OMIM","id":"606397.0001","type":"Allelic variant","status":"CURRENT"},"observedIn":[{"sample":{"origin":"germline","species":{"value":"human"},"affectedStatus":"not provided"},"method":[{"methodType":"LITERATURE_ONLY"}],"observedData":[{"attribute":{"value":"Fields et al. (2002) demonstrated that the Fin(major) USH3A mutation in exon 3 of the USH3A gene, which had been identified by Joensuu et al. (2001) as 300C-T (TYR100TER), should be referred to as 528T-G, resulting in a tyr176-to-ter substitution. Joensuu et al. (2001) had identified homozygosity for this mutation in a Finnish family segregating Usher syndrome type IIIA (USH3A; 276902) and found it in a further 52 Finnish patients. Fields et al. (2002) found this mutation in 11 of 28 mutated alleles from affected individuals of Finnish and other northern European ancestry.","type":"Description"},"citation":[{"id":[{"value":"12145752","source":"PubMed"}]},{"id":[{"value":"11524702","source":"PubMed"}]}],"xref":[{"db":"OMIM","id":"276902","type":"MIM","status":"CURRENT"}]}]}],"measureSet":{"measure":[{"name":[{"elementValue":{"value":"CLRN1, TYR176TER","type":"Preferred"}}],"attributeSet":[{"attribute":{"value":"TYR176TER","type":"NonHGVS"}}],"measureRelationship":[{"symbol":[{"elementValue":{"value":"CLRN1","type":"Preferred"}}],"type":"variant in gene"}],"type":"Variation","xref":[{"db":"OMIM","id":"606397.0001","type":"Allelic variant","status":"CURRENT"}]}],"type":"Variant"},"traitSet":{"trait":[{"name":[{"elementValue":{"value":"USHER SYNDROME, TYPE IIIA","type":"Preferred"}}],"type":"Disease"}],"type":"Disease"},"id":24816},{"clinVarSubmissionID":{"submitter":"Laboratory for Molecular Medicine,Partners HealthCare Personalized Medicine","localKey":"11483565|OMIM:276902","submitterDate":1422489600000},"clinVarAccession":{"acc":"SCV000203992","version":1,"type":"SCV","orgID":21766,"dateUpdated":1422576000000},"recordStatus":"current","clinicalSignificance":{"reviewStatus":"CLASSIFIED_BY_SINGLE_SUBMITTER","description":["Pathogenic"],"citation":[{"id":[{"value":"11524702","source":"PubMed"}]}],"comment":[{"value":"The Tyr176X variant in CLRN1 has been previously identified in 52 homozygous and 2 compound heterozygous individuals with Usher syndrome type III (Joensuu 2001). This variant has been identified in 1/8,600 European American chromosomes by the NHLBI Exome Sequencing Project (http://evs.gs.washington.edu/EVS/; dbSNP rs121908140). Although this variant has been seen in the general population, its frequency is low enough to be consistent with a recessive carrier frequency. This nonsense variant leads to a premature termination codon at position 176, which is predicted to lead to a truncated or absent protein. In summary, this variant meets our criteria to be classified as pathogenic in a recessive manner for Usher syndrome (http://pcpgm.partners.org/LMM)."}],"dateLastEvaluated":1388620800000},"assertion":{"type":"variation to disease"},"externalID":{"db":"Laboratory for Molecular Medicine (Partners HealthCare Personalized Medicine)","id":"11483565","status":"CURRENT"},"attributeSet":[{"attribute":{"value":"Autosomal recessive inheritance","type":"ModeOfInheritance"}}],"observedIn":[{"sample":{"origin":"germline","species":{"value":"human","taxonomyId":9606},"affectedStatus":"not provided","familyData":{"numFamiliesWithVariant":2}},"method":[{"methodType":"CLINICAL_TESTING"}],"observedData":[{"attribute":{"integerValue":3,"type":"VariantAlleles"}}]}],"measureSet":{"measure":[{"name":[{"elementValue":{"value":"NM_174878.2:c.528T>G","type":"Alternate"}},{"elementValue":{"value":"p.Tyr176X","type":"Alternate"}}],"attributeSet":[{"attribute":{"value":"NM_174878.2:EXON 3","type":"Location"}},{"attribute":{"value":"NC_000003.11:g.150645894A>C","type":"HGVS"}}],"sequenceLocation":[{"assembly":"GRCh37","chr":"3","start":150645894,"stop":150645894,"variantLength":1,"referenceAllele":"A","alternateAllele":"C"}],"measureRelationship":[{"symbol":[{"elementValue":{"value":"CLRN1","type":"Preferred"}}],"type":"variant in gene"}],"type":"Variation","xref":[{"db":"dbSNP","id":"121908140","type":"rsNumber","status":"CURRENT"}]}],"type":"Variant"},"traitSet":{"trait":[{"name":[{"elementValue":{"value":"Usher syndrome, type 3A","type":"Preferred"}}],"type":"Disease","xref":[{"db":"OMIM","id":"276902","type":"MIM","status":"CURRENT"}]}],"type":"Disease"},"submissionName":"LMM_all.variants_NCBI_3.16.2013","id":366075}], "id":6973966})

    report = clinvar_to_evidence_strings.Report()

    trait = SimpleNamespace()
    trait.trait_counter = 0
    trait.clinvar_name = ""
    trait.ontology_id = 'http://www.orpha.net/ORDO/Orphanet_88991'
    trait.ontology_label = None

    consequence_type = test_clinvar_to_evidence_strings.MAPPINGS.consequence_type_dict["rs121908140"][0]

    test_args_1 = (clinvarRecord, clinvarRecord.measures[0], report, trait, consequence_type)

    return test_args_1


# TODO look into why these failed with travis
class CTTVGeneticsEvidenceStringInitTest(unittest.TestCase):
    maxDiff = None

    def setUp(self):
        self.test_args = get_args_CTTVGeneticsEvidenceString_init()
        self.evidence_string = evidence_strings.CTTVGeneticsEvidenceString(*self.test_args)

    def test_evidence_string(self):
        test_dict = {
    "literature": {
        "references": [
            {"lit_id": "http://europepmc.org/abstract/MED/11524702"},
            {"lit_id": "http://europepmc.org/abstract/MED/12145752"},
            {"lit_id": "http://europepmc.org/abstract/MED/21697857"}]
    },
    "disease": {"id": ["http://www.orpha.net/ORDO/Orphanet_886"]},
    "validated_against_schema_version": "1.6.1",
    "target": {
        "target_type": "http://identifiers.org/cttv.target/gene_variant",
        "id": "http://identifiers.org/ensembl/ENSG00000163646",
        "activity": "http://identifiers.org/cttv.activity/unknown"
    },
    "sourceID": "eva",
    "evidence": {
        "gene2variant": {
            "is_associated": True,
            "provenance_type": {
                "expert": {"status": True, "statement": "Primary submitter of data"},
                "database": {
                    "id": "EVA",
                    "dbxref": {
                        "url": "http://identifiers.org/clinvar.record/RCV000004642",
                        "id": "http://identifiers.org/clinvar",
                        "version": "2017-08"
                    },
                    "version": "1.0"
                }
            },
            "evidence_codes": ["http://identifiers.org/eco/cttv_mapping_pipeline"],
            "date_asserted": "2015-06-26T23:00:00",
            "functional_consequence": "http://purl.obolibrary.org/obo/SO_0001587",
            "urls": [{"url": "http://www.ncbi.nlm.nih.gov/clinvar/RCV000004642",
                "nice_name": "Further details in ClinVar database"}]
        },
        "variant2disease": {
            "is_associated": True,
            "clinical_significance": "Pathogenic",
            "provenance_type": {
                "literature": {
                    "references": [
                        {"lit_id": "http://europepmc.org/abstract/MED/11524702"},
                        {"lit_id": "http://europepmc.org/abstract/MED/12145752"},
                        {"lit_id": "http://europepmc.org/abstract/MED/21697857"}]
                },
                "expert": {"status": True, "statement": "Primary submitter of data"},
                "database": {
                    "id": "EVA",
                    "dbxref": {
                        "url": "http://identifiers.org/clinvar.record/RCV000004642",
                        "id": "http://identifiers.org/clinvar",
                        "version": "2017-08"
                    },
                    "version": "1.0"
                }
            },
            "evidence_codes": ["http://purl.obolibrary.org/obo/ECO_0000205"],
            "date_asserted": "2015-06-26T23:00:00",<commit_msg>Update tests for evidence string generation<commit_after>import os.path
import gzip
import json
import unittest
from datetime import datetime

from types import SimpleNamespace

from eva_cttv_pipeline.evidence_string_generation import clinvar
from eva_cttv_pipeline.evidence_string_generation import clinvar_to_evidence_strings
from eva_cttv_pipeline.evidence_string_generation import consequence_type as CT
from eva_cttv_pipeline.evidence_string_generation import evidence_strings
from tests.evidence_string_generation import test_clinvar_to_evidence_strings
from tests.evidence_string_generation import config

DATE_LAST_UPDATED = 1412982000000
DATE_ASSERTED = datetime.fromtimestamp((DATE_LAST_UPDATED / 1000)).isoformat()


MAPPINGS = SimpleNamespace()


def _get_test_cellbase_record_gene():
    return {"chromosome":"3","start":150645894,"end":150645894,"reference":"A","alternate":"C","source":"clinvar","clinvarSet":{"recordStatus":"current","title":"NM_001195794.1(CLRN1):c.567T>G (p.Tyr189Ter) AND Usher syndrome, type 3","referenceClinVarAssertion":{"clinVarAccession":{"acc":"RCV000004642","version":3,"type":"RCV","dateUpdated":1435446000000},"recordStatus":"current","clinicalSignificance":{"reviewStatus":"CRITERIA_PROVIDED_SINGLE_SUBMITTER","description":"Pathogenic","dateLastEvaluated":1435100400000},"assertion":{"type":"VARIATION_TO_DISEASE"},"attributeSet":[{"attribute":{"value":"Autosomal recessive inheritance","integerValue":263,"type":"ModeOfInheritance"},"xref":[{"db":"Laboratory for Molecular Medicine, Partners HealthCare Personalized Medicine","id":"11483565","status":"CURRENT"}]}],"observedIn":[{"sample":{"origin":"germline","species":{"value":"human","taxonomyId":9606},"affectedStatus":"not provided"},"method":[{"methodType":"CLINICAL_TESTING"},{"methodType":"LITERATURE_ONLY"}],"observedData":[{"attribute":{"integerValue":2,"type":"NumFamiliesWithVariant"},"id":6557764},{"attribute":{"value":"not provided","type":"Description"},"id":6557764},{"attribute":{"value":"Fields et al. (2002) demonstrated that the Fin(major) USH3A mutation in exon 3 of the USH3A gene, which had been identified by Joensuu et al. (2001) as 300C-T (TYR100TER), should be referred to as 528T-G, resulting in a tyr176-to-ter substitution. Joensuu et al. (2001) had identified homozygosity for this mutation in a Finnish family segregating Usher syndrome type IIIA (USH3A; 276902) and found it in a further 52 Finnish patients. Fields et al. (2002) found this mutation in 11 of 28 mutated alleles from affected individuals of Finnish and other northern European ancestry.","type":"Description"},"citation":[{"id":[{"value":"11524702","source":"PubMed"}],"type":"general"},{"id":[{"value":"12145752","source":"PubMed"}],"type":"general"}],"id":6557764},{"attribute":{"integerValue":3,"type":"VariantAlleles"},"id":6557764}]}],"measureSet":{"measure":[{"name":[{"elementValue":{"value":"NM_001195794.1(CLRN1):c.567T>G (p.Tyr189Ter)","type":"Preferred"}}],"attributeSet":[{"attribute":{"value":"0.000076887590","type":"AlleleFrequency"},"xref":[{"db":"dbSNP","id":"121908140","status":"CURRENT"},{"db":"NHLBI GO Exome Sequencing Project (ESP)","id":"ESP6500SI-V2","url":"http://evs.gs.washington.edu/EVS/","status":"CURRENT"}]},{"attribute":{"value":"NM_174878.2:c.528T>G","type":"HGVS, coding","change":"c.528T>G"}},{"attribute":{"value":"NM_001256819.1:c.*142T>G","type":"HGVS, coding, RefSeq","change":"c.*142T>G"}},{"attribute":{"value":"NM_052995.2:c.300T>G","type":"HGVS, coding, RefSeq","change":"c.300T>G"}},{"attribute":{"value":"NM_001195794.1:c.567T>G","type":"HGVS, coding, RefSeq","change":"c.567T>G"}},{"attribute":{"value":"NG_009168.1:g.49893T>G","type":"HGVS, genomic, RefSeqGene","change":"g.49893T>G"}},{"attribute":{"value":"NC_000003.12:g.150928107A>C","integerValue":38,"type":"HGVS, genomic, top level","change":"g.150928107A>C"}},{"attribute":{"value":"NC_000003.11:g.150645894A>C","integerValue":37,"type":"HGVS, genomic, top level, previous","change":"g.150645894A>C"}},{"attribute":{"value":"NR_046380.2:n.1009T>G","type":"HGVS, non-coding","change":"n.1009T>G"}},{"attribute":{"value":"NR_046380.1:n.1010T>G","type":"HGVS, previous","change":"n.1010T>G"}},{"attribute":{"value":"p.Tyr176X","type":"HGVS, protein"}},{"attribute":{"value":"NP_443721.1:p.Tyr100Ter","type":"HGVS, protein, RefSeq","change":"p.Tyr100Ter"},"xref":[{"db":"dbSNP","id":"121908140","type":"rs","status":"CURRENT"}]},{"attribute":{"value":"NP_777367.1:p.Tyr176Ter","type":"HGVS, protein, RefSeq","change":"p.Tyr176Ter"},"xref":[{"db":"dbSNP","id":"121908140","type":"rs","status":"CURRENT"}]},{"attribute":{"value":"NP_001182723.1:p.Tyr189Ter","type":"HGVS, protein, RefSeq","change":"p.Tyr189Ter"},"xref":[{"db":"dbSNP","id":"121908140","type":"rs","status":"CURRENT"}]},{"attribute":{"value":"NM_174878.2:EXON 3","type":"Location"}},{"attribute":{"value":"3 prime UTR variant","type":"MolecularConsequence"},"xref":[{"db":"Sequence Ontology","id":"SO:0001624","status":"CURRENT"},{"db":"RefSeq","id":"NM_001256819.1:c.*142T>G","status":"CURRENT"}]},{"attribute":{"value":"nonsense","type":"MolecularConsequence"},"xref":[{"db":"Sequence Ontology","id":"SO:0001587","status":"CURRENT"},{"db":"RefSeq","id":"NM_001195794.1:c.567T>G","status":"CURRENT"}]},{"attribute":{"value":"non-coding transcript variant","type":"MolecularConsequence"},"xref":[{"db":"Sequence Ontology","id":"SO:0001619","status":"CURRENT"},{"db":"RefSeq","id":"NR_046380.2:n.1009T>G","status":"CURRENT"}]},{"attribute":{"value":"Y176*","type":"ProteinChange1LetterCode"},"xref":[{"db":"OMIM","id":"606397.0001","type":"Allelic variant","status":"CURRENT"}]},{"attribute":{"value":"Y100*","type":"ProteinChange1LetterCode"}},{"attribute":{"value":"Y189*","type":"ProteinChange1LetterCode"}},{"attribute":{"value":"TYR176TER","type":"ProteinChange3LetterCode"},"xref":[{"db":"OMIM","id":"606397.0001","type":"Allelic variant","status":"CURRENT"}]}],"cytogeneticLocation":["3q25.1"],"sequenceLocation":[{"assembly":"GRCh38","chr":"3","accession":"NC_000003.12","start":150928107,"stop":150928107,"displayStart":150928107,"displayStop":150928107,"variantLength":1,"referenceAllele":"A","alternateAllele":"C","assemblyAccessionVersion":"GCF_000001405.26","assemblyStatus":"current"},{"assembly":"GRCh37","chr":"3","accession":"NC_000003.11","start":150645894,"stop":150645894,"displayStart":150645894,"displayStop":150645894,"variantLength":1,"referenceAllele":"A","alternateAllele":"C","assemblyAccessionVersion":"GCF_000001405.25","assemblyStatus":"previous"}],"measureRelationship":[{"name":[{"elementValue":{"value":"clarin 1","type":"Preferred"}}],"symbol":[{"elementValue":{"value":"CLRN1","type":"Preferred"}}],"sequenceLocation":[{"assembly":"GRCh38","chr":"3","accession":"NC_000003.12","start":150918910,"stop":150973019,"displayStart":150918910,"displayStop":150973019,"strand":"-","variantLength":46837,"assemblyAccessionVersion":"GCF_000001405.26","assemblyStatus":"current"},{"assembly":"GRCh37","chr":"3","accession":"NC_000003.11","start":150643949,"stop":150690785,"displayStart":150643949,"displayStop":150690785,"strand":"-","variantLength":46837,"assemblyAccessionVersion":"GCF_000001405.25","assemblyStatus":"previous"}],"type":"variant in gene","xref":[{"db":"Gene","id":"7401","status":"CURRENT"},{"db":"OMIM","id":"606397","type":"MIM","status":"CURRENT"}]}],"type":"single nucleotide variant","id":19431,"xref":[{"db":"OMIM","id":"606397.0001","type":"Allelic variant","status":"CURRENT"},{"db":"dbSNP","id":"121908140","type":"rs","status":"CURRENT"}]}],"name":[{"elementValue":{"value":"NM_001195794.1(CLRN1):c.567T>G (p.Tyr189Ter)","type":"Preferred"}}],"type":"Variant","id":4392},"traitSet":{"trait":[{"name":[{"elementValue":{"value":"Usher syndrome, type 3","type":"Preferred"},"xref":[{"db":"Genetic Alliance","id":"Usher+syndrome%2C+type+3/7326","status":"CURRENT"},{"db":"Office of Rare Diseases","id":"5442","status":"CURRENT"}]},{"elementValue":{"value":"Usher Syndrome, Type III","type":"Alternate"}},{"elementValue":{"value":"USHER SYNDROME, TYPE IIIA","type":"Alternate"},"xref":[{"db":"OMIM","id":"276902","type":"MIM","status":"CURRENT"},{"db":"OMIM","id":"606397.0002","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0007","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0001","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0004","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0005","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0003","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0008","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0006","type":"Allelic variant","status":"CURRENT"}]},{"elementValue":{"value":"Usher syndrome, type 3A","type":"Alternate"}},{"elementValue":{"value":"Orphanet:886","type":"EFO id"}},{"elementValue":{"value":"Usher syndrome","type":"EFO name"}},{"elementValue":{"value":"http://www.orpha.net/ORDO/Orphanet_886","type":"EFO URL"}}],"symbol":[{"elementValue":{"value":"USH3","type":"Preferred"},"xref":[{"db":"OMIM","id":"276902","type":"MIM","status":"CURRENT"},{"db":"Office of Rare Diseases","id":"5442","status":"CURRENT"}]},{"elementValue":{"value":"USH3A","type":"Alternate"},"xref":[{"db":"OMIM","id":"276902","type":"MIM","status":"CURRENT"},{"db":"Office of Rare Diseases","id":"5442","status":"CURRENT"}]}],"attributeSet":[{"attribute":{"value":"Neonatal/infancy","type":"age of onset"},"xref":[{"db":"Orphanet","id":"886","status":"CURRENT"},{"db":"Orphanet","id":"231183","status":"CURRENT"}]}],"citation":[{"id":[{"value":"21697857","source":"PubMed"}],"type":"Translational/Evidence-based","abbrev":"EuroGenetest, 2011"}],"type":"Disease","id":5092,"xref":[{"db":"MedGen","id":"C1568248","status":"CURRENT"},{"db":"Orphanet","id":"231183","status":"CURRENT"},{"db":"Orphanet","id":"886","status":"CURRENT"},{"db":"OMIM","id":"276902","type":"MIM","status":"CURRENT"}]}],"type":"Disease","id":1209},"dateCreated":1344812400000,"dateLastUpdated":1435359600000,"id":62145},"clinVarAssertion":[{"clinVarSubmissionID":{"submitter":"OMIM","title":"CLRN1, TYR176TER_USHER SYNDROME, TYPE IIIA","localKey":"606397.0001_USHER SYNDROME, TYPE IIIA","submitterDate":1435100400000},"clinVarAccession":{"acc":"SCV000024816","version":2,"type":"SCV","orgID":3,"dateUpdated":1435359600000},"recordStatus":"current","clinicalSignificance":{"reviewStatus":"NO_ASSERTION_CRITERIA_PROVIDED","description":["Pathogenic"],"dateLastEvaluated":1435100400000},"assertion":{"type":"variation to disease"},"externalID":{"db":"OMIM","id":"606397.0001","type":"Allelic variant","status":"CURRENT"},"observedIn":[{"sample":{"origin":"germline","species":{"value":"human"},"affectedStatus":"not provided"},"method":[{"methodType":"LITERATURE_ONLY"}],"observedData":[{"attribute":{"value":"Fields et al. (2002) demonstrated that the Fin(major) USH3A mutation in exon 3 of the USH3A gene, which had been identified by Joensuu et al. (2001) as 300C-T (TYR100TER), should be referred to as 528T-G, resulting in a tyr176-to-ter substitution. Joensuu et al. (2001) had identified homozygosity for this mutation in a Finnish family segregating Usher syndrome type IIIA (USH3A; 276902) and found it in a further 52 Finnish patients. Fields et al. (2002) found this mutation in 11 of 28 mutated alleles from affected individuals of Finnish and other northern European ancestry.","type":"Description"},"citation":[{"id":[{"value":"12145752","source":"PubMed"}]},{"id":[{"value":"11524702","source":"PubMed"}]}],"xref":[{"db":"OMIM","id":"276902","type":"MIM","status":"CURRENT"}]}]}],"measureSet":{"measure":[{"name":[{"elementValue":{"value":"CLRN1, TYR176TER","type":"Preferred"}}],"attributeSet":[{"attribute":{"value":"TYR176TER","type":"NonHGVS"}}],"measureRelationship":[{"symbol":[{"elementValue":{"value":"CLRN1","type":"Preferred"}}],"type":"variant in gene"}],"type":"Variation","xref":[{"db":"OMIM","id":"606397.0001","type":"Allelic variant","status":"CURRENT"}]}],"type":"Variant"},"traitSet":{"trait":[{"name":[{"elementValue":{"value":"USHER SYNDROME, TYPE IIIA","type":"Preferred"}}],"type":"Disease"}],"type":"Disease"},"id":24816},{"clinVarSubmissionID":{"submitter":"Laboratory for Molecular Medicine,Partners HealthCare Personalized Medicine","localKey":"11483565|OMIM:276902","submitterDate":1422489600000},"clinVarAccession":{"acc":"SCV000203992","version":1,"type":"SCV","orgID":21766,"dateUpdated":1422576000000},"recordStatus":"current","clinicalSignificance":{"reviewStatus":"CLASSIFIED_BY_SINGLE_SUBMITTER","description":["Pathogenic"],"citation":[{"id":[{"value":"11524702","source":"PubMed"}]}],"comment":[{"value":"The Tyr176X variant in CLRN1 has been previously identified in 52 homozygous and 2 compound heterozygous individuals with Usher syndrome type III (Joensuu 2001). This variant has been identified in 1/8,600 European American chromosomes by the NHLBI Exome Sequencing Project (http://evs.gs.washington.edu/EVS/; dbSNP rs121908140). Although this variant has been seen in the general population, its frequency is low enough to be consistent with a recessive carrier frequency. This nonsense variant leads to a premature termination codon at position 176, which is predicted to lead to a truncated or absent protein. In summary, this variant meets our criteria to be classified as pathogenic in a recessive manner for Usher syndrome (http://pcpgm.partners.org/LMM)."}],"dateLastEvaluated":1388620800000},"assertion":{"type":"variation to disease"},"externalID":{"db":"Laboratory for Molecular Medicine (Partners HealthCare Personalized Medicine)","id":"11483565","status":"CURRENT"},"attributeSet":[{"attribute":{"value":"Autosomal recessive inheritance","type":"ModeOfInheritance"}}],"observedIn":[{"sample":{"origin":"germline","species":{"value":"human","taxonomyId":9606},"affectedStatus":"not provided","familyData":{"numFamiliesWithVariant":2}},"method":[{"methodType":"CLINICAL_TESTING"}],"observedData":[{"attribute":{"integerValue":3,"type":"VariantAlleles"}}]}],"measureSet":{"measure":[{"name":[{"elementValue":{"value":"NM_174878.2:c.528T>G","type":"Alternate"}},{"elementValue":{"value":"p.Tyr176X","type":"Alternate"}}],"attributeSet":[{"attribute":{"value":"NM_174878.2:EXON 3","type":"Location"}},{"attribute":{"value":"NC_000003.11:g.150645894A>C","type":"HGVS"}}],"sequenceLocation":[{"assembly":"GRCh37","chr":"3","start":150645894,"stop":150645894,"variantLength":1,"referenceAllele":"A","alternateAllele":"C"}],"measureRelationship":[{"symbol":[{"elementValue":{"value":"CLRN1","type":"Preferred"}}],"type":"variant in gene"}],"type":"Variation","xref":[{"db":"dbSNP","id":"121908140","type":"rsNumber","status":"CURRENT"}]}],"type":"Variant"},"traitSet":{"trait":[{"name":[{"elementValue":{"value":"Usher syndrome, type 3A","type":"Preferred"}}],"type":"Disease","xref":[{"db":"OMIM","id":"276902","type":"MIM","status":"CURRENT"}]}],"type":"Disease"},"submissionName":"LMM_all.variants_NCBI_3.16.2013","id":366075}],"id":6973966}}


def get_args_CTTVGeneticsEvidenceString_init():
    clinvarRecord = \
        clinvar.ClinvarRecord({"recordStatus": "current", "title": "NM_001195794.1(CLRN1):c.567T>G (p.Tyr189Ter) AND Usher syndrome, type 3", "referenceClinVarAssertion":{"clinVarAccession":{"acc": "RCV000004642", "version":3, "type": "RCV", "dateUpdated":1435446000000}, "recordStatus": "current", "clinicalSignificance":{"reviewStatus": "CRITERIA_PROVIDED_SINGLE_SUBMITTER", "description": "Pathogenic", "dateLastEvaluated":1435100400000}, "assertion":{"type": "VARIATION_TO_DISEASE"}, "attributeSet":[{"attribute":{"value": "Autosomal recessive inheritance", "integerValue":263, "type":"ModeOfInheritance"}, "xref":[{"db":"Laboratory for Molecular Medicine, Partners HealthCare Personalized Medicine","id":"11483565","status":"CURRENT"}]}], "observedIn":[{"sample":{"origin":"germline","species":{"value":"human","taxonomyId":9606},"affectedStatus":"not provided"},"method":[{"methodType":"CLINICAL_TESTING"},{"methodType":"LITERATURE_ONLY"}],"observedData":[{"attribute":{"integerValue":2,"type":"NumFamiliesWithVariant"},"id":6557764},{"attribute":{"value":"not provided","type":"Description"},"id":6557764},{"attribute":{"value":"Fields et al. (2002) demonstrated that the Fin(major) USH3A mutation in exon 3 of the USH3A gene, which had been identified by Joensuu et al. (2001) as 300C-T (TYR100TER), should be referred to as 528T-G, resulting in a tyr176-to-ter substitution. Joensuu et al. (2001) had identified homozygosity for this mutation in a Finnish family segregating Usher syndrome type IIIA (USH3A; 276902) and found it in a further 52 Finnish patients. Fields et al. (2002) found this mutation in 11 of 28 mutated alleles from affected individuals of Finnish and other northern European ancestry.","type":"Description"},"citation":[{"id":[{"value":"11524702","source":"PubMed"}],"type":"general"},{"id":[{"value":"12145752","source":"PubMed"}],"type":"general"}],"id":6557764},{"attribute":{"integerValue":3,"type":"VariantAlleles"},"id":6557764}]}], "measureSet":{"measure":[{"name":[{"elementValue":{"value":"NM_001195794.1(CLRN1):c.567T>G (p.Tyr189Ter)","type":"Preferred"}}],"attributeSet":[{"attribute":{"value":"0.000076887590","type":"AlleleFrequency"},"xref":[{"db":"dbSNP","id":"121908140","status":"CURRENT"},{"db":"NHLBI GO Exome Sequencing Project (ESP)","id":"ESP6500SI-V2","url":"http://evs.gs.washington.edu/EVS/","status":"CURRENT"}]},{"attribute":{"value":"NM_174878.2:c.528T>G","type":"HGVS, coding","change":"c.528T>G"}},{"attribute":{"value":"NM_001256819.1:c.*142T>G","type":"HGVS, coding, RefSeq","change":"c.*142T>G"}},{"attribute":{"value":"NM_052995.2:c.300T>G","type":"HGVS, coding, RefSeq","change":"c.300T>G"}},{"attribute":{"value":"NM_001195794.1:c.567T>G","type":"HGVS, coding, RefSeq","change":"c.567T>G"}},{"attribute":{"value":"NG_009168.1:g.49893T>G","type":"HGVS, genomic, RefSeqGene","change":"g.49893T>G"}},{"attribute":{"value":"NC_000003.12:g.150928107A>C","integerValue":38,"type":"HGVS, genomic, top level","change":"g.150928107A>C"}},{"attribute":{"value":"NC_000003.11:g.150645894A>C","integerValue":37,"type":"HGVS, genomic, top level, previous","change":"g.150645894A>C"}},{"attribute":{"value":"NR_046380.2:n.1009T>G","type":"HGVS, non-coding","change":"n.1009T>G"}},{"attribute":{"value":"NR_046380.1:n.1010T>G","type":"HGVS, previous","change":"n.1010T>G"}},{"attribute":{"value":"p.Tyr176X","type":"HGVS, protein"}},{"attribute":{"value":"NP_443721.1:p.Tyr100Ter","type":"HGVS, protein, RefSeq","change":"p.Tyr100Ter"},"xref":[{"db":"dbSNP","id":"121908140","type":"rs","status":"CURRENT"}]},{"attribute":{"value":"NP_777367.1:p.Tyr176Ter","type":"HGVS, protein, RefSeq","change":"p.Tyr176Ter"},"xref":[{"db":"dbSNP","id":"121908140","type":"rs","status":"CURRENT"}]},{"attribute":{"value":"NP_001182723.1:p.Tyr189Ter","type":"HGVS, protein, RefSeq","change":"p.Tyr189Ter"},"xref":[{"db":"dbSNP","id":"121908140","type":"rs","status":"CURRENT"}]},{"attribute":{"value":"NM_174878.2:EXON 3","type":"Location"}},{"attribute":{"value":"3 prime UTR variant","type":"MolecularConsequence"},"xref":[{"db":"Sequence Ontology","id":"SO:0001624","status":"CURRENT"},{"db":"RefSeq","id":"NM_001256819.1:c.*142T>G","status":"CURRENT"}]},{"attribute":{"value":"nonsense","type":"MolecularConsequence"},"xref":[{"db":"Sequence Ontology","id":"SO:0001587","status":"CURRENT"},{"db":"RefSeq","id":"NM_001195794.1:c.567T>G","status":"CURRENT"}]},{"attribute":{"value":"non-coding transcript variant","type":"MolecularConsequence"},"xref":[{"db":"Sequence Ontology","id":"SO:0001619","status":"CURRENT"},{"db":"RefSeq","id":"NR_046380.2:n.1009T>G","status":"CURRENT"}]},{"attribute":{"value":"Y176*","type":"ProteinChange1LetterCode"},"xref":[{"db":"OMIM","id":"606397.0001","type":"Allelic variant","status":"CURRENT"}]},{"attribute":{"value":"Y100*","type":"ProteinChange1LetterCode"}},{"attribute":{"value":"Y189*","type":"ProteinChange1LetterCode"}},{"attribute":{"value":"TYR176TER","type":"ProteinChange3LetterCode"},"xref":[{"db":"OMIM","id":"606397.0001","type":"Allelic variant","status":"CURRENT"}]}],"cytogeneticLocation":["3q25.1"],"sequenceLocation":[{"assembly":"GRCh38","chr":"3","accession":"NC_000003.12","start":150928107,"stop":150928107,"displayStart":150928107,"displayStop":150928107,"variantLength":1,"referenceAllele":"A","alternateAllele":"C","assemblyAccessionVersion":"GCF_000001405.26","assemblyStatus":"current"},{"assembly":"GRCh37","chr":"3","accession":"NC_000003.11","start":150645894,"stop":150645894,"displayStart":150645894,"displayStop":150645894,"variantLength":1,"referenceAllele":"A","alternateAllele":"C","assemblyAccessionVersion":"GCF_000001405.25","assemblyStatus":"previous"}],"measureRelationship":[{"name":[{"elementValue":{"value":"clarin 1","type":"Preferred"}}],"symbol":[{"elementValue":{"value":"CLRN1","type":"Preferred"}}],"sequenceLocation":[{"assembly":"GRCh38","chr":"3","accession":"NC_000003.12","start":150918910,"stop":150973019,"displayStart":150918910,"displayStop":150973019,"strand":"-","variantLength":46837,"assemblyAccessionVersion":"GCF_000001405.26","assemblyStatus":"current"},{"assembly":"GRCh37","chr":"3","accession":"NC_000003.11","start":150643949,"stop":150690785,"displayStart":150643949,"displayStop":150690785,"strand":"-","variantLength":46837,"assemblyAccessionVersion":"GCF_000001405.25","assemblyStatus":"previous"}],"type":"variant in gene","xref":[{"db":"Gene","id":"7401","status":"CURRENT"},{"db":"OMIM","id":"606397","type":"MIM","status":"CURRENT"}]}],"type":"single nucleotide variant","id":19431,"xref":[{"db":"OMIM","id":"606397.0001","type":"Allelic variant","status":"CURRENT"},{"db":"dbSNP","id":"121908140","type":"rs","status":"CURRENT"}]}],"name":[{"elementValue":{"value":"NM_001195794.1(CLRN1):c.567T>G (p.Tyr189Ter)","type":"Preferred"}}],"type":"Variant","id":4392}, "traitSet":{"trait":[{"name":[{"elementValue":{"value":"Usher syndrome, type 3","type":"Preferred"},"xref":[{"db":"Genetic Alliance","id":"Usher+syndrome%2C+type+3/7326","status":"CURRENT"},{"db":"Office of Rare Diseases","id":"5442","status":"CURRENT"}]},{"elementValue":{"value":"Usher Syndrome, Type III","type":"Alternate"}},{"elementValue":{"value":"USHER SYNDROME, TYPE IIIA","type":"Alternate"},"xref":[{"db":"OMIM","id":"276902","type":"MIM","status":"CURRENT"},{"db":"OMIM","id":"606397.0002","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0007","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0001","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0004","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0005","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0003","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0008","type":"Allelic variant","status":"CURRENT"},{"db":"OMIM","id":"606397.0006","type":"Allelic variant","status":"CURRENT"}]},{"elementValue":{"value":"Usher syndrome, type 3A","type":"Alternate"}},{"elementValue":{"value":"Orphanet:886","type":"EFO id"}},{"elementValue":{"value":"Usher syndrome","type":"EFO name"}},{"elementValue":{"value":"http://www.orpha.net/ORDO/Orphanet_886","type":"EFO URL"}}],"symbol":[{"elementValue":{"value":"USH3","type":"Preferred"},"xref":[{"db":"OMIM","id":"276902","type":"MIM","status":"CURRENT"},{"db":"Office of Rare Diseases","id":"5442","status":"CURRENT"}]},{"elementValue":{"value":"USH3A","type":"Alternate"},"xref":[{"db":"OMIM","id":"276902","type":"MIM","status":"CURRENT"},{"db":"Office of Rare Diseases","id":"5442","status":"CURRENT"}]}],"attributeSet":[{"attribute":{"value":"Neonatal/infancy","type":"age of onset"},"xref":[{"db":"Orphanet","id":"886","status":"CURRENT"},{"db":"Orphanet","id":"231183","status":"CURRENT"}]}],"citation":[{"id":[{"value":"21697857","source":"PubMed"}],"type":"Translational/Evidence-based","abbrev":"EuroGenetest, 2011"}],"type":"Disease","id":5092,"xref":[{"db":"MedGen","id":"C1568248","status":"CURRENT"},{"db":"Orphanet","id":"231183","status":"CURRENT"},{"db":"Orphanet","id":"886","status":"CURRENT"},{"db":"OMIM","id":"276902","type":"MIM","status":"CURRENT"}]}],"type":"Disease","id":1209}, "dateCreated":1344812400000, "dateLastUpdated":1435359600000, "id":62145}, "clinVarAssertion":[{"clinVarSubmissionID":{"submitter":"OMIM","title":"CLRN1, TYR176TER_USHER SYNDROME, TYPE IIIA","localKey":"606397.0001_USHER SYNDROME, TYPE IIIA","submitterDate":1435100400000},"clinVarAccession":{"acc":"SCV000024816","version":2,"type":"SCV","orgID":3,"dateUpdated":1435359600000},"recordStatus":"current","clinicalSignificance":{"reviewStatus":"NO_ASSERTION_CRITERIA_PROVIDED","description":["Pathogenic"],"dateLastEvaluated":1435100400000},"assertion":{"type":"variation to disease"},"externalID":{"db":"OMIM","id":"606397.0001","type":"Allelic variant","status":"CURRENT"},"observedIn":[{"sample":{"origin":"germline","species":{"value":"human"},"affectedStatus":"not provided"},"method":[{"methodType":"LITERATURE_ONLY"}],"observedData":[{"attribute":{"value":"Fields et al. (2002) demonstrated that the Fin(major) USH3A mutation in exon 3 of the USH3A gene, which had been identified by Joensuu et al. (2001) as 300C-T (TYR100TER), should be referred to as 528T-G, resulting in a tyr176-to-ter substitution. Joensuu et al. (2001) had identified homozygosity for this mutation in a Finnish family segregating Usher syndrome type IIIA (USH3A; 276902) and found it in a further 52 Finnish patients. Fields et al. (2002) found this mutation in 11 of 28 mutated alleles from affected individuals of Finnish and other northern European ancestry.","type":"Description"},"citation":[{"id":[{"value":"12145752","source":"PubMed"}]},{"id":[{"value":"11524702","source":"PubMed"}]}],"xref":[{"db":"OMIM","id":"276902","type":"MIM","status":"CURRENT"}]}]}],"measureSet":{"measure":[{"name":[{"elementValue":{"value":"CLRN1, TYR176TER","type":"Preferred"}}],"attributeSet":[{"attribute":{"value":"TYR176TER","type":"NonHGVS"}}],"measureRelationship":[{"symbol":[{"elementValue":{"value":"CLRN1","type":"Preferred"}}],"type":"variant in gene"}],"type":"Variation","xref":[{"db":"OMIM","id":"606397.0001","type":"Allelic variant","status":"CURRENT"}]}],"type":"Variant"},"traitSet":{"trait":[{"name":[{"elementValue":{"value":"USHER SYNDROME, TYPE IIIA","type":"Preferred"}}],"type":"Disease"}],"type":"Disease"},"id":24816},{"clinVarSubmissionID":{"submitter":"Laboratory for Molecular Medicine,Partners HealthCare Personalized Medicine","localKey":"11483565|OMIM:276902","submitterDate":1422489600000},"clinVarAccession":{"acc":"SCV000203992","version":1,"type":"SCV","orgID":21766,"dateUpdated":1422576000000},"recordStatus":"current","clinicalSignificance":{"reviewStatus":"CLASSIFIED_BY_SINGLE_SUBMITTER","description":["Pathogenic"],"citation":[{"id":[{"value":"11524702","source":"PubMed"}]}],"comment":[{"value":"The Tyr176X variant in CLRN1 has been previously identified in 52 homozygous and 2 compound heterozygous individuals with Usher syndrome type III (Joensuu 2001). This variant has been identified in 1/8,600 European American chromosomes by the NHLBI Exome Sequencing Project (http://evs.gs.washington.edu/EVS/; dbSNP rs121908140). Although this variant has been seen in the general population, its frequency is low enough to be consistent with a recessive carrier frequency. This nonsense variant leads to a premature termination codon at position 176, which is predicted to lead to a truncated or absent protein. In summary, this variant meets our criteria to be classified as pathogenic in a recessive manner for Usher syndrome (http://pcpgm.partners.org/LMM)."}],"dateLastEvaluated":1388620800000},"assertion":{"type":"variation to disease"},"externalID":{"db":"Laboratory for Molecular Medicine (Partners HealthCare Personalized Medicine)","id":"11483565","status":"CURRENT"},"attributeSet":[{"attribute":{"value":"Autosomal recessive inheritance","type":"ModeOfInheritance"}}],"observedIn":[{"sample":{"origin":"germline","species":{"value":"human","taxonomyId":9606},"affectedStatus":"not provided","familyData":{"numFamiliesWithVariant":2}},"method":[{"methodType":"CLINICAL_TESTING"}],"observedData":[{"attribute":{"integerValue":3,"type":"VariantAlleles"}}]}],"measureSet":{"measure":[{"name":[{"elementValue":{"value":"NM_174878.2:c.528T>G","type":"Alternate"}},{"elementValue":{"value":"p.Tyr176X","type":"Alternate"}}],"attributeSet":[{"attribute":{"value":"NM_174878.2:EXON 3","type":"Location"}},{"attribute":{"value":"NC_000003.11:g.150645894A>C","type":"HGVS"}}],"sequenceLocation":[{"assembly":"GRCh37","chr":"3","start":150645894,"stop":150645894,"variantLength":1,"referenceAllele":"A","alternateAllele":"C"}],"measureRelationship":[{"symbol":[{"elementValue":{"value":"CLRN1","type":"Preferred"}}],"type":"variant in gene"}],"type":"Variation","xref":[{"db":"dbSNP","id":"121908140","type":"rsNumber","status":"CURRENT"}]}],"type":"Variant"},"traitSet":{"trait":[{"name":[{"elementValue":{"value":"Usher syndrome, type 3A","type":"Preferred"}}],"type":"Disease","xref":[{"db":"OMIM","id":"276902","type":"MIM","status":"CURRENT"}]}],"type":"Disease"},"submissionName":"LMM_all.variants_NCBI_3.16.2013","id":366075}], "id":6973966})

    report = clinvar_to_evidence_strings.Report()

    trait = SimpleNamespace()
    trait.trait_counter = 0
    trait.clinvar_name = ""
    trait.ontology_id = 'http://www.orpha.net/ORDO/Orphanet_88991'
    trait.ontology_label = None

    consequence_type = test_clinvar_to_evidence_strings.MAPPINGS.consequence_type_dict["rs121908140"][0]

    test_args_1 = (clinvarRecord, clinvarRecord.measures[0], report, trait, consequence_type)

    return test_args_1


# TODO look into why these failed with travis
class CTTVGeneticsEvidenceStringInitTest(unittest.TestCase):
    maxDiff = None

    def setUp(self):
        self.test_args = get_args_CTTVGeneticsEvidenceString_init()
        self.evidence_string = evidence_strings.CTTVGeneticsEvidenceString(*self.test_args)

    def test_evidence_string(self):
        test_dict = {
    "literature": {
        "references": [
            {"lit_id": "http://europepmc.org/abstract/MED/11524702"},
            {"lit_id": "http://europepmc.org/abstract/MED/12145752"},
            {"lit_id": "http://europepmc.org/abstract/MED/21697857"}]
    },
    "disease": {"id": ["http://www.orpha.net/ORDO/Orphanet_886"]},
    "validated_against_schema_version": "1.6.1",
    "target": {
        "target_type": "http://identifiers.org/cttv.target/gene_variant",
        "id": "http://identifiers.org/ensembl/ENSG00000163646",
        "activity": "http://identifiers.org/cttv.activity/unknown"
    },
    "sourceID": "eva",
    "evidence": {
        "gene2variant": {
            "is_associated": True,
            "provenance_type": {
                "expert": {"status": True, "statement": "Primary submitter of data"},
                "database": {
                    "id": "EVA",
                    "dbxref": {
                        "url": "http://identifiers.org/clinvar.record/RCV000004642",
                        "id": "http://identifiers.org/clinvar",
                        "version": "2017-08"
                    },
                    "version": "1.0"
                }
            },
            "evidence_codes": ["http://identifiers.org/eco/cttv_mapping_pipeline"],
            "date_asserted": "2015-06-26T23:00:00",
            "functional_consequence": "http://purl.obolibrary.org/obo/SO_0001587",
            "urls": [{"url": "http://www.ncbi.nlm.nih.gov/clinvar/RCV000004642",
                "nice_name": "Further details in ClinVar database"}],
            "resource_score": {
                "type": "pvalue",
                "method": {"url": "", "description": "Not provided by data supplier"},
                "value": 1e-07
            }
        },
        "variant2disease": {
            "is_associated": True,
            "clinical_significance": "Pathogenic",
            "provenance_type": {
                "literature": {
                    "references": [
                        {"lit_id": "http://europepmc.org/abstract/MED/11524702"},
                        {"lit_id": "http://europepmc.org/abstract/MED/12145752"},
                        {"lit_id": "http://europepmc.org/abstract/MED/21697857"}]
                },
                "expert": {"status": True, "statement": "Primary submitter of data"},
                "database": {
                    "id": "EVA",
                    "dbxref": {
                        "url": "http://identifiers.org/clinvar.record/RCV000004642",
                        "id": "http://identifiers.org/clinvar",
                        "version": "2017-08"
                    },
                    "version": "1.0"
                }
            },
            "evidence_codes": ["http://purl.obolibrary.org/obo/ECO_0000205"],
            "date_asserted": "2015-06-26T23:00:00",
{'fraction_non_alphanumeric': 0.2535751656784095, 'fraction_numerical': 0.09306804567719629, 'mean_word_length': 11.866731707317074, 'pattern_counts': {'":': 2500, '<': 3, '<?xml version=': 0, '>': 107, 'https://': 0, 'lorem ipsum': 0, 'www.': 10, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6538285', 'n_tokens_mistral': 25795, 'n_tokens_neox': 20457, 'n_words': 2225}