sed or awk command
3
ENST00000448914.1 13 4.28456 0 0
ENST00000415118.1 8 3.52171 0 0
how to remove the (.*) from column 1 and it looks like
ENST00000448914 13 4.28456 0 0
ENST00000415118 8 3.52171 0 0
please tell me the sed command or awk command to remove it only .
RNA-Seq
• 1.9k views
•
link
updated 6.3 years ago by
AK
★
2.2k
•
written 6.3 years ago by
harry
▴
40
Hi harry ,
By awk:
awk 'BEGIN{OFS="\t"} {gsub("\\.[0-9]+$", "", $1); print}'
(updated) For sed you can try:
sed -r 's/\.[0-9]+\t/\t/'
•
link
6.3 years ago by
AK
★
2.2k
Hi harry
Please use the formatting bar (especially the code option) to present your post better. I've done it for you this time.
You could try sed like this
sed 's/\.1//'
If the gene is always on the first column:
sed 's/\.[0-9]\{1,\}//' yourfile.txt
should work
Login before adding your answer.
Traffic: 3403 users visited in the last hour
This would only address
.1s. We should account for.\d+, right?