#!/usr/bin/env perl
-# Copyright (C) 2007-2009 Martin A. Hansen.
+# Copyright (C) 2007-2010 Martin A. Hansen.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
$options = Maasha::Biopieces::parse_options(
[
+ { long => 'strand', short => 's', type => 'flag', mandatory => 'no', default => undef, allowed => undef, disallowed => undef },
{ long => 'bridge', short => 'b', type => 'flag', mandatory => 'no', default => undef, allowed => undef, disallowed => undef },
]
);
{
if ( $record->{ 'S_ID' } and $record->{ 'STRAND' } )
{
+ if ( $options->{ 'strand' } ) {
+ next if not $record->{ 'STRAND' };
+ } else {
+ $record->{ 'STRAND' } = 'X';
+ }
+
if ( $record->{ 'Q_ID' } and $record->{ 'S_BEG' } and $record->{ 'S_END' } )
{
for ( $i = $record->{ 'S_BEG' }; $i <= $record->{ 'S_END' }; $i++ ) {
$mean = Maasha::Calc::mean( \@array );
$new_record->{ 'S_ID' } = $s_id;
- $new_record->{ 'STRAND' } = $strand;
+ $new_record->{ 'STRAND' } = $strand if $options->{ 'strand' };
$new_record->{ 'S_BEG' } = $beg;
$new_record->{ 'S_END' } = $end;
$new_record->{ 'CONTIG_ID' } = $contig;