MCB 5472 Psi BLAST, Perl: Arrays, Loops J. Peter Gogarten Office: BPB 404 phone: 860 486-4061,

Slides:



Advertisements
Similar presentations
Introduction to R - Functions, Packages Andrew Jaffe 10/18/10.
Advertisements

MCB 5472 Blast, Psi BLAST, Perl: Arrays, Loops J. Peter Gogarten Office: BPB 404 phone: ,
Computer Programming for Biologists Class 9 Dec 4 th, 2014 Karsten Hokamp
CHAPTER 5: LOOP STRUCTURES Introduction to Computer Science Using Ruby (c) 2012 Ophir Frieder et al.
1 Chapter 11 l Basics of Recursion l Programming with Recursion Recursion.
ITC 240: Web Application Programming
PHP (2) – Functions, Arrays, Databases, and sessions.
MCB 5472 Psi BLAST, Perl: Arrays, Loops J. Peter Gogarten Office: BPB 404 phone: ,
Advanced Perl for Bioinformatics Lecture 5. Regular expressions - review You can put the pattern you want to match between //, bind the pattern to the.
PSI (position-specific iterated) BLAST The NCBI page described PSI blast as follows: “Position-Specific Iterated BLAST (PSI-BLAST) provides an automated,
7ex.1 Hashes. 7ex.2 Let's say we want to create a phone book... Enter a name that will be added to the phone book: Eyal Enter a phone number:
CSI 101 Elements of Computing Spring 2009 Lecture # 8 Looping and Recursion Wednesday, February 25 th, 2009.
Tirgul 7. Find an efficient implementation of a dynamic collection of elements with unique keys Supported Operations: Insert, Search and Delete. The keys.
Psi-Blast: Detecting structural homologs Psi-Blast was designed to detect homology for highly divergent amino acid sequences Psi = position-specific iterated.
MCB 372 PSI BLAST, scalars J. Peter Gogarten Office: BPB 404 phone: ,
Advanced Perl for Bioinformatics Lecture 5. Regular expressions - review You can put the pattern you want to match between //, bind the pattern to the.
Lecture 8: Basic concepts of subroutines. Functions In perl functions take the following format: – sub subname – { my $var1 = $_[0]; statements Return.
Computer Programming for Biologists Class 2 Oct 31 st, 2014 Karsten Hokamp
COMP 1001: Introduction to Computers for Arts and Social Sciences Programming in Scratch Monday, May 16, 2011.
MCB 5472 Psi BLAST, Perl: Arrays, Loops, Hashes J. Peter Gogarten Office: BPB 404 phone: ,
Higher Grade Computing Studies 2. Languages and Environments Higher Computing Software Development S. McCrossan 1 Classification of Languages 1. Procedural.
MCB 5472 Assignment #5: RBH Orthologs and PSI-BLAST February 19, 2014.
A First Program CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington Credits: a significant part of.
PHP meets MySQL.
MCB 5472 Assignment #6: HMMER and using perl to perform repetitive tasks February 26, 2014.
Subroutines and Files Bioinformatics Ellen Walker Hiram College.
Nonvisual Arrays and Recursion by Chris Brown under Prof. Susan Rodger Duke University June 2012.
Physical DB Issues, Indexes, Query Optimisation Database Systems Lecture 13 Natasha Alechina.
Chapter 11Java: an Introduction to Computer Science & Programming - Walter Savitch 1 Chapter 11 l Basics of Recursion l Programming with Recursion Recursion.
Control Structures. Important Semantic Difference In all of these loops we are going to discuss, the braces are ALWAYS REQUIRED. Even if your loop/block.
4 1 Array and Hash Variables CGI/Perl Programming By Diane Zak.
Mr. Dave Clausen1 La Cañada High School Chapter 6: Repetition Statements.
Copyright © 2010 Certification Partners, LLC -- All Rights Reserved Perl Specialist.
Databases. What is a database?  A database is used to store data. The word DATA is actually Latin for FACTS. A database is, therefore, a place, or thing.
Assignment feedback Everyone is doing very well!
What does C store? >>A = [1 2 3] >>B = [1 1] >>[C,D]=meshgrid(A,B) c) a) d) b)
CS101 Computer Programming I Chapter 4 Extra Examples.
CONTENTS Processing structures and commands Control structures – Sequence Sequence – Selection Selection – Iteration Iteration Naming conventions – File.
Overview of Bioinformatics 1 Module Denis Manley..
CS161 Topic #16 1 Today in CS161 Lecture #16 Prepare for the Final Reviewing all Topics this term Variables If Statements Loops (do while, while, for)
read and learn from example loop programs develop modular program
11- 1 Chapter 11.  Avoiding Logic Errors by Validating Input  What to Do If Input Errors Occur  Global Considerations in COBOL  When Data Should Be.
CPTG286K Programming - Perl Chapter 4: Control Structures.
Copyright © 2003 ProsoftTraining. All rights reserved. Perl Fundamentals.
 In computer programming, a loop is a sequence of instruction s that is continually repeated until a certain condition is reached.  PHP Loops :  In.
A First Program CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington Credits: a significant part of.
 2001 Prentice Hall, Inc. All rights reserved. Chapter 7 - Introduction to Common Gateway Interface (CGI) Outline 7.1Introduction 7.2A Simple HTTP Transaction.
IS2802 Introduction to Multimedia Applications for Business Lecture 4: JavaScript, Loops, and Conditional Statements Rob Gleasure
11- 1 Chapter 11.  Avoiding Logic Errors by Validating Input  What to Do If Input Errors Occur  Global Considerations in COBOL  When Data Should Be.
Lecture 7 Conditional Scripting and Importing/Exporting.
Algorithms and Pseudocode
CSC 4630 Meeting 17 March 21, Exam/Quiz Schedule Due to ice, travel, research and other commitments that we all have: –Quiz 2, scheduled for Monday.
Structured Programming (COIT 29222) Term 2, 2009, Final Exam Date And Time  As advised by the university Open/Closed Book (3 hours)  Structured Programming,
Dept. of Animal Breeding and Genetics Programming basics & introduction to PERL Mats Pettersson.
LOOPS CHAPTER Topics  Four Types of Loops –while –do…while –for –foreach  Jump Statements in Loops –break –continue 2.
CSC 4630 Perl 3 adapted from R. E. Beck. Problem But we worked on it first: Input: Read from a text file named in a command line argument Output: List.
Chapter 5 – Part 3 Conditionals and Loops. © 2004 Pearson Addison-Wesley. All rights reserved2/19 Outline The if Statement and Conditions Other Conditional.
PHP Tutorial. What is PHP PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.
Learning Javascript From Mr Saem
Chapter 5- Assembling , Linking, and Executing Programs
Control Flow Constructs: Conditional Logic
Warm-up Program Use the same method as your first fortune cookie project and write a program that reads in a string from the user and, at random, will.
Compiler Construction
File Handling Programming Guides.
HTML Links.
Histogram of percent identity for significant and insignificant hits
Blast, Psi BLAST, Perl: Arrays, Loops
Module 4 Loops and Repetition 9/19/2019 CSE 1321 Module 4.
Presentation transcript:

MCB 5472 Psi BLAST, Perl: Arrays, Loops J. Peter Gogarten Office: BPB 404 phone: ,

Psi-Blast Psi-Blast Results Query: (intein) link to sequence here, check BLink here

Psi-Blast is for finding matches among divergent sequences (position- specific information) WARNING: For the nth iteration of a PSI BLAST search, the E-value gives the number of matches to the profile NOT to the initial query sequence! The danger is that the profile was corrupted in an earlier iteration. PSI BLAST and E-values!

The NCBI has released a new version of blast. The command line version is blast+. The new version is faster and allows for more flexibility, but at present we still have problems with running it on the cluster. The new commands are equivalent to the blastall commmands:

The legacy_blast.pl script that is part of blast+ translates blastall commands into the blast+ syntax. E.g.: $./legacy_blast.pl megablast -i query.fsa -d nt -o mb.out --print_only /opt/ncbi/blast/bin/blastn -query query.fsa -db "nt" -out mb.out $ From the blast+ manual:

3) Write a short Perl script that calculates the circumference of a circle given a radius provided by the user. The best way to find which module to use is google. You can search core modules at

Old Assignment for Monday 1)Write a 2 sentence outline for your student project 2)Read chapter P5 and P12 conditional statements and on “for, foreach, and while” loops. # This assigns numbers from 0 to 50 to an array, # so that $a[0] =0; $a[1] =1; $a[50] =50 3) Write perl scripts that add all numbers from 1 to 50. Try to do this using at least two different control structures. 4) Create a program that reads in a sequence stored in a file handed to the program on the command line and determines GC content of a sequence. Use class3.pl as a starting point.

Go through class3.pl script ( If time go through Olga’s search for distant homologs webpage at (use cd00081for PSSM viewer)

%GC counter, part A: read in seqs

%GC counter, part B: move seqs to array

%GC counter, part B: calculate %GC

Control structures: Sum while ( ) { } for (,, ) { }

Control structures: Sum foreach ( ) { }; Infinite loop with last: while () { if( ) {last}; };

Control structures: Sum while (defined ( )) { }; for (,, ) { } Counting elements of an array Could have started at 0

For Monday Write a script that reads in a sequence and prints out the reverse complement. Modify your script to that it can handle a sequence that goes over several lines. Background: $comp =~ tr/ATGC/TACG/; #translates every A in $comp into a T; every T into an A; every G into a C and every C into a G Read P 14 on hashes, write the program suggested in the chapter.

For Monday Do the following statements evaluate to true or false? (Check P5) 1 0 && 1 0|| /45 45== <=50 from >= !=45 45!=50

from

Most of the smaller assignments should be solvable within half an hour. Using the notes, the text book and the internet try to solve one problem for not more than one hour. Then ask me or Tim for help. In total, the assignments for one week might take a few hours, but if it goes beyond 6 hours total, ask for help, or hand in the latest version of your attempt to solve the assignment. Sometimes, a little help can go a long way. The main reason for the assignments is to make you actually write code and to learn form the mistakes you make.

Hashes are tables that relate keys and values. (in the array the number of the field could be considered the => $a[1]=0, $a[51]=50 ) In a %ash the entry for the key is the address where the value is stored. E.g., you could have a hash where the students age is stores as value and the student ID is the key. But you also could use the students name as key and the ID or age or …. as value. This works very economically, especially if the table is sparse. my (%studentID, %student_first_name, %studentGPA);$studentID{gogarten}=9999; $student_first_name{gogarten}=‘Johann Peter’; $studentGPA{gogarten}=3.2; In many instances you need to make sure that the key you want to uses has not yet been assigned. If (exists ($studentID{gogarten}) {}; Go through class 4.pl