Mercurial > repos > erinija > dnp_correlation_between_profiles
comparison dnp-binary-strings.sh @ 0:b45de206654d draft default tip
"planemo upload commit 1a32efb8343938e8d49190003f251c78b5a58225-dirty"
author | erinija |
---|---|
date | Fri, 01 May 2020 12:08:23 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:b45de206654d |
---|---|
1 #!/bin/sh | |
2 if test "$#" -ne 3; then | |
3 | |
4 echo "" | |
5 echo " CALL " | |
6 echo " sh binary_strings.sh input.fasta dinucleotides output.file" | |
7 echo "" | |
8 echo " INPUT" | |
9 echo " input.fasta - input fasta file " | |
10 echo " dinucleotides - 'AA AC AG AT ...'" | |
11 echo "" | |
12 echo " OUTPUT" | |
13 echo " output.file - name of tabular format output file " | |
14 echo "" | |
15 echo " DESCRIPTION" | |
16 echo " Convert fasta sequences to a binary sequence of 01 " | |
17 echo " in which 1(ones) indicate a presence of a given" | |
18 echo " dinucleotide at that position and 0 everywhere else." | |
19 echo " Each fasta sequence in the input file has a " | |
20 echo " corresponding row with four tab separated columns" | |
21 echo " binary_string dinucleotide fasta_string times_occurred" | |
22 echo "" | |
23 echo " REQUIREMENT" | |
24 echo " dnp-binstrings installed" | |
25 echo " conda install -c bioconda dnp-binstrings" | |
26 echo "" | |
27 exit 1 | |
28 fi | |
29 | |
30 name=$1 | |
31 diset=$2 | |
32 out=$3 | |
33 | |
34 call=dnp-binstrings | |
35 | |
36 cp ${name} ${name}.fa | |
37 | |
38 for di in ${diset} | |
39 do | |
40 ${call} ${name}.fa -di ${di} >> ${out} | |
41 done; | |
42 rm ${name}.fa | |
43 exit 0 |