Changeset 7 for test


Ignore:
Timestamp:
Apr 16, 2010, 9:27:45 AM (10 years ago)
Author:
maarten
Message:

added rewriting of insertions and deletions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/test.pl

    r6 r7  
    1010use Omim2dbsnp;
    1111use Bio::Phenotype::OMIM::OMIMparser;
    12 use Test::More tests => 36;
     12use Test::More tests => 57;
    1313
    1414#lib "../lib";
     
    101101        is( @$getauthor[0], "Vries and de Wet", "get author" );
    102102        is( @$getauthor[1], "1986, 1987",   "get author year" );
     103       
     104        print("some tests based on bugs\n");
     105                        $getauthor = ProccesAllicVariants::getAuthor("  Vohwinkel (1929) and Wigley (1929) ");
     106        is( @$getauthor[0], "Vohwinkel", "get author" );
     107        is( @$getauthor[1], "1929",   "get author year" );
     108        is( @$getauthor[2], "Wigley", "get author" );
     109        is( @$getauthor[3], "1929",   "get author year" );
     110       
     111                        $getauthor = ProccesAllicVariants::getAuthor("(604144.0001) and Y232C (604144.0012)");
     112        is( @$getauthor[0], undef, "get author false positive" );
     113        is( @$getauthor[1], undef,   "get author year" );
     114        #(600617) and SF1 (184757) genes
     115                        $getauthor = ProccesAllicVariants::getAuthor("(600617) and SF1 (184757) genes");
     116        is( @$getauthor[0], undef, "get author false positive"  );
     117        is( @$getauthor[1], undef,   "get author year" );
     118       
     119       
     120        $getauthor = ProccesAllicVariants::getAuthor("titin (188840) and myosin (160710)-binding site");
     121                is( @$getauthor[0], undef, "get author false positive myosin"  );
     122        is( @$getauthor[1], undef,   "get author year" );
     123       
     124        $getauthor = ProccesAllicVariants::getAuthor("in (188840)- and myosin (160710)-binding sites.");
     125                is( @$getauthor[0], undef, "get author false positive myosin"  );
     126        is( @$getauthor[1], undef,   "get author year" );       
     127       
    103128       
    104129$string =
     
    163188);
    164189
     190#n A-to-G transition at nucleotide 1730 in exon 13, resulting in the substitu exon 34
     191
     192is(
     193        ProccesAllicVariants::extractnuclitdemutation( " A-to-G transition at nucleotide 1730 in exon 13, resulting in the substitu exon 34", "75" ),
     194        "A-to-G transition at nucleotide 1730 in exon 13",
     195        "nucleotide with exon"
     196);
     197
     198is(
     199        ProccesAllicVariants::extractnuclitdemutation("on on 1 chromosome in the proband was a T-to-C transition predicted to result in a cys1417-to-arg substitution.The mutation was located in exon 30"),"T-to-C transition in exon 30","T-to-C transition BLABLA in exon 30");
    165200#acta .00010
    166201$string = "In 5 affected members spanning 3 generations of a Chinese family with
     
    187222#       "GGC to AGC", "codon change was GGC to AGC" );
    188223
     224
     225print("\ntesting format of deletions inserts and other awkward mutations\n");
     226is(
     227        ProccesAllicVariants::formatInDelMutation("1-BP DEL, 1764G") ,
     228        "1764delG",
     229        "1-BP DEL, 1764G"
     230);
     231
     232is(
     233        ProccesAllicVariants::formatInDelMutation( "2-BP DEL, 3283TC") ,
     234        "3283_3284delTC",
     235        "3283_3284delTC"
     236);
     237
     238is(
     239        ProccesAllicVariants::formatInDelMutation( "40-BP DEL, NT1294") ,
     240        "1294_1333del",
     241        "1294_1333del"
     242);
     243
     244is(
     245        ProccesAllicVariants::formatInDelMutation( "1675A DEL") ,
     246        "1675delA",
     247        "1675delA"
     248);
     249is(
     250        ProccesAllicVariants::formatInDelMutation( "1-BP INS, 1135A") ,
     251        "1135_1136insA",
     252        "1135_1136insA"
     253);
     254
     255is(
     256        ProccesAllicVariants::formatInDelMutation( "110-BP INS/14-BP DEL") ,
     257        "110-BP INS/14-BP DEL",
     258        "110-BP INS/14-BP DEL"
     259);
     260
     261#BRCA1.0033: 5-BP INS, NT3171. Als de nucleotiden in de tekst gespecificeerd worden, zouden we die graag terug zien, bijv. 3171_3172insAGTCG.
     262is(
     263        ProccesAllicVariants::formatInDelMutation( "5-BP INS, NT3171") ,
     264        "",
     265        ""
     266);
     267is(
     268        ProccesAllicVariants::formatInDelMutation( "") ,
     269        "",
     270        ""
     271);
     272
     273is(
     274        ProccesAllicVariants::formatInDelMutation( "") ,
     275        "",
     276        ""
     277);
     278
     279is(
     280        ProccesAllicVariants::formatInDelMutation( "") ,
     281        "",
     282        ""
     283);
     284
     285
     286
     287
    189288my $omim_entry = $omim_parser->next_phenotype();
    190289my $numb       = $omim_entry->MIM_number();
Note: See TracChangeset for help on using the changeset viewer.