It works! Thanks a lot.
• 1 views
•
link
Hello everyone.
I have a sam file and only want to keep the read name and the FLAG field. How can I make it with awk?(And I do not want to keep the header)
Thanks for your answer!
How I'd do it:
samtools view mydata.bam | cut -f 1,2 > truncated.sam
It works! Thanks a lot.
If an answer was helpful you should upvote it, if the answer resolved your question you should mark it as accepted.

sorry to bother again but I wonder if there is a way to speed up this process since my sam file is 140G and it is running really slowly...
Log in to answer this question.