This would only address .1s. We should account for .\d+, right?
sed or awk command
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 .
• 2,136 views
•
link
3 answers
• 0 views
•
link
If the gene is always on the first column:
sed 's/\.[0-9]\{1,\}//' yourfile.txt
should work
• 0 views
•
link
it will remove other (.) from other column.
• 0 views
•
link
It's weird because I try it and it don't remove the others (.) because I didn't put the 'g' global flag after the last slash
• 0 views
•
link
It might if the first . it encounters is not the transcript version. The awk solution, or yours modified to include an anchor and a first-word ensuring regex would be safe.
• 0 views
•
link
Log in to answer this question.
