Presentation is loading. Please wait.

Presentation is loading. Please wait.

Physical Mapping II + Perl CIS 667 March 2, 2004.

Similar presentations


Presentation on theme: "Physical Mapping II + Perl CIS 667 March 2, 2004."— Presentation transcript:

1 Physical Mapping II + Perl CIS 667 March 2, 2004

2 Restriction Site Models Let each fragment in the Double Digest Problem be represented by its length  No measurement errors  All fragments present Digesting the target DNA by the first enzyme gives the multiset A = {a 1, a 2, …, a n } The second enzyme gives B = {b 1, b 2, …, b n } Digestion with both gives O = {o 1, o 2, …, o n }

3 Restriction Site Models We want to find a permutation  A of the elements of A and  B of the elements of B  Plot lengths  A from on a line in the order of  A  Plot lengths  B from on a line in the order of  B on top of previous plot  Several new subintervals may be produced  We need a one-to-one correspondence between each resulting subinterval and each element of O

4 Restriction Site Models This problem is NP-complete  It is a generalization of the set partition problem  The number of solutions is exponential Partial Digest problem has not been proven to be NP-complete  The number of solutions is much smaller than for DDP

5 Interval Graph Models We model hybridization mapping using interval graphs  Much simpler than the real problem, but still NP-complete  Uses graphs  Vertices represent clones  Edges represent overlap information between clones

6 First Interval Graph Model Uses two graphs  G r = (V, E r )  (i, j)  E r means we know clones i, j overlap  G t = (V, E t )  E t represents known and unknown overlap information  If we know for sure that two clones don’t overlap, the corresponding edge is left out of the graph G t

7 First Interval Graph Model Does there exist a graph G s = (V, E s ) such that E r  E s  E t such that G s is an interval graph?  An interval graph G = (V, E) is an undirected graph obtained from a collection C of intervals on the real line  To each interval in C there corresponds a vertex in G  There is an edge between u and v only if their intervals have a non-empty intersection

8 First Interval Graph Model a b c d e a b c d e

9 Non-Interval Graphs a b c d e a b c d e

10 Second Interval Graph Model Don’t assume that known overlap information is reliable  Construct a graph G = (V, E) using that information  Does there exist a graph G’ = (V, E’) such that E’  E, G’ is an interval graph and |E’| is maximum?  We have discarded some false positives  The solution is the interpretation that contains the minimum number of false positives

11 Third Interval Graph Model Use overlap information along with information about each clone  Different clones come from different copies of the same molecule  Label each clone with the identification of the molecule copy it came from  Assume we had k copies of the target DNA and different restriction enzymes were used to break up each copy

12 Third Interval Graph Model Build a graph G = (V, E) with known overlap information between clones  Use k colors to color the vertices  No edges between vertices of the same color since they come from the same clone and hence cannot overlap  We say that such a graph has a valid coloring  Does there exist graph G’ = (V’, E) such that, G’ is an interval graph, and the coloring of G is valid for G’?  I.e., Can we add edges to G transforming it into an interval graph without violating the coloring?

13 Consecutive Ones Property We can apply the previous models in any situation where we can obtain some type of fingerprint for each fragment  Now we use as a clone fingerprint the set of probes that hybridize to it  Assumptions  Reverse complement of each probe’s sequence occurs only once in the target DNA (“probes are unique”  There are no errors  All “clones X probes” hybridization experiments have been done

14 Consecutive Ones Property If we have n clones and m probes we will build an n  m binary matrix M, where each entry M ij tells us whether probe j hybridized to clone i or not  Then obtaining a physical map from the matrix becomes the problem of finding a permutation of the columns (probes) such that all 1s in each row (clone) are consecutive  Such a matrix is said to have the consecutive 1s property for rows (C1P)

15 Consecutive Ones Property There exist polynomial algorithms for the C1P property  Works only for data with no errors  Realistic algorithms should try to find matrixes which approximate the C1P property, while minimizing the number of errors which must have been present to lead to such a solution  Allow 2 or 3 runs of 1s in a row  Minimize the number of runs of 1s in the matrix Problem is now NP-hard

16 Now we will look at some Perl in preparation for assignment 1

17 Perl substitution operator Example of Perl substitution operator $RNA =~ s/T/U/g; variable binding operator substitute operator PATTERN regular expression To be replaced by REPLACEMENT delimiter REPLACEMENT text to replace PATTERN Pattern modifier: g means globally, throughout the string. Others: i case insensitive m multiline s single line

18 Example 1 Let’s use the substitution operator to calculate the reverse complement of a strand of DNA

19 Example 2 One common task in bioinformatics is to look for motifs, short segments of DNA or protein of interest  For example, regulatory elements of DNA Let’s see a program to  Read in protein sequence data from a file  Put all the sequence data into one string for easy searching  Look for motifs the user types in at the keyboard

20 Turning arrays into Scalars We often find sequence data broken into short segments of 80 or so characters  This is inconvenient for the Perl program  Have to deal with motifs on more than one line  Collapse an array into a scalar with join  $protein = join( ‘’, @protein)

21 Regular expressions Regular expressions are ways of matching one or more strings using special wildcard- like operators  $protein =~ s/\s//g  \s matches whitespace  Can also be written [ \t\n\f\r]  if ($motif =~ /^\s*$/ ) {  ^ - beginning of line; $ - end of line  * repeated zero or more times

22 Hashes There are three main data types in Perl: scalar variables, arrays and hashes (also called associative arrays)  A hash provides a fast lookup of the value associated with a key  Initialized like this: %classification = ( ‘dog’ => ‘mammal’, ‘robin’=> ‘bird’ ‘asp’=> ‘reptile’ );

23 Example 3 Let’s look at the use of a hash by a subroutine to translate a codon to an amino acid using hash lookup  codon2aa

24 Example 3 The arguments to the subroutine are in the @_ array Declare a local variable as a my variable my($dna) = @_;

25 Example 4 We can use that subroutine to translate DNA into protein Note the use of a module (library) Note the use of.= to concatenate


Download ppt "Physical Mapping II + Perl CIS 667 March 2, 2004."

Similar presentations


Ads by Google