Jump to content

Bioinformatics/Subsequence: Difference between revisions

→‎{{header|jq}}: show full DNA strand
(→‎{{header|jq}}: show full DNA strand)
Line 317:
([inputs] | toDNA) as $strand
| ($four | toDNA) as $four
| "Indices of \($four) in the strandStrand of length \($strand|length):",
$strand,
"Zero-based indices of \($four):",
($strand | indices($four) | join(" "))
'</lang>
Line 323 ⟶ 325:
<pre>
./bioinformatics-subsequence.sh
Indices of ATTA in the strandStrand of length 200:
TGGGCCCAAGCATTGCCACGTAGCTTTGTCAGTGGGCTTGTAAGGGACGAACACAAACTCACAGACCAGGAATTCTCGAGTTCCAGTCCCCCCACTTGTCGCTATTTAGTTAAGACGTTCAGTTTCGTTGCGAACTGTGTCCCCCAGGCTAACGTGATGGGTGTCAGGAATCAATGGCCAACTTTCAGTTAGACTTGACC
6
Zero-based indices of CAAC:
178
 
./bioinformatics-subsequence.sh
Indices of GACT in the strandStrand of length 200:
TAAGACTGCAGGGTACGAAGAGTGGAAGATTGGCTCGTACTTGTCGACGTCGCGTGACATAATCTCTGTGCTCGCCTCGCAGTAAGGGACTAGGTCCCGTTCGAGCGCCCTGCTAGAAGGAGCATCCTACCATGCTCTGATGACATCCTGTCGGCATTAGAGTTTCTACGACATCTAAAGAGTACGATCGACTTCCCAGT
29 135
Zero-based indices of GACA:
55 141 169
</pre>
 
2,489

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.