Bioinformatics/Subsequence: Difference between revisions

Content added Content deleted
(→‎{{header|jq}}: show full DNA strand)
Line 317: Line 317:
([inputs] | toDNA) as $strand
([inputs] | toDNA) as $strand
| ($four | toDNA) as $four
| ($four | toDNA) as $four
| "Indices of \($four) in the strand of length \($strand|length):",
| "Strand of length \($strand|length):",
$strand,
"Zero-based indices of \($four):",
($strand | indices($four) | join(" "))
($strand | indices($four) | join(" "))
'</lang>
'</lang>
Line 323: Line 325:
<pre>
<pre>
./bioinformatics-subsequence.sh
./bioinformatics-subsequence.sh
Indices of ATTA in the strand of length 200:
Strand of length 200:
TGGGCCCAAGCATTGCCACGTAGCTTTGTCAGTGGGCTTGTAAGGGACGAACACAAACTCACAGACCAGGAATTCTCGAGTTCCAGTCCCCCCACTTGTCGCTATTTAGTTAAGACGTTCAGTTTCGTTGCGAACTGTGTCCCCCAGGCTAACGTGATGGGTGTCAGGAATCAATGGCCAACTTTCAGTTAGACTTGACC
6
Zero-based indices of CAAC:
178


./bioinformatics-subsequence.sh
./bioinformatics-subsequence.sh
Indices of GACT in the strand of length 200:
Strand of length 200:
TAAGACTGCAGGGTACGAAGAGTGGAAGATTGGCTCGTACTTGTCGACGTCGCGTGACATAATCTCTGTGCTCGCCTCGCAGTAAGGGACTAGGTCCCGTTCGAGCGCCCTGCTAGAAGGAGCATCCTACCATGCTCTGATGACATCCTGTCGGCATTAGAGTTTCTACGACATCTAAAGAGTACGATCGACTTCCCAGT
29 135
Zero-based indices of GACA:
55 141 169
</pre>
</pre>