Mercurial > repos > rnateam > rnacode
comparison processMAF.sh @ 3:d49b9759e294 draft default tip
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/rnacode commit 3abc213e109bb564de7dee75d71d90eb1bf78c7e
| author | rnateam |
|---|---|
| date | Thu, 15 Nov 2018 01:24:06 -0500 |
| parents | 434332033e82 |
| children |
comparison
equal
deleted
inserted
replaced
| 2:434332033e82 | 3:d49b9759e294 |
|---|---|
| 131 | 131 |
| 132 ref="" | 132 ref="" |
| 133 last=0 | 133 last=0 |
| 134 | 134 |
| 135 if [[ ! -z "$tabular" ]]; then | 135 if [[ ! -z "$tabular" ]]; then |
| 136 echo -e "HSS #\tFrame\tLength\tFrom\tTo\tName\tStart\tEnd\tScore\tP" >> ${outfile:-/dev/stdout} | 136 echo -e "HSS #\tStrand\tFrame\tLength\tFrom\tTo\tName\tStart\tEnd\tScore\tP" >> ${outfile:-/dev/stdout} |
| 137 fi | 137 fi |
| 138 | 138 |
| 139 tmpif=$(mktemp -p '.') | 139 tmpif=$(mktemp -p '.') |
| 140 tmpof=$(mktemp -p '.') | 140 tmpof=$(mktemp -p '.') |
| 141 tmpd=$(mktemp -d -p '.') | 141 tmpd=$(mktemp -d -p '.') |
| 149 while read line | 149 while read line |
| 150 do | 150 do |
| 151 if [[ "$line" =~ ^# ]]; then | 151 if [[ "$line" =~ ^# ]]; then |
| 152 echo -n > ${tmpif} | 152 echo -n > ${tmpif} |
| 153 elif [[ "$line" =~ ^$ ]]; then | 153 elif [[ "$line" =~ ^$ ]]; then |
| 154 run_rnacode ${args[@]} ${tmpif} | 154 run_rnacode ${args[@]} ${tmpif} >> ${outfile:-/dev/stdout} |
| 155 # >> ${outfile:-/dev/stdout} | |
| 156 echo -n > ${tmpif} | 155 echo -n > ${tmpif} |
| 157 else | 156 else |
| 158 if [[ -z $ref && "$line" =~ ^s ]]; then | 157 if [[ -z $ref && "$line" =~ ^s ]]; then |
| 159 if [[ -z "$gtf" ]]; then | 158 if [[ -z "$gtf" ]]; then |
| 160 ref=`echo $line | cut -d" " -f 2` | 159 ref=`echo $line | cut -d" " -f 2` |
| 165 echo $line >> ${tmpif} | 164 echo $line >> ${tmpif} |
| 166 fi | 165 fi |
| 167 done < ${file:-/dev/stdin} | 166 done < ${file:-/dev/stdin} |
| 168 # if there is something left -> process it | 167 # if there is something left -> process it |
| 169 if [[ "`cat ${tmpif} | wc -l`" -gt "0" ]]; then | 168 if [[ "`cat ${tmpif} | wc -l`" -gt "0" ]]; then |
| 170 run_rnacode ${args[@]} ${tmpif} | 169 run_rnacode ${args[@]} ${tmpif} >> ${outfile:-/dev/stdout} |
| 171 # >> ${outfile:-/dev/stdout} | |
| 172 fi | 170 fi |
| 173 | 171 |
| 174 if [[ ! -z "$eps" ]]; then | 172 if [[ ! -z "$eps" ]]; then |
| 175 mv ${tmpd}/*eps ${epsdir:-eps}/ | 173 mv ${tmpd}/*eps ${epsdir:-eps}/ |
| 176 fi | 174 fi |
