Remove from enst name a unique eleven digit number from bam file
1
0
Entering edit mode
8 weeks ago
mailard • 0

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 • 290 views
ADD COMMENT
0
Entering edit mode
8 weeks 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: 891 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