Parsing tabular data with awk issues

I am reposting this since people wanted a little more info and my question was closed, here is an example of what the output looks like, just typical tabular .txt stuff:

asdfsdf sdfsadf sdfsdf  92  83
sdfsdf  ewrwef  dsruh   32  42
sjgho   uhiu    uhgkuh  91  21

In the above, I am trying to just remove all entries where after the third tab it is below 80, and after the 4th it is below 70. So the 4th and 5th columns if viewed in excel must be above 80 and 70 respectively. In this case, only the first row should remain.

(old question)

I am trying to parse a tabular text file generated by Blastp using awk. Previously I have used this somewhat ugly code, because it worked, to go through to the right columns and cull out values below what I wanted.

#!/bin/bash 
#$ -cwd
#$ -pe mpi 16

awk '$4 > 80.0' blastoutput.txt > StepOne.txt
awk '$5 > 70.0' StepOne.txt > Culled.txt

Using it on a new blast result however, the file sizes remain at 300k kb with only a slight decrease on step one, and none for two. My best guess is that it is only recognizing a single line from the whole blast output file, and therefore not removing more. I would think maybe it had something to do with Unix/Windows line ends not being recognized as I saw on other answers, but the thing is I haven’t changed the way I’ve generated the blast results and it was working before, so I don’t know why it would all of a sudden change the way tabular results are created.

I’ve also tried using some parsing options I saw in other answers like the following:

perl -lane 'print $_ if ($F[4] >80.0)' blastp_output_8_26.txt > StepOne.txt

but the results seem to be the same.

Does anyone know what I could do to the blastp output file to make it work with my code? I am convinced something is amiss there, but all my attempts to fix it so far have been for naught.

Thanks.

Go to Source
Author: Asclepius123

join f1 to f2 so that each join-able f1 record only joins once to the first available match-able in f2

Hopefully someone can help me with this. Given 2 files

f1

card1,value1,f1c11,f1c12

card2,value2,f1c21,f1c22

card3,value3,f1c31,f1c32

card4,value4,f1c41,f1c42

card4,value4,f1c411,f1c412

card4,value,f1c421,f1c422

card5,vaule5,f1c51,f1c52

f2

card,value2,f2c1,f2c2

card2,value,f2c21,f2c22

card2,value2,f2c211,f2c212

card2,value2,f2c221,f2c222

card3,value3,f2c31,f2c32

card4,value4,f2c41,f2c42

card4,value4,f2c411,f2c412

card5,vaule5,f2c51,f2c52

card6,vaule6,f2c61,f2c62

card7,vaule5,f2c71,f2c72

desired:
join f1 to f2 so that each join-able f1 record only joins once to the first available match-able in f2

card2,value2,f1c21,f1c22,f2c211,f2c212

card3,value3,f1c31,f1c32,f2c31,f2c32

card4,value4,f1c41,f1c42,f2c41,f2c42

card4,value4,f1c411,f1c412,f2c41,f2c42

card5,vaule5,f1c51,f1c52,f2c51,f2c52

Go to Source
Author: Henry P

using awk how can i format this data so i can have 14-0273 under ID , 06/28/2014 under date and for all other title

ID,Date,DateType,Age,Sex,Race,ResidenceCity,ResidenceCounty,ResidenceState,DeathCity,DeathCounty,Location,LocationifOther,DescriptionofInjury,InjuryPlace,InjuryCity,InjuryCounty,InjuryState,COD,OtherSignifican,Heroin,Cocaine,Fentanyl,FentanylAnalogue,Oxycodone,Oxymorphone,Ethanol,Hydrocodone,Benzodiazepine,Methadone,Amphet,Tramad,Morphine_NotHeroin,Hydromorphone,Other,OpiateNOS,AnyOpioid,MannerofDeath,DeathCityGeo,ResidenceCityGeo,InjuryCityGeo
14-0273,06/28/2014 12:00:00 AM,DateReported,,,,,,,,,,,substance,,,,,”Acute fent, hydrocod, benzodiazepine”,,,,Y,,,,,Y,Y,,,,,,,,,Accident,”CT
(41.575155, -72.738288)”,”CT
(41.575155, -72.738288)”,”CT
(41.575155, -72.738288)”
13-0102,03/21/2013 12:00:00 AM,DateofDeath,48,Male,Black,NORWALK,,,NORWALK,FAIRFIELD,Hospital,,,,,,,Cocaine Intoxication,,,Y,,,,,,,,,,,,,,,,Accident,”Norwalk, CT
(41.11805, -73.412906)”,”NORWALK, CT
(41.11805, -73.412906)”,”CT
(41.575155, -72.738288)”
16-0165,03/13/2016 12:00:00 AM,DateofDeath,30,Female,White,SANDY HOOK,FAIRFIELD,CT,DANBURY,,Hospital,,Substance Abuse,Unknown,UNKNOWN,,,Acute Heroin and Cocaine Intoxication,,Y,Y,,,,,,,,,,,,,,,Y,Accident,”Danbury, CT
(41.393666, -73.451539)”,”SANDY HOOK, CT
(41.419998, -73.282501)”,
16-0208,03/31/2016 12:00:00 AM,DateofDeath,23,Male,White,RYE,WESTCHESTER,NY,GREENWICH,,Hospital,,substance abuse,Residence,RYE,,,Acute Fentanyl and Morphine Intoxication,,Y,,Y,,,,,,,,,,,,,,Y,Accident,”Greenwich, CT
(41.026526, -73.628549)”,,
13-0052,02/13/2013 12:00:00 AM,DateofDeath,22,Male,”Asian, Other”,FLUSHING,QUEENS,,GREENWICH,FAIRFIELD,Hospital,,Transdermal Absorption,Other,,,,Fentanyl Intoxication,,,,Y,,,,,,,,,,,,,,,Accident,”Greenwich, CT
(41.026526, -73.628549)”,,”CT

Go to Source
Author: nish patel