Transcript Based Annotation of Variants Using Annovar
1
0
Entering edit mode
3 months ago
hkarakurt ▴ 180

Hello everyone, I am using Annovar for variant annotation but as you may know Annovar outputs shows all possible transcripts in a single line such as:

SMPD1:NM_000543:exon3:c.1148A>G:p.N383S,SMPD1:NM_001318087:exon3:c.1148A>G:p.N383S,SMPD1:NM_001318088:exon3:c.227A>G:p.N76S,SMPD1:NM_001007593:exon3:c.1145A>G:p.N382S

Is it possible to annotate variants for each transcript such as:

SMPD1:NM_000543:exon3:c.1148A>G:p.N383S
SMPD1:NM_001318087:exon3:c.1148A>G:p.N383S
SMPD1:NM_001318088:exon3:c.227A>G:p.N76S
SMPD1:NM_001007593:exon3:c.1145A>G:p.N382S

All other columns such as frequency will remain same. We are not using canonical transcripts for each sample and having all possible transcripts in a single row causes some mistakes. An Annovar option or another tool would be a nice solution if there is.

Thank you in advance.

Annovar SNV Transcript Variant • 432 views
ADD COMMENT
1
Entering edit mode
3 months ago

Hi,

you can basically use sed command in bash.

sed 's/,/\n/g' your_annovar_file > your_new_annovar_file

This command transfers the changes in the existing file to the new file. So your previous file still exists.

PS. I just modified my answer based on GenoMax suggestion. Thank you for the warning !

the old version

sed '-i s/,/\n/g' your_annovar_file

This command makes changes to the existing file.

ADD COMMENT
1
Entering edit mode

Be careful about recommending the -i option which edits file in place. It may mess up the file and need someone to repeat the analysis again. In this case making a separate file would be the prudent choice.

ADD REPLY
0
Entering edit mode

Thank you for your answer. Actually, my mistake, I did not mention some details. Annovar output is a CSV file and it has multiple columns. I want to modify base on only one column in this case

ADD REPLY
1
Entering edit mode

You can extract the the column you want from csv file of your annovar result and have them in separate lines for each transcript as follows-

awk -F"," '{print $YOUR_COLUMN}' your_new_annovar_file.csv | sed 's/,/\n/g' >your_result_file
ADD REPLY

Login before adding your answer.

Traffic: 1672 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