annotate concatenate_ordered.bash @ 4:72571a30f17b draft

Add test for unique peak names.
author kyost
date Wed, 02 May 2018 13:20:21 -0400
parents fd3ea97a96bc
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
fd3ea97a96bc planemo upload commit 103cb51ec368438642504c3f98b76c363db478bb
kyost
parents:
diff changeset
1 #!/bin/bash
fd3ea97a96bc planemo upload commit 103cb51ec368438642504c3f98b76c363db478bb
kyost
parents:
diff changeset
2
fd3ea97a96bc planemo upload commit 103cb51ec368438642504c3f98b76c363db478bb
kyost
parents:
diff changeset
3 input1=$1
fd3ea97a96bc planemo upload commit 103cb51ec368438642504c3f98b76c363db478bb
kyost
parents:
diff changeset
4 output1=$2
fd3ea97a96bc planemo upload commit 103cb51ec368438642504c3f98b76c363db478bb
kyost
parents:
diff changeset
5
fd3ea97a96bc planemo upload commit 103cb51ec368438642504c3f98b76c363db478bb
kyost
parents:
diff changeset
6 echo $input1 |tr , '\n' > input_series
fd3ea97a96bc planemo upload commit 103cb51ec368438642504c3f98b76c363db478bb
kyost
parents:
diff changeset
7
fd3ea97a96bc planemo upload commit 103cb51ec368438642504c3f98b76c363db478bb
kyost
parents:
diff changeset
8 cat input_series | while read file
fd3ea97a96bc planemo upload commit 103cb51ec368438642504c3f98b76c363db478bb
kyost
parents:
diff changeset
9 do
fd3ea97a96bc planemo upload commit 103cb51ec368438642504c3f98b76c363db478bb
kyost
parents:
diff changeset
10 cat $file >> count_list
fd3ea97a96bc planemo upload commit 103cb51ec368438642504c3f98b76c363db478bb
kyost
parents:
diff changeset
11 done
fd3ea97a96bc planemo upload commit 103cb51ec368438642504c3f98b76c363db478bb
kyost
parents:
diff changeset
12
fd3ea97a96bc planemo upload commit 103cb51ec368438642504c3f98b76c363db478bb
kyost
parents:
diff changeset
13 sort -k1 count_list > sorted_list
fd3ea97a96bc planemo upload commit 103cb51ec368438642504c3f98b76c363db478bb
kyost
parents:
diff changeset
14 cut -f 2 sorted_list > $output1
fd3ea97a96bc planemo upload commit 103cb51ec368438642504c3f98b76c363db478bb
kyost
parents:
diff changeset
15
fd3ea97a96bc planemo upload commit 103cb51ec368438642504c3f98b76c363db478bb
kyost
parents:
diff changeset
16 rm input_series
fd3ea97a96bc planemo upload commit 103cb51ec368438642504c3f98b76c363db478bb
kyost
parents:
diff changeset
17 rm count_list
fd3ea97a96bc planemo upload commit 103cb51ec368438642504c3f98b76c363db478bb
kyost
parents:
diff changeset
18 rm sorted_list