From c46eb26d8f81b1db188675aa6b7a82087a23b9ef Mon Sep 17 00:00:00 2001 From: Graham McVicker <mcvicker@sanger.ac.uk> Date: Wed, 25 Feb 2004 11:16:47 +0000 Subject: [PATCH] crufty --- scripts/Analysis/genomic_cdna_test | 109 ----------------------------- 1 file changed, 109 deletions(-) delete mode 100755 scripts/Analysis/genomic_cdna_test diff --git a/scripts/Analysis/genomic_cdna_test b/scripts/Analysis/genomic_cdna_test deleted file mode 100755 index ee44dab22f..0000000000 --- a/scripts/Analysis/genomic_cdna_test +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/local/bin/perl - -use strict; - -=head1 NAME - - -=head1 SYNOPSIS - - -=head1 DESCRIPTION - - -=cut - -use Bio::EnsEMBL::Analysis::PairAlign; - -use Bio::EnsEMBL::SeqFeature; -use Bio::EnsEMBL::FeaturePair; -use Bio::SeqFeature::FeaturePair; - -use Getopt::Long; - -# Takes an msp file and a series of coords to convert as input - -my $file = shift; - -my @coords = @ARGV; - -open(IN,"<$file") || die "Can't open file $file"; -my $infh = \*IN; - -my %pairs; - -while (my $line = <$infh>) { - my $pair = read_FeaturePair($line); - my $id = $pair->primary_tag; - - if (!defined($pairs{$id})) { - $pairs{$id} = new Bio::EnsEMBL::Analysis::PairAlign; - } - - $pairs{$id}->addFeaturePair($pair); -} - -foreach my $key (keys %pairs) { - - foreach my $pair1 ($pairs{$key}->eachFeaturePair) { - my $pair2 = $pair1->feature2; -; - print($pair1->start . " " . - $pair1->end . " " . - $pair2->start . " " . - $pair2->end . "\n"); - - } - foreach my $c (@coords) { - my $out = $pairs{$key}->genomic2cDNA($c); - print("Genomic $c - cDNA $out\n"); - } - -} - - -sub read_FeaturePair { - my ($line) = @_; - chomp($line); - - my ($score,$pid,$qstart,$qend,$id1,$hstart,$hend,$id2,$desc) = split(' ',$line,9); - - my $strand1 = 1; - my $strand2 = 1; - - if ($qstart > $qend ) { - my $tmp = $qend; - $qend = $qstart; - $qstart = $tmp; - - $strand1 = -1;} - - if ($hstart > $hend ) { - - my $tmp = $hend; - $hend = $hstart; - $hstart = $tmp; - - $strand2 = -1; - } - - my $sf1 = new Bio::EnsEMBL::SeqFeature(-start => $qstart, - -end => $qend, - -strand => $strand1, - -primary_tag => $id1); - - - my $sf2 = new Bio::EnsEMBL::SeqFeature(-start => $hstart, - -end => $hend, - -strand => $strand2, - -primary_tag => $id2); - - - my $fp = new Bio::EnsEMBL::FeaturePair(-feature1 => $sf1, - -feature2 => $sf2, - ); - - return ($fp); -} - - -- GitLab