New in Wolfram Mathematica 7: Integrated Genomic & Protein Data  previous | next 
Rapidly Search the Human Genome
Show exact matches of a short DNA sequence on each human chromosome.
In[1]:=

Click for copyable input
chrpos = SortBy[

   Module[{chr = #, len, 

       scale = N[

         GenomeData[#, "SequenceLength"]/

          GenomeData["Chromosome1", "SequenceLength"]], rls}, 

      rls = Flatten[{#[[1, 1, 1]] -> (#[[All, 2, 1]]*scale/len) & /@ 

          SplitBy[Select[

            GenomeLookup["AGCTACGACTA"], #[[1, 2]] == 1 &], #[[1, 

             1]] &], _ -> {}}];

      len = GenomeData[chr, "SequenceLength"];

      {chr, 

       Extract[GenomeData[chr, "GBandScaledPositions"], 

          Position[GenomeData[chr, "GBandStainingCodes"], "acen", 1, 

           1]][[1, 1]]*scale, scale, 

       GenomeData[#, "AlternateStandardNames"][[1]], 

       GenomeData[chr, "AlternateStandardNames"][[2]], # /. rls}] & /@

     Most@GenomeData["Chromosomes"], #[[5]] &];

Graphics@MapIndexed[

  With[{i = #2[[1]]}, {White, EdgeForm[{Black, Thickness[0.005]}], 

     Rectangle[{0, i/15.}, {#[[2]], i/15. + 1/30.}, 

      RoundingRadius -> 0.5/30], 

     Rectangle[{#[[2]], i/15.}, {#[[3]], i/15. + 1/30.}, 

      RoundingRadius -> 0.5/30], Red, 

     Disk[{#, i/15. + 1/60.}, 0.01] & /@ #[[6]], Black, 

     Text[#[[4]], {-0.1, i/15. + 1/60.}]}] &, Reverse@chrpos]
Out[1]=