Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a bash script that will expect on the command line a single argument which is the name of a file containing multiple DNA strings,

Write a bash script that will expect on the command line a single argument which is the name of a file containing multiple DNA strings, each on a single line with no white space characters of any kind except for the terminating newline character at the end of the line.

Each line is just a sequence of the letters a, c, g, and t. This script will print each line in which the 4th 3-letter sequence is repeated twice later in the line at starting positions that are multiples of three apart.

For example, the string below, which is broken into groups of three letters for ease or reading

acg ttt ggg ccc agc tct ccg ccc tca cac aca ccc cgg ggt

satises this requirement, since ccc is the 4th three-letter sequence and it reoccurs twice at positions that are multiples of three apart, whereas this one does not:

acg ttt ggg ccc agc tct ccg gcc cca cac aca ccc cgg ggt

because, although ccc occurs twice later in the line, the rst reoccurrence is not a multiple of three positions from the rst one.

Error checking: This script must check that it is given a lename on the command line that can be read and issue a usage statement if there is an error of this type.

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

Relational Database Design A Practical Approach

Authors: Marilyn Campbell

1st Edition

1587193175, 978-1587193170

More Books

Students also viewed these Databases questions

Question

Solve the recurrence relation a n = a n - 1 + 2 n with a 0 = 5 .

Answered: 1 week ago

Question

7. It is advisable to do favors for people whenever possible.

Answered: 1 week ago

Question

9. Power and politics can be destructive forces in organizations.

Answered: 1 week ago