Bioinformatics/base count: Difference between revisions
Content deleted Content added
m →{{header|REXX}}: changed the REXX code to not raise the noValue condition. |
m →{{header|REXX}}: (internal only) changed the DNA sequence to lowercase; output DNA sequence is still uppercase. |
||
Line 957: | Line 957: | ||
<lang rexx>/*REXX program finds the number of each base in a DNA string (along with a total). */ |
<lang rexx>/*REXX program finds the number of each base in a DNA string (along with a total). */ |
||
parse arg dna . |
parse arg dna . |
||
if dna=='' | dna=="," then dna= ' |
if dna=='' | dna=="," then dna= 'cgtaaaaaattacaacgtcctttggctatctcttaaactcctgctaaatg' , |
||
' |
'ctcgtgctttccaattatgtaagcgttccgagacggggtggtcgattctg' , |
||
' |
'aggacaaaggtcaagatggagcgcatcgaacgcaataaggatcatttgat' , |
||
' |
'gggacgtttcgtcgacaaagtcttgtttcgagagtaacggctaccgtctt' , |
||
' |
'cgattctgcttataacactatgttcttatgaaatggatgttctgagttgg' , |
||
' |
'tcagtcccaatgtgcggggtttcttttagtacgtcgggagtggtattata' , |
||
' |
'tttaatttttctatatagcgatctgtatttaagcaattcatttaggttat' , |
||
' |
'cgccgcgatgctcggttcggaccgccaagcatctggctccactgctagtg' , |
||
' |
'tcctaaatttgaatggcaaacacaaataagatttagcaattcgtgtagac' , |
||
' |
'gaccggggacttgcatgatgggagcagctttgttaaactacgaacgtaat' |
||
dna= space(dna, 0); upper dna /*elide blanks from DNA; uppercase it. */ |
dna= space(dna, 0); upper dna /*elide blanks from DNA; uppercase it. */ |
||
say '────────length of the DNA string: ' length(dna) |
say '────────length of the DNA string: ' length(dna) |