From 43dafcb83267345ae46bf21da2d7ea7db5b0b448 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Carn=C3=AB=20Draug?= Date: Mon, 25 Jul 2011 20:11:48 +0100 Subject: [PATCH] replaced identation tabs for spaces --- scripts/seq/bp_extract_feature_seq.PLS | 42 ++++++++++++++++------------------ 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/scripts/seq/bp_extract_feature_seq.PLS b/scripts/seq/bp_extract_feature_seq.PLS index 7d4ad600a..4bdaecf8a 100644 --- a/scripts/seq/bp_extract_feature_seq.PLS +++ b/scripts/seq/bp_extract_feature_seq.PLS @@ -46,15 +46,15 @@ use Getopt::Long; my ($input,$format,$featuretype,$output); $featuretype ='CDS'; GetOptions( - 'i|input:s' => \$input, - 'format:s' => \$format, - 'feature:s' => \$featuretype, - 'o|output:s'=> \$output); + 'i|input:s' => \$input, + 'format:s' => \$format, + 'feature:s' => \$featuretype, + 'o|output:s'=> \$output); $input || shift if @ARGV; my $in = new Bio::SeqIO(-file => $input, - -format => $format); + -format => $format); my $out; if ($output ) { $out = new Bio::SeqIO(-file => ">$output"); @@ -63,22 +63,20 @@ if ($output ) { } my $count = 1; -while( my $seq = $in->next_seq ) { - foreach my $f ( grep { $_->primary_tag =~ /$featuretype/i } - $seq->get_SeqFeatures ) { - my $s = $f->spliced_seq; - if( $featuretype =~ /gene|CDS/ ) { - $s->display_id($f->has_tag('gene') ? join(',',sort $f->each_tag_value('gene')) : - $f->has_tag('label') ? join(',',$f->each_tag_value('label')): - $s->display_id); - } else { - $s->display_id(sprintf("%s_%s_%d", - $seq->display_id, - $f->primary_tag, - $count++)); - } - $out->write_seq($s); +while( my $seq = $in->next_seq ) { + foreach my $f ( grep { $_->primary_tag =~ /$featuretype/i } + $seq->get_SeqFeatures ) { + my $s = $f->spliced_seq; + if( $featuretype =~ /gene|CDS/ ) { + $s->display_id($f->has_tag('gene') ? join(',',sort $f->each_tag_value('gene')) : + $f->has_tag('label') ? join(',',$f->each_tag_value('label')): + $s->display_id); + } else { + $s->display_id(sprintf("%s_%s_%d", + $seq->display_id, + $f->primary_tag, + $count++)); + } + $out->write_seq($s); } } - -__END__ -- 2.11.4.GIT