Bioinformatics Online Home
   Chapters Links Problems Enroll for Updates Help
 CHAPTER 12 PROBLEMS
   
 Problem 1
 Problem 2
 Problem 3
 Problem 4
 Problem 5
 Problem 6
 All problems

Home  >  Problems  >  Chapter 12

QUESTIONS ON SCRIPT EXAMPLE 7�PERL: PATTERN SUBSTITUTION AND INCREMENTAL DEVELOPMENT OF SCRIPTS (p. 600)
  1. In the "Usage" error message, why is it better to use $0 to identify the script than putting the actual script file name in the message?
  2. Huntington's disease is characterized by the presence of 39 or more tandem CAG repeats in a gene on Chromosome 4. Does this script provide a valid method of screening for such occurrences? Why or why not?
  3. Replace the three lines inside the "if(!defined $infil)" loop with a single line that accomplishes the same thing. Change the pattern-matching and substitution expressions so that the call to uc is no longer needed. Add code to look for a second command line argument, "-s, for silent mode", and, if present, change the output of the definition line to omit the doctor's name. Hint: Use split, then use the string operator "." to concatenate together only the pieces you want to output.
  4. Replace the call to chomp with a pattern substitution to remove newlines from the sequence.
  5. Rewrite the script to use the Bio::SeqIO module. What advantages are provided by Bio::SeqIO?




 

© 2004 by Cold Spring Harbor Laboratory Press. All rights reserved.
No part of these pages, either text or image, may be used for any purpose other than personal use. Therefore, reproduction, modification, storage in a retrieval system, or retransmission, in any form or by any means, electronic, mechanical, or otherwise, for reasons other than personal use, is strictly prohibited without prior written permission.

 

 
Home Chapters Links Problems Enroll for Updates Help CSHL Press