Question: Please use Python3 to solve the following question: Part1. It should read the DNA strands from a given list of strings in which every element

Please use Python3 to solve the following question:

Part1. It should read the DNA strands from a given list of strings in which every element represents a single strand.

The method should refine and update the list to contain valid strands "only", A strand is valid when:

1. its length is greater than 10

2. its length is less than 100

3. it contains only 'A', 'T', 'G' and 'C' characters.

4. it's ont an empty string

5. All characters are in uppercase.

when the number of clean strands is less than 3, the method should stop its execution and return an empty string.

Part 2. Using the refind list, now you should find overlapping elements and build one long strand which should be returned as a string. Two strands overlap when three characters of the first one match exactly three first characters of the second strand.

The following rules should be used for building the resulting string.

1. All input strands must overlap.

2. When two strands overlap they should be merged, eg. ATGatt and ATTGCA, we could merge the attthe new strand would be ATGATTGCA. The overlapping part should not be repeated.

3. One strand must overlap with another one only by the end of it - this is the starting strand.

4. One strand must overlap with another one only by the beginning of it- this is the ending strand.

5. All other strands must overlap on both ends.

Please note, the starting and ending strands can be anywhere in the received list.

Eg:

for the following input list

[AGTGGGGGGGGG, AAACCCAATTT, TTTACACACT, GCTGGGCCCAGT]

the expected outcome is

AAACCCAATTTACACAGCTGGGCCCAGTGGGGGGGG

where the strands would be matched and merged as shown below.

AAACCCAA[TTT] -> [TTT]ACACA[GCT] -> [GCT]GGGCCC[AGT] -> [AGT]GGGGGGGG

Part3. Generate the report

Now the constructed string should be split into 3-character long substrings, Each substring is a condon specifying an amino acid. Based on the populated dictionary-"condon_mapping"(second argument to the function), count amino acids occurrences in the given sequence.

The method should finally return a string consisting of alphabetically sorted amino acids and their count( colon-separated, one per line as depicted below).

Eg:

for sequence 'AAATTTGGGAAA' and 'codon_mapping' dictionary with following values:

AAA Lysine

GGG Glycine

TTT Phenylalanine

the expected outcome is:

Glycine: 1

Lysine: 2

Phenylalanine: 1

Also handle negative scenarios wherever necessary and return an empty string.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!