From e8e32d43d674573ff4a66fe77780cc18cb02d430 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Wed, 13 May 2009 15:28:16 +0000 Subject: [PATCH] fixed symlink trouble git-svn-id: http://biopieces.googlecode.com/svn/trunk@376 74ccb610-7750-0410-82ae-013aeee3265d --- bp_bin/00README | 5 + bp_bin/add_ident | 6 ++ bp_bin/align_seq | 6 ++ bp_bin/analyze_bed | 6 ++ bp_bin/analyze_seq | 6 ++ bp_bin/analyze_tags | 6 ++ bp_bin/analyze_vals | 6 ++ bp_bin/assemble_tag_contigs | 6 ++ bp_bin/blast_seq | 6 ++ bp_bin/blat_seq | 6 ++ bp_bin/calc_bit_scores | 6 ++ bp_bin/calc_fixedstep | 6 ++ bp_bin/complement_seq | 6 ++ bp_bin/complexity_seq | 6 ++ bp_bin/compute | 6 ++ bp_bin/count_records | 6 ++ bp_bin/count_vals | 6 ++ bp_bin/create_blast_db | 6 ++ bp_bin/create_vmatch_index | 6 ++ bp_bin/create_weight_matrix | 6 ++ bp_bin/extract_seq | 6 ++ bp_bin/flip_tab | 6 ++ bp_bin/fold_seq | 6 ++ bp_bin/format_genome | 6 ++ bp_bin/get_genome_align | 6 ++ bp_bin/get_genome_phastcons | 6 ++ bp_bin/get_genome_seq | 6 ++ bp_bin/grab | 6 ++ bp_bin/head_records | 6 ++ bp_bin/invert_align | 6 ++ bp_bin/length_seq | 6 ++ bp_bin/length_vals | 6 ++ bp_bin/list_biopieces | 6 ++ bp_bin/list_genomes | 6 ++ bp_bin/lowercase_seq | 178 +++++++++++++++++++++++++++++++++ bp_bin/match_seq | 6 ++ bp_bin/max_vals | 6 ++ bp_bin/mean_vals | 6 ++ bp_bin/median_vals | 6 ++ bp_bin/merge_records | 6 ++ bp_bin/merge_vals | 6 ++ bp_bin/min_vals | 6 ++ bp_bin/oligo_freq | 6 ++ bp_bin/patscan_seq | 6 ++ bp_bin/plot_chrdist | 6 ++ bp_bin/plot_histogram | 6 ++ bp_bin/plot_karyogram | 6 ++ bp_bin/plot_lendist | 6 ++ bp_bin/plot_matches | 6 ++ bp_bin/plot_phastcons_profiles | 6 ++ bp_bin/plot_seqlogo | 6 ++ bp_bin/print_usage | 6 ++ bp_bin/random_records | 6 ++ bp_bin/read_2bit | 6 ++ bp_bin/read_bed | 6 ++ bp_bin/read_blast_tab | 6 ++ bp_bin/read_embl | 6 ++ bp_bin/read_fasta | 6 ++ bp_bin/read_fixedstep | 6 ++ bp_bin/read_gff | 6 ++ bp_bin/read_mysql | 6 ++ bp_bin/read_phastcons | 6 ++ bp_bin/read_psl | 6 ++ bp_bin/read_soft | 6 ++ bp_bin/read_solexa | 6 ++ bp_bin/read_solid | 6 ++ bp_bin/read_stockholm | 6 ++ bp_bin/read_tab | 6 ++ bp_bin/read_ucsc_config | 6 ++ bp_bin/remove_adaptor | 6 ++ bp_bin/remove_indels | 6 ++ bp_bin/remove_keys | 6 ++ bp_bin/remove_mysql_tables | 6 ++ bp_bin/remove_ucsc_tracks | 6 ++ bp_bin/rename_keys | 6 ++ bp_bin/reverse_seq | 6 ++ bp_bin/shuffle_seq | 6 ++ bp_bin/soap_seq | 6 ++ bp_bin/sort_records | 6 ++ bp_bin/split_bed | 6 ++ bp_bin/split_seq | 6 ++ bp_bin/split_vals | 66 ++++++++++++ bp_bin/sum_vals | 6 ++ bp_bin/tile_seq | 6 ++ bp_bin/translate_seq | 6 ++ bp_bin/transliterate_seq | 6 ++ bp_bin/transliterate_vals | 6 ++ bp_bin/uniq_vals | 6 ++ bp_bin/upload_to_ucsc | 6 ++ bp_bin/uppercase_seq | 6 ++ bp_bin/vmatch_seq | 6 ++ bp_bin/write_2bit | 6 ++ bp_bin/write_align | 6 ++ bp_bin/write_bed | 6 ++ bp_bin/write_blast | 6 ++ bp_bin/write_fasta | 6 ++ bp_bin/write_fixedstep | 6 ++ bp_bin/write_psl | 6 ++ bp_bin/write_solid | 6 ++ bp_bin/write_tab | 6 ++ bp_bin/write_ucsc_config | 6 ++ 101 files changed, 837 insertions(+) create mode 100644 bp_bin/00README create mode 100755 bp_bin/add_ident create mode 100755 bp_bin/align_seq create mode 100755 bp_bin/analyze_bed create mode 100755 bp_bin/analyze_seq create mode 100755 bp_bin/analyze_tags create mode 100755 bp_bin/analyze_vals create mode 100755 bp_bin/assemble_tag_contigs create mode 100755 bp_bin/blast_seq create mode 100755 bp_bin/blat_seq create mode 100755 bp_bin/calc_bit_scores create mode 100755 bp_bin/calc_fixedstep create mode 100755 bp_bin/complement_seq create mode 100755 bp_bin/complexity_seq create mode 100755 bp_bin/compute create mode 100755 bp_bin/count_records create mode 100755 bp_bin/count_vals create mode 100755 bp_bin/create_blast_db create mode 100755 bp_bin/create_vmatch_index create mode 100755 bp_bin/create_weight_matrix create mode 100755 bp_bin/extract_seq create mode 100755 bp_bin/flip_tab create mode 100755 bp_bin/fold_seq create mode 100755 bp_bin/format_genome create mode 100755 bp_bin/get_genome_align create mode 100755 bp_bin/get_genome_phastcons create mode 100755 bp_bin/get_genome_seq create mode 100755 bp_bin/grab create mode 100755 bp_bin/head_records create mode 100755 bp_bin/invert_align create mode 100755 bp_bin/length_seq create mode 100755 bp_bin/length_vals create mode 100755 bp_bin/list_biopieces create mode 100755 bp_bin/list_genomes create mode 100755 bp_bin/lowercase_seq create mode 100755 bp_bin/match_seq create mode 100755 bp_bin/max_vals create mode 100755 bp_bin/mean_vals create mode 100755 bp_bin/median_vals create mode 100755 bp_bin/merge_records create mode 100755 bp_bin/merge_vals create mode 100755 bp_bin/min_vals create mode 100755 bp_bin/oligo_freq create mode 100755 bp_bin/patscan_seq create mode 100755 bp_bin/plot_chrdist create mode 100755 bp_bin/plot_histogram create mode 100755 bp_bin/plot_karyogram create mode 100755 bp_bin/plot_lendist create mode 100755 bp_bin/plot_matches create mode 100755 bp_bin/plot_phastcons_profiles create mode 100755 bp_bin/plot_seqlogo create mode 100755 bp_bin/print_usage create mode 100755 bp_bin/random_records create mode 100755 bp_bin/read_2bit create mode 100755 bp_bin/read_bed create mode 100755 bp_bin/read_blast_tab create mode 100755 bp_bin/read_embl create mode 100755 bp_bin/read_fasta create mode 100755 bp_bin/read_fixedstep create mode 100755 bp_bin/read_gff create mode 100755 bp_bin/read_mysql create mode 100755 bp_bin/read_phastcons create mode 100755 bp_bin/read_psl create mode 100755 bp_bin/read_soft create mode 100755 bp_bin/read_solexa create mode 100755 bp_bin/read_solid create mode 100755 bp_bin/read_stockholm create mode 100755 bp_bin/read_tab create mode 100755 bp_bin/read_ucsc_config create mode 100755 bp_bin/remove_adaptor create mode 100755 bp_bin/remove_indels create mode 100755 bp_bin/remove_keys create mode 100755 bp_bin/remove_mysql_tables create mode 100755 bp_bin/remove_ucsc_tracks create mode 100755 bp_bin/rename_keys create mode 100755 bp_bin/reverse_seq create mode 100755 bp_bin/shuffle_seq create mode 100755 bp_bin/soap_seq create mode 100755 bp_bin/sort_records create mode 100755 bp_bin/split_bed create mode 100755 bp_bin/split_seq create mode 100755 bp_bin/split_vals create mode 100755 bp_bin/sum_vals create mode 100755 bp_bin/tile_seq create mode 100755 bp_bin/translate_seq create mode 100755 bp_bin/transliterate_seq create mode 100755 bp_bin/transliterate_vals create mode 100755 bp_bin/uniq_vals create mode 100755 bp_bin/upload_to_ucsc create mode 100755 bp_bin/uppercase_seq create mode 100755 bp_bin/vmatch_seq create mode 100755 bp_bin/write_2bit create mode 100755 bp_bin/write_align create mode 100755 bp_bin/write_bed create mode 100755 bp_bin/write_blast create mode 100755 bp_bin/write_fasta create mode 100755 bp_bin/write_fixedstep create mode 100755 bp_bin/write_psl create mode 100755 bp_bin/write_solid create mode 100755 bp_bin/write_tab create mode 100755 bp_bin/write_ucsc_config diff --git a/bp_bin/00README b/bp_bin/00README new file mode 100644 index 0000000..70c8816 --- /dev/null +++ b/bp_bin/00README @@ -0,0 +1,5 @@ +This directory should only contain Biopiece executables. + + + +Martin A. Hansen, June 2008 diff --git a/bp_bin/add_ident b/bp_bin/add_ident new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/add_ident @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/align_seq b/bp_bin/align_seq new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/align_seq @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/analyze_bed b/bp_bin/analyze_bed new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/analyze_bed @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/analyze_seq b/bp_bin/analyze_seq new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/analyze_seq @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/analyze_tags b/bp_bin/analyze_tags new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/analyze_tags @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/analyze_vals b/bp_bin/analyze_vals new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/analyze_vals @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/assemble_tag_contigs b/bp_bin/assemble_tag_contigs new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/assemble_tag_contigs @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/blast_seq b/bp_bin/blast_seq new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/blast_seq @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/blat_seq b/bp_bin/blat_seq new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/blat_seq @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/calc_bit_scores b/bp_bin/calc_bit_scores new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/calc_bit_scores @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/calc_fixedstep b/bp_bin/calc_fixedstep new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/calc_fixedstep @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/complement_seq b/bp_bin/complement_seq new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/complement_seq @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/complexity_seq b/bp_bin/complexity_seq new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/complexity_seq @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/compute b/bp_bin/compute new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/compute @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/count_records b/bp_bin/count_records new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/count_records @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/count_vals b/bp_bin/count_vals new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/count_vals @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/create_blast_db b/bp_bin/create_blast_db new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/create_blast_db @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/create_vmatch_index b/bp_bin/create_vmatch_index new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/create_vmatch_index @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/create_weight_matrix b/bp_bin/create_weight_matrix new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/create_weight_matrix @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/extract_seq b/bp_bin/extract_seq new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/extract_seq @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/flip_tab b/bp_bin/flip_tab new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/flip_tab @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/fold_seq b/bp_bin/fold_seq new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/fold_seq @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/format_genome b/bp_bin/format_genome new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/format_genome @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/get_genome_align b/bp_bin/get_genome_align new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/get_genome_align @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/get_genome_phastcons b/bp_bin/get_genome_phastcons new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/get_genome_phastcons @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/get_genome_seq b/bp_bin/get_genome_seq new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/get_genome_seq @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/grab b/bp_bin/grab new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/grab @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/head_records b/bp_bin/head_records new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/head_records @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/invert_align b/bp_bin/invert_align new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/invert_align @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/length_seq b/bp_bin/length_seq new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/length_seq @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/length_vals b/bp_bin/length_vals new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/length_vals @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/list_biopieces b/bp_bin/list_biopieces new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/list_biopieces @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/list_genomes b/bp_bin/list_genomes new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/list_genomes @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/lowercase_seq b/bp_bin/lowercase_seq new file mode 100755 index 0000000..b51df83 --- /dev/null +++ b/bp_bin/lowercase_seq @@ -0,0 +1,178 @@ +#!/usr/bin/python + +import os, string, sys, getopt, Args, optparse + +record_delimiter = "\n---\n" + +class Lowercase_seq: + in_stream = None + out_stream = None + eo_buffer = False + buffer = '' + rec_dic = {} + rec_num = 0 + + ########################################### + def __init__(self): + pass + ########################################### + + ########################################### + def open_streams(self, input_file, output_file): + #print input_file, output_file + if input_file == '': + self.in_stream = sys.stdin + #print "in_stream = " + else: + try: + self.in_stream = open(input_file, 'r') + #print "in_stream = %s" % (input_file) + except: + raise IOError + + if output_file == '': + self.out_stream = sys.stdout + #print "out_stream = " + else: + try: + self.out_stream = open(output_file, 'w') + #print "out_stream = %s" % (output_file) + except: + raise IOError + ########################################### + + ########################################### + def close_streams(self): + if self.in_stream: + self.in_stream.close() + if self.out_stream: + self.out_stream.close() + ########################################### + + ########################################### + def get_record(self): + rec = '' + eof_flag = False + while not self.eo_buffer: + #print "STDIN.ISATTY :", self.in_stream.isatty() + + if self.in_stream.isatty(): + eof_flag = True + + if eof_flag: + if self.buffer == '': + self.eo_buffer = True + break + else: + tmp = self.in_stream.read(1000) + if not tmp: + eof_flag = True + + self.buffer = self.buffer + tmp + delim_index = self.buffer.find(record_delimiter) + if delim_index >= 0: + rec = self.buffer[:delim_index] + self.buffer = self.buffer[delim_index + len(record_delimiter):] + break + return rec + ########################################### + + ########################################### + def process_record(self, rec): + #print "PARSE_RECORD" + #print rec + #print "===" + lines = rec.split("\n") + self.rec_num += 1 + self.rec_dic[self.rec_num] = {} + for l in lines: + toks = l.split(": ") + if toks[0]=="SEQ": + self.rec_dic[self.rec_num][toks[0]] = toks[1].lower() + else: + self.rec_dic[self.rec_num][toks[0]] = toks[1] + #self.rec_dic[self.rec_num][toks[0]] = toks[1] + #print self.rec_dic[self.rec_num] + return self.rec_num + ########################################### + + ########################################### + def put_record(self, r_num): + rec = self.rec_dic[r_num] + for k in rec.keys(): + #print "%s: %s" % (k, rec[k]) + self.out_stream.write("%s: %s\n" % (k, rec[k])) + #print "---" + self.out_stream.write("---\n") + ########################################### + + ########################################### + def print_usage(self, opt): + #print opt + bp_dir = os.environ['BP_DIR'] + usage_path = bp_dir + os.path.sep + "bp_usage" + os.path.sep + "lowercase_seq.wiki" + os.system("print_usage -i %s %s" % (usage_path, opt)) + ########################################### + + +# main + +lc_seq = Lowercase_seq() + +try: + opts, args = getopt.getopt(sys.argv[1:], "I:O:?vx", ["stream_in=", "stream_out=", "help", "verbose", "no_stream"]) +except getopt.GetoptError, err: + # print help information and exit: + print str(err) # will print something like "option -a not recognized" + lc_seq.print_usage("") + sys.exit(2) + + +if len(opts)==0: + lc_seq.print_usage("") + sys.exit(1) + +stream_in = "" +stream_out = "" +verbose = False +for o, a in opts: + if o in ("-I", "--stream_in"): + stream_in = a + elif o in ("-O", "--stream_out"): + stream_out = a + elif o == "-?": + lc_seq.print_usage("") + sys.exit(1) + elif o == "--help": + lc_seq.print_usage("-?") + sys.exit(1) + elif o in ("-v", "--verbose"): + verbose = True + #else: + # assert False + # print_usage() + +try: + lc_seq.open_streams(stream_in, stream_out) +except: + sys.stderr.write("%s\n" % ("IOError")) + sys.exit(1) + + +while True: + rec = lc_seq.get_record() + if rec=='': + break + rec_num = lc_seq.process_record(rec) + lc_seq.put_record(rec_num) + +lc_seq.close_streams() + +#source = "Dmel_tRNAs_key_record_tuples.txt" +#lc_seq.open_stream(source) + +#lc_seq.get_record() +#lc_seq.put_record() + + + diff --git a/bp_bin/match_seq b/bp_bin/match_seq new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/match_seq @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/max_vals b/bp_bin/max_vals new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/max_vals @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/mean_vals b/bp_bin/mean_vals new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/mean_vals @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/median_vals b/bp_bin/median_vals new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/median_vals @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/merge_records b/bp_bin/merge_records new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/merge_records @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/merge_vals b/bp_bin/merge_vals new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/merge_vals @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/min_vals b/bp_bin/min_vals new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/min_vals @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/oligo_freq b/bp_bin/oligo_freq new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/oligo_freq @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/patscan_seq b/bp_bin/patscan_seq new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/patscan_seq @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/plot_chrdist b/bp_bin/plot_chrdist new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/plot_chrdist @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/plot_histogram b/bp_bin/plot_histogram new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/plot_histogram @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/plot_karyogram b/bp_bin/plot_karyogram new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/plot_karyogram @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/plot_lendist b/bp_bin/plot_lendist new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/plot_lendist @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/plot_matches b/bp_bin/plot_matches new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/plot_matches @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/plot_phastcons_profiles b/bp_bin/plot_phastcons_profiles new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/plot_phastcons_profiles @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/plot_seqlogo b/bp_bin/plot_seqlogo new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/plot_seqlogo @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/print_usage b/bp_bin/print_usage new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/print_usage @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/random_records b/bp_bin/random_records new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/random_records @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/read_2bit b/bp_bin/read_2bit new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/read_2bit @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/read_bed b/bp_bin/read_bed new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/read_bed @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/read_blast_tab b/bp_bin/read_blast_tab new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/read_blast_tab @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/read_embl b/bp_bin/read_embl new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/read_embl @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/read_fasta b/bp_bin/read_fasta new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/read_fasta @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/read_fixedstep b/bp_bin/read_fixedstep new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/read_fixedstep @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/read_gff b/bp_bin/read_gff new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/read_gff @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/read_mysql b/bp_bin/read_mysql new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/read_mysql @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/read_phastcons b/bp_bin/read_phastcons new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/read_phastcons @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/read_psl b/bp_bin/read_psl new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/read_psl @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/read_soft b/bp_bin/read_soft new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/read_soft @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/read_solexa b/bp_bin/read_solexa new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/read_solexa @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/read_solid b/bp_bin/read_solid new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/read_solid @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/read_stockholm b/bp_bin/read_stockholm new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/read_stockholm @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/read_tab b/bp_bin/read_tab new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/read_tab @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/read_ucsc_config b/bp_bin/read_ucsc_config new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/read_ucsc_config @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/remove_adaptor b/bp_bin/remove_adaptor new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/remove_adaptor @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/remove_indels b/bp_bin/remove_indels new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/remove_indels @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/remove_keys b/bp_bin/remove_keys new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/remove_keys @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/remove_mysql_tables b/bp_bin/remove_mysql_tables new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/remove_mysql_tables @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/remove_ucsc_tracks b/bp_bin/remove_ucsc_tracks new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/remove_ucsc_tracks @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/rename_keys b/bp_bin/rename_keys new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/rename_keys @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/reverse_seq b/bp_bin/reverse_seq new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/reverse_seq @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/shuffle_seq b/bp_bin/shuffle_seq new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/shuffle_seq @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/soap_seq b/bp_bin/soap_seq new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/soap_seq @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/sort_records b/bp_bin/sort_records new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/sort_records @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/split_bed b/bp_bin/split_bed new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/split_bed @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/split_seq b/bp_bin/split_seq new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/split_seq @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/split_vals b/bp_bin/split_vals new file mode 100755 index 0000000..a510c58 --- /dev/null +++ b/bp_bin/split_vals @@ -0,0 +1,66 @@ +#!/usr/bin/env perl -w + +use strict; +use Data::Dumper; +use Time::HiRes qw( gettimeofday ); +use Getopt::Long qw( :config bundling ); +use Maasha::Biopieces; + + +# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + + +my ( $script, $t0, $t1, %options, $in, $out, $record, @vals, $i ); + +$t0 = Time::HiRes::gettimeofday(); + +$script = ( split "/", $0 )[ -1 ]; + +Maasha::Biopieces::log_biopiece(); + +GetOptions( + \%options, + 'key|k=s', + 'keys|K=s', + 'delimit|d=s', + 'stream_in|I=s', + 'stream_out|O=s', + 'verbose|v', + 'help|?' +); + +$options{ "keys" } = [ split ",", $options{ "keys" } ] if defined $options{ "keys" }; +$options{ "delimit" } = '_' if not defined $options{ "delimit" }; + +$in = Maasha::Biopieces::read_stream( $options{ "stream_in" } ); +$out = Maasha::Biopieces::write_stream( $options{ "stream_out" } ); + +while ( $record = Maasha::Biopieces::get_record( $in ) ) +{ + if ( exists $options{ 'key' } and exists $record->{ $options{ 'key' } } ) + { + @vals = split /$options{ 'delimit' }/, $record->{ $options{ 'key' } }; + + for ( $i = 0; $i < @vals; $i++ ) + { + if ( defined $options{ "keys" } and defined $options{ "keys" }->[ $i ] ) { + $record->{ $options{ "keys" }->[ $i ] } = $vals[ $i ]; + } else { + $record->{ $options{ 'key' } . "_$i" } = $vals[ $i ]; + } + } + } + + Maasha::Biopieces::put_record( $record, $out ); +} + +$t1 = Time::HiRes::gettimeofday(); + +print STDERR "Program: $script" . ( " " x ( 25 - length( $script ) ) ) . sprintf( "Run time: %.4f\n", ( $t1 - $t0 ) ) if $options{ 'verbose' }; + + +# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + + +__END__ + diff --git a/bp_bin/sum_vals b/bp_bin/sum_vals new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/sum_vals @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/tile_seq b/bp_bin/tile_seq new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/tile_seq @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/translate_seq b/bp_bin/translate_seq new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/translate_seq @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/transliterate_seq b/bp_bin/transliterate_seq new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/transliterate_seq @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/transliterate_vals b/bp_bin/transliterate_vals new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/transliterate_vals @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/uniq_vals b/bp_bin/uniq_vals new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/uniq_vals @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/upload_to_ucsc b/bp_bin/upload_to_ucsc new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/upload_to_ucsc @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/uppercase_seq b/bp_bin/uppercase_seq new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/uppercase_seq @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/vmatch_seq b/bp_bin/vmatch_seq new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/vmatch_seq @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/write_2bit b/bp_bin/write_2bit new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/write_2bit @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/write_align b/bp_bin/write_align new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/write_align @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/write_bed b/bp_bin/write_bed new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/write_bed @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/write_blast b/bp_bin/write_blast new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/write_blast @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/write_fasta b/bp_bin/write_fasta new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/write_fasta @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/write_fixedstep b/bp_bin/write_fixedstep new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/write_fixedstep @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/write_psl b/bp_bin/write_psl new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/write_psl @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/write_solid b/bp_bin/write_solid new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/write_solid @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/write_tab b/bp_bin/write_tab new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/write_tab @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; diff --git a/bp_bin/write_ucsc_config b/bp_bin/write_ucsc_config new file mode 100755 index 0000000..fdf5bd2 --- /dev/null +++ b/bp_bin/write_ucsc_config @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Maasha::BioRun; -- 2.39.5