public
Last active

ant dna

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
example map for
strenght: .AG. GC.. ...A ..GC | AC.. GT.. T.TC ....
size: CG.. .... ...C ..T. | ..AC .... ...C ..A.
 
ant 1: TTTC AAAG GGGG GAGC TGTA AGGA TTCT CCAG
ant 2: CCGC GGGC AGGT TTAC TACT TGGA TACC ACTC
 
Then we match each gene in strength and size against the ant unless it's a '.'
If we have match the score is increased. If we have a similarity (A<->G or C<->T)
the score is not changed and otherwise it's decreased.
 
For a fully working example script that works with strings:
 
http://gist.github.com/164135
 
 
example output:
CCGT TGTA GTAC GACT CCAA GCTT GCGT GTTG
size: 1
strength: 0
weight: -2
ATCT GGGT GGAC GCAC TTTA TTGG CGCC GCTG
size: 2
strength: 0
weight: -3
GCAG ACTA CCAT TGTA CCAC CCCC ACGT CAGG
size: 0
strength: -2
weight: 4
CAGA CCTT CTCC TTAC CCGA CCTA CCAG TATT
size: 0
strength: 2
weight: 5
GTTG TGTC TTGT CTAA TTCC CGAA TAGC CTTC
size: 1
strength: 0
weight: -2
TAGT ACTG TCAT TTTG TTCG GTAA TTCG GACT
size: -2
strength: 3
weight: 3
ACCA GCAA GCCG ATAC CCCT CTTA TCTG TGGA
size: -2
strength: 5
weight: 3
AAAC CTCG TGGA TCTC TTAG ATAA ACAA CGCA
size: 1
strength: 0
weight: 1
AGCT CTCG CAAC AGTT TAGC CCTC ATGG CCTA
size: 3
strength: -4
weight: 3
GCTT CCCC CCAC CATT TACG CTAG TAGA TGGC
size: 1
strength: 2
weight: -6
GCAA GTCT AAAA CATC GTGC GCAA ATAC TCAC
size: 3
strength: 0
weight: 2

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.