I have a file with hundreds of rows:
Chr01:19967945-19972643 HanXRQChr01g0004001 1 4698 4698 0.0 8676 100.000 locus_tag=HanXRQChr01g0004001 gn=HanXRQChr01g0004001 begin=19967815 end=19972682 len=4868 chr=HanXRQChr01 strand=-1 sp=Helianthus annuus def=Probable protein kinase superfamily protein
Chr01:23001231-23011701 HanXRQChr01g0004391 1 10470 10470 0.0 19335 100.000 locus_tag=HanXRQChr01g0004391 gn=HanXRQChr01g0004391 begin=22999643 end=23012645 len=13003 chr=HanXRQChr01 strand=1 sp=Helianthus annuus def=Putative squalene cyclase; Squalene cyclase, C-terminal; Squalene cyclase, N-terminal
Chr01:23001231-23011701 HanXRQChr01g0004391 5938 6078 141 7.25e-55 220 95.035 locus_tag=HanXRQChr01g0004391 gn=HanXRQChr01g0004391 begin=22999643 end=23012645 len=13003 chr=HanXRQChr01 strand=1 sp=Helianthus annuus def=Putative squalene cyclase; Squalene cyclase, C-terminal; Squalene cyclase, N-terminal
Chr01:38759426-38779934 HanXRQChr01g0005671 1 20472 20472 0.0 37805 100.000 locus_tag=HanXRQChr01g0005671 gn=SPI begin=38759245 end=38779898 len=20654 chr=HanXRQChr01 strand=1 sp=Helianthus annuus def=Probable beige/BEACH domain ;WD domain, G-beta repeat protein
Chr01:38759426-38779934 HanXRQChr15g0474141 7163 7204 42 1.96e-08 67.6 95.238 locus_tag=HanXRQChr15g0474141 gn=IQD29 begin=37205639 end=37211555 len=5917 chr=HanXRQChr15 strand=-1 sp=Helianthus annuus def=Probable IQ-domain 29
Chr01:38759426-38779934 HanXRQChr15g0474141 7003 7043 41 7.05e-08 65.8 95.122 locus_tag=HanXRQChr15g0474141 gn=IQD29 begin=37205639 end=37211555 len=5917 chr=HanXRQChr15 strand=-1 sp=Helianthus annuus def=Probable IQ-domain 29
Some of these rows are unique based on the first column, like the first row Chr01:19967945-1997264
, and for some others I have multiple rows based on the first column like Chr01:23001231-23011701
.
For each value in the first column, I want to keep only the first row because the first row contains the best values for some other parameters in columns 6 and 7 and 8.
My desired output would be
Chr01:19967945-19972643 HanXRQChr01g0004001 1 4698 4698 0.0 8676 100.000 locus_tag=HanXRQChr01g0004001 gn=HanXRQChr01g0004001 begin=19967815 end=19972682 len=4868 chr=HanXRQChr01 strand=-1 sp=Helianthus annuus def=Probable protein kinase superfamily protein
Chr01:23001231-23011701 HanXRQChr01g0004391 1 10470 10470 0.0 19335 100.000 locus_tag=HanXRQChr01g0004391 gn=HanXRQChr01g0004391 begin=22999643 end=23012645 len=13003 chr=HanXRQChr01 strand=1 sp=Helianthus annuus def=Putative squalene cyclase; Squalene cyclase, C-terminal; Squalene cyclase, N-terminal
Chr01:38759426-38779934 HanXRQChr01g0005671 1 20472 20472 0.0 37805 100.000 locus_tag=HanXRQChr01g0005671 gn=SPI begin=38759245 end=38779898 len=20654 chr=HanXRQChr01 strand=1 sp=Helianthus annuus def=Probable beige/BEACH domain ;WD domain, G-beta repeat protein