Mercurial > repos > kyost > atac_primer_tool
annotate concatenate_ordered.bash @ 0:fd3ea97a96bc draft
planemo upload commit 103cb51ec368438642504c3f98b76c363db478bb
author | kyost |
---|---|
date | Sat, 28 Apr 2018 15:07:26 -0400 |
parents | |
children |
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 |