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

View of /FigKernelScripts/CSA_make_contig_index.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (download) (as text) (annotate)
Mon Jun 27 17:13:58 2011 UTC (8 years, 4 months ago) by overbeek
Branch: MAIN
CVS Tags: mgrast_dev_08112011, mgrast_dev_08022011, rast_rel_2014_0912, myrast_rel40, rast_rel_2014_0729, mgrast_release_3_1_2, mgrast_release_3_1_1, rast_rel_2011_0928, mgrast_version_3_2, mgrast_dev_12152011, mgrast_dev_10262011, HEAD
Changes since 1.1: +3 -0 lines
make part of myRAST distribution

use strict;
#
# This is a SAS Component
#
use Data::Dumper;
use gjoseqlib;
use SeedEnv;

my $usage = "usage: CSA_make_contig_index Index GenomeID < contigs > renamed.contigs\n";

my($indexF,$genomeID);
(
  ($indexF   = shift @ARGV) &&
  ($genomeID = shift @ARGV)
)
    || die $usage;

open(INDEX,">",$indexF) || die "could not open $indexF";

my @contigs = &gjoseqlib::read_fasta;
my $i;
for ($i=0; ($i < @contigs); $i++)
{
    my $id = "$genomeID:" . ($i+1);
    print INDEX join("\t",$id,$contigs[$i]->[0]),"\n";
    print ">$id\n$contigs[$i]->[2]\n";
}
close(INDEX);
 

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3