# # Make your own RP sequence file # # This script will create a RP sequence file using the user's choices of # Taxonomy Groups and RPG cutoffs. # # The perl module "LWP::Simple" is required # #!/usr/bin/perl use LWP::Simple; if(@ARGV != 2) { print "Usage: perl getMyRPSeq.pl mypick.txt output.seq\n"; exit 1; } # configuration file of tab-delimited txt file with three columns: # TaxonGroup TaxonId RPCutoff # Note: for each row in the file, only the third column should be changed. # The possible values are 15, 35, 55, 75 my $mypick = $ARGV[0]; # path to the output sequence file my $output = $ARGV[1]; my $url = 'http://pir.georgetown.edu/rps/data/rp_seq_tax_group/current/'; open(OUT, ">", $output) or die "Can't open $!\n"; open(PICK, $mypick) or die "Can't open $!\n"; while($line=) { chomp($line); if(!($line =~ /^TaxonGroup/ || $line =~ /^#/ || $line =~ /^$/)) { ($taxGroup, $taxId, $cutoff) = (split(/\t/, $line))[0, 1, 2]; my $content = get $url."/".$cutoff."/".$taxId.".seq"; die "Couldn't get $url" unless defined $content; print OUT $content; } } close(PICK); close(OUT);