Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need to generate 5 random DNA sequences that are each about 20 bases and the table below is what it is supposed to look

I need to generate 5 random DNA sequences that are each about 20 bases and the table below is what it is supposed to look like. I have the following query but it only generates one DNA sequence and I am not sure how to get 5 rows of DNA sequences.

with t1 as (select chr(65) as s union select chr(67) union select chr(71) union select chr(84) ) , t2 as ( select s, row_number() over() as rn from t1) , t3 as ( select generate_series(1,$1) as i,round(random() * 4 + 0.5) as rn ) , t4 as ( select t2.s from t2 join t3 on (t2.rn=t3.rn))

Table 84: 5 records g dna

1 ACGGCTTATCGAACTGCGTC

2 TCAGGAATAGCCAAAGACCC

3 TTATGGTATCTAGGCTCTGG

4 GTTCGTTTACACGGTTTGAG

5 GCGGGGCATGGCACGATATA

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Accounting questions

Question

What are bioaccumulation and biomagnification?

Answered: 1 week ago

Question

6. Identify characteristics of whiteness.

Answered: 1 week ago

Question

e. What are notable achievements of the group?

Answered: 1 week ago