Hi all
I am using following code to get results for brand name drug target name and generic name from my attached fiile
awk 'k>0 {if (a[k] && k==2) {print a[1]":"a[2]":"a[3]; a[1]=a[2]=a[3]="";} a[k]=a[k]?a[k]","$0:$0; k=0;} /^# Drug_Target_.*_Gene_Name/ {k=3;} /^# Generic/ {k=1;} /^# Brand_Name/ {k=2;} END {if (a[1]) print a[1]":"a[2]":"a[3];}' drugbank.txt >drugbank3.txt
But when I change the code to additional field Drug Type. It is not giving me proper results can anybody guide to make changes in this code to get drug type as well.
---------- Post updated at 10:30 PM ---------- Previous update was at 10:04 PM ----------
Hi
Its working now using the same code completely dont know why? can any body try on his or her system?