[Bio] / FigKernelScripts / extract_DNA_sequence_from_object_for_start_predictions.pl Repository:
ViewVC logotype

Annotation of /FigKernelScripts/extract_DNA_sequence_from_object_for_start_predictions.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (view) (download) (as text)

1 : olson 1.2 #
2 :     # Copyright (c) 2003-2006 University of Chicago and Fellowship
3 :     # for Interpretations of Genomes. All Rights Reserved.
4 :     #
5 :     # This file is part of the SEED Toolkit.
6 :     #
7 :     # The SEED Toolkit is free software. You can redistribute
8 :     # it and/or modify it under the terms of the SEED Toolkit
9 :     # Public License.
10 :     #
11 :     # You should have received a copy of the SEED Toolkit Public License
12 :     # along with this program; if not write to the University of Chicago
13 :     # at info@ci.uchicago.edu or the Fellowship for Interpretation of
14 :     # Genomes at veronika@thefig.info or download a copy from
15 :     # http://www.theseed.org/LICENSE.TXT.
16 :     #
17 :    
18 : overbeek 1.1 # usage: extract_DNA_sequence_from_object_for_start_predictions < stream_of_ORF_objects > fasta_for_sims
19 :    
20 :     $/ = "///\n";
21 :     while (defined($obj = <STDIN>))
22 :     {
23 :     chomp $obj;
24 :     if ($obj =~ /^(.*?)\/\//s)
25 :     {
26 :     $obj = $1;
27 :     }
28 :    
29 :     foreach $kv (split(/\n/,$obj))
30 :     {
31 :     if ($kv =~ /^([^=]+)=(.*)$/)
32 :     {
33 :     $key_value_pairs{$1} = $2;
34 :     }
35 :     }
36 :    
37 :     ($seq = $key_value_pairs{"SEQ"}) || die "missing SEQ";
38 :     ($id = $key_value_pairs{"ID"}) || die "missing ID";
39 :     $seq =~ s/(TAA|TAG|TGA)$//;
40 :     print ">$id\n$seq\n";
41 :     }

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3