From b0f2727000b3611af4b232ce71f86a577696eb88 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Fri, 8 Mar 2013 13:10:10 +0000 Subject: [PATCH] dropped cat_seq Biopieces since join_seq exists git-svn-id: http://biopieces.googlecode.com/svn/trunk@2118 74ccb610-7750-0410-82ae-013aeee3265d --- bp_bin/cat_seq | 61 --------------------------------------- bp_test/in/cat_seq.in | 12 -------- bp_test/out/cat_seq.out.1 | 17 ----------- bp_test/out/cat_seq.out.2 | 5 ---- bp_test/out/cat_seq.out.3 | 17 ----------- bp_test/test/test_cat_seq | 15 ---------- 6 files changed, 127 deletions(-) delete mode 100755 bp_bin/cat_seq delete mode 100644 bp_test/in/cat_seq.in delete mode 100644 bp_test/out/cat_seq.out.1 delete mode 100644 bp_test/out/cat_seq.out.2 delete mode 100644 bp_test/out/cat_seq.out.3 delete mode 100755 bp_test/test/test_cat_seq diff --git a/bp_bin/cat_seq b/bp_bin/cat_seq deleted file mode 100755 index 67cf397..0000000 --- a/bp_bin/cat_seq +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env ruby - -# Copyright (C) 2007-2011 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 -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# http://www.gnu.org/copyleft/gpl.html - -# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - -# This program is part of the Biopieces framework (www.biopieces.org). - -# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DESCRIPTION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - -# Concatenates sequences in the stream and outputs a record with this sequence. - -# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - - -require 'maasha/biopieces' - -casts = [] -casts << {:long=>'seq_name', :short=>'s', :type=>'string', :mandatory=>true, :default=>"cat_seq", :allowed=>nil, :disallowed=>nil} -casts << {:long=>'no_stream', :short=>'x', :type=>'flag', :mandatory=>false, :default=>nil, :allowed=>nil, :disallowed=>nil} - -options = Biopieces.options_parse(ARGV, casts) - -seq = "" - -Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output| - input.each_record do |record| - seq << record[:SEQ] if record[:SEQ] - output.puts record unless options[:no_stream] - end - - new_record = {} - new_record[:SEQ_NAME] = options[:seq_name] - new_record[:SEQ] = seq - new_record[:SEQ_LEN] = seq.length - new_record[:REC_TYPE] = "CAT" - - output.puts new_record -end - - -# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - - -__END__ diff --git a/bp_test/in/cat_seq.in b/bp_test/in/cat_seq.in deleted file mode 100644 index 1f6246f..0000000 --- a/bp_test/in/cat_seq.in +++ /dev/null @@ -1,12 +0,0 @@ -SEQ_NAME: test1 -SEQ: TACGATGCTAGCNATCYGACNACTGACTGACN -SEQ_LEN: 32 ---- -SEQ_NAME: test2 -SEQ: TACGATGCTAGCNATCYGACNACTG -SEQ_LEN: 25 ---- -SEQ_NAME: test3 -SEQ: TACGATGCTAGCNATCY -SEQ_LEN: 17 ---- diff --git a/bp_test/out/cat_seq.out.1 b/bp_test/out/cat_seq.out.1 deleted file mode 100644 index b616ca7..0000000 --- a/bp_test/out/cat_seq.out.1 +++ /dev/null @@ -1,17 +0,0 @@ -SEQ_NAME: test1 -SEQ: TACGATGCTAGCNATCYGACNACTGACTGACN -SEQ_LEN: 32 ---- -SEQ_NAME: test2 -SEQ: TACGATGCTAGCNATCYGACNACTG -SEQ_LEN: 25 ---- -SEQ_NAME: test3 -SEQ: TACGATGCTAGCNATCY -SEQ_LEN: 17 ---- -SEQ_NAME: cat_seq -SEQ: TACGATGCTAGCNATCYGACNACTGACTGACNTACGATGCTAGCNATCYGACNACTGTACGATGCTAGCNATCY -SEQ_LEN: 74 -REC_TYPE: CAT ---- diff --git a/bp_test/out/cat_seq.out.2 b/bp_test/out/cat_seq.out.2 deleted file mode 100644 index 36b89c6..0000000 --- a/bp_test/out/cat_seq.out.2 +++ /dev/null @@ -1,5 +0,0 @@ -SEQ_NAME: cat_seq -SEQ: TACGATGCTAGCNATCYGACNACTGACTGACNTACGATGCTAGCNATCYGACNACTGTACGATGCTAGCNATCY -SEQ_LEN: 74 -REC_TYPE: CAT ---- diff --git a/bp_test/out/cat_seq.out.3 b/bp_test/out/cat_seq.out.3 deleted file mode 100644 index 56f5610..0000000 --- a/bp_test/out/cat_seq.out.3 +++ /dev/null @@ -1,17 +0,0 @@ -SEQ_NAME: test1 -SEQ: TACGATGCTAGCNATCYGACNACTGACTGACN -SEQ_LEN: 32 ---- -SEQ_NAME: test2 -SEQ: TACGATGCTAGCNATCYGACNACTG -SEQ_LEN: 25 ---- -SEQ_NAME: test3 -SEQ: TACGATGCTAGCNATCY -SEQ_LEN: 17 ---- -SEQ_NAME: Foobar -SEQ: TACGATGCTAGCNATCYGACNACTGACTGACNTACGATGCTAGCNATCYGACNACTGTACGATGCTAGCNATCY -SEQ_LEN: 74 -REC_TYPE: CAT ---- diff --git a/bp_test/test/test_cat_seq b/bp_test/test/test_cat_seq deleted file mode 100755 index a508434..0000000 --- a/bp_test/test/test_cat_seq +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -source "$BP_DIR/bp_test/lib/test.sh" - -run "$bp -I $in -O $tmp" -assert_no_diff $tmp $out.1 -clean - -run "$bp -I $in -x -O $tmp" -assert_no_diff $tmp $out.2 -clean - -run "$bp -I $in -s Foobar -O $tmp" -assert_no_diff $tmp $out.3 -clean -- 2.39.2