Remove from enst name a unique eleven digit number from bam file
1
0
Entering edit mode
21 months ago
mailard ▴ 30

Hello!

I need to remove from bam file number in the end of name transcripts. ENST00000451407.4 to ENST00000451407

How can i do it?

Thank you!

ensembl • 602 views
ADD COMMENT
0
Entering edit mode
21 months ago

Untested but should work.

samtools view -h file.bam | sed -E 's/(ENST[0-9]+)\.[0-9]+/\1/g' | samtools view -bo cleaned_file.bam
ADD COMMENT
0
Entering edit mode

Thank you!

ADD REPLY

Login before adding your answer.

Traffic: 2158 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6