def testBasicAnnotationWithChange(self):
        """ Test whether we can translate from one coordinate system to another.  This tests a known change.
        """
        tDS = TranscriptToUniProtProteinPositionTransformingDatasource(title="UniProt", version="test", src_file="file://testdata/small_uniprot_prot_seq_ds/db")

        # Must correspond to what the datasource is going to generate.
        outputAnnotation = "UniProt_aapos"
        m = MutationData()
        m.createAnnotation('transcript_id', 'uc009vvt.1')
        m.createAnnotation('protein_change', 'p.T1105A')
        m = tDS.annotate_mutation(m)
        self.assertTrue(m[outputAnnotation] == "969", "Did not get proper value (969): " + m[outputAnnotation])
    def testBasicAnnotationNoChange(self):
        """ Test whether we can translate from one coordinate system to another (v1).  This tests no change.
        """
        tDS = TranscriptToUniProtProteinPositionTransformingDatasource(title="UniProt", version="test", src_file="file://testdata/small_uniprot_prot_seq_ds/db")

        # Must correspond to what the datasource is going to generate
        outputAnnotation = "UniProt_aapos"
        m = MutationDataFactory.default_create()
        m.createAnnotation('transcript_id', 'uc003tqk.3')
        m.createAnnotation('protein_change', 'p.S50T')
        m = tDS.annotate_mutation(m)
        self.assertTrue(m[outputAnnotation] == "50", "Did not get proper value (50): " + m[outputAnnotation])
    def test_basic_annotation_with_change(self):
        """ Test whether we can translate from one coordinate system to another (v2 2014).  This tests a known change.
        """
        tDS = TranscriptToUniProtProteinPositionTransformingDatasource(title="UniProt", version="test", src_file="file://testdata/small_uniprot_prot_seq_ds_blastp_2014/db")

        # Must correspond to what the datasource is going to generate.
        #ENST00000545482.1_Silent_p.S178S
        outputAnnotation = "UniProt_aapos"
        m = MutationDataFactory.default_create()
        m.createAnnotation('transcript_id', 'ENST00000545482.1')
        m.createAnnotation('protein_change', 'p.S178S')
        m = tDS.annotate_mutation(m)
        self.assertTrue(m[outputAnnotation] == "293", "Did not get proper value (293): " + m[outputAnnotation])
    def testBasicAnnotationWithChange(self):
        """ Test whether we can translate from one coordinate system to another (v1).  This tests a known change.
        """
        tDS = TranscriptToUniProtProteinPositionTransformingDatasource(
            title="UniProt",
            version="test",
            src_file="file://testdata/small_uniprot_prot_seq_ds/db")

        # Must correspond to what the datasource is going to generate.
        outputAnnotation = "UniProt_aapos"
        m = MutationData()
        m.createAnnotation('transcript_id', 'uc009vvt.1')
        m.createAnnotation('protein_change', 'p.T1105A')
        m = tDS.annotate_mutation(m)
        self.assertTrue(
            m[outputAnnotation] == "969",
            "Did not get proper value (969): " + m[outputAnnotation])
    def testBasicAnnotationNoChange(self):
        """ Test whether we can translate from one coordinate system to another (v1).  This tests no change.
        """
        tDS = TranscriptToUniProtProteinPositionTransformingDatasource(
            title="UniProt",
            version="test",
            src_file="file://testdata/small_uniprot_prot_seq_ds/db")

        # Must correspond to what the datasource is going to generate
        outputAnnotation = "UniProt_aapos"
        m = MutationDataFactory.default_create()
        m.createAnnotation('transcript_id', 'uc003tqk.3')
        m.createAnnotation('protein_change', 'p.S50T')
        m = tDS.annotate_mutation(m)
        self.assertTrue(
            m[outputAnnotation] == "50",
            "Did not get proper value (50): " + m[outputAnnotation])
    def test_basic_annotation_no_change_2(self):
        """ Test whether we can translate from one coordinate system to another (v2 ... 2014).  This tests no change.
        """
        tDS = TranscriptToUniProtProteinPositionTransformingDatasource(
            title="UniProt",
            version="test",
            src_file="file://testdata/small_uniprot_prot_seq_ds_blastp_2014/db"
        )

        # Must correspond to what the datasource is going to generate
        outputAnnotation = "UniProt_aapos"
        m = MutationData()
        m.createAnnotation('transcript_id', 'ENST00000264990.6')
        m.createAnnotation('protein_change', 'p.S50T')
        m = tDS.annotate_mutation(m)
        self.assertTrue(
            m[outputAnnotation] == "50",
            "Did not get proper value (50): " + m[outputAnnotation])
    def test_basic_annotation_with_change(self):
        """ Test whether we can translate from one coordinate system to another (v2 2014).  This tests a known change.
        """
        tDS = TranscriptToUniProtProteinPositionTransformingDatasource(
            title="UniProt",
            version="test",
            src_file="file://testdata/small_uniprot_prot_seq_ds_blastp_2014/db"
        )

        # Must correspond to what the datasource is going to generate.
        #ENST00000545482.1_Silent_p.S178S
        outputAnnotation = "UniProt_aapos"
        m = MutationData()
        m.createAnnotation('transcript_id', 'ENST00000545482.1')
        m.createAnnotation('protein_change', 'p.S178S')
        m = tDS.annotate_mutation(m)
        self.assertTrue(
            m[outputAnnotation] == "293",
            "Did not get proper value (293): " + m[outputAnnotation])