So, you want only the first line, and then discard the remaining lines? Or, do you want each of your 4000 lines in 4000 different files?
Edit: Never mind. If you got a solution, that's good enough!
Hey everyone
I have about 4000 blast tab limited output, from thees output I want to extract best alignment (first line only) and want to store another different 4000 files. How is it possible using awk or some other programme
Please help me
you could have simply used head -1
i got a awk comment like this
awk 'NR==1' inputfile > outputfile
this ll work for my problem
So, you want only the first line, and then discard the remaining lines? Or, do you want each of your 4000 lines in 4000 different files?
Edit: Never mind. If you got a solution, that's good enough!
On a related note, please use professional language. I'd phrase your response so:
Yes, I would like each line in a different file. I used the following awk command to solve my problem: awk 'NR==1' inputfile > outputfile
This works for my case. Thank you for your support.
SMS/IM jargon, typos, improper casing, etc make you look like you're not serious about what you're doing. As another bioinformatician from Chennai, I know the emphasis our folks have on being good at professional communication. Here's to hoping you'll work on this aspect!
Thank you for your suggestions. I will take everything you have said into consideration.
Log in to answer this question.
Hi,
Can you post the first 10 lines or so from your tab limited output?
output am expecting like this
Caution: there is no 'best' alignment in your example, all alignments you show have equal score, identity, e-value etc. The first one is by no means the best. I don't know what you want to do with the output, but using only the first line is often not a good strategy.
Showing some sample data in your hand and how you are expecting the output file would help to figure it out and more importantly 'posting what you have tried so far is a good practice'.
input file
then expected out put
Do you need each of the line in different file? (Please edit your question instead of using comment box)