Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 591f6cc

Browse files
dna pattern matching and finding realative
1 parent 67492c3 commit 591f6cc

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
from collections import defaultdict
2+
import re as r
3+
dnapattern={
4+
'ATAACCGTACATACGAT':'Shrikant padhy',
5+
'ATCCCGATGCTACATGG':'Shreyash iyyer',
6+
'GTACCGATGGATTTCGA':'Shayantan Santra',
7+
'CTACGATCGATATGCAT':'manthan Raut',
8+
'ATTACCGATCATCGATA':'Alwar Goswami',
9+
'ATGCATTATGATCGAAT':'Kagiso Rabada',
10+
'ATCGATTATGATGGACT':'Mayank Tripathi',
11+
'ATCCGATATCATCTAGC':'Pranay Solse',
12+
'ATGAGCTATCATCTAGC':'Akilesh Salunkhe',
13+
'ATACGGTATCCCGTATA':'Akshay Pawar',
14+
}
15+
dnacount=defaultdict(list)
16+
diseased=input("Enter the most Common pattern found in diseased person")
17+
for j in dnapattern.keys():
18+
ls=[x.start() for x in r.finditer('('+'?'+'='+diseased+')',j)]
19+
dnacount[len(ls)]+=[dnapattern[j]]
20+
find=dnacount.get(max(dnacount.keys()),False)
21+
if(find==False or max(dnacount.keys())==0):
22+
print("Dna Pattern Unmatched")
23+
else:
24+
print("Dna pattern is more similar to the relative named:{}".format(find))
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Question:
2+
3+
A forensic lab wants to know whether a deceased person’s DNA matches a set of known relatives. It is known that the closest relatives will have most of the DNA matching, and as the relationship becomes farther, the matching genes will be lesser. For this, the DNA pattern of the deceased is given and the DNA pattern of 10 likely relatives are given. Write a program to identify the family of the deceased.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /