Browse Source

WIP making script handle forward and reverse sequences

wip
William Davis 1 year ago
parent
commit
5d2cc9b382
  1. 9
      main.awk

9
main.awk

@ -1,6 +1,6 @@
#!/usr/bin/awk -f
BEGIN { IGNORECASE = 1 }
BEGIN { IGNORECASE = 1; flag = 0 }
NR == 1 && /gene/ {
for ( i=1;i<=NF;i++) # there has to be a better way
@ -8,6 +8,9 @@ NR == 1 && /gene/ {
}
NR != 1 {
for ( i=1;i<=NF;i++) if ( $i ~ /[atcg]{6,}/ ) seq=$i
print $namecolumn ",," seq ",,0.05,Desalt,Dry,,1"
for ( i=1;i<=NF;i++) if ( $i ~ /[atcg]{6,}/ ) seq[i]=$i
if (flag == 0)
print $namecolumn " F,," seq[6] ",,0.05,Desalt,Dry,,1"
if (flag == 1)
print $namecolumn " R,," seq[6] ",,0.05,Desalt,Dry,,1"
}

Loading…
Cancel
Save