Problem in visualizing bam files to IGV
0
0
Entering edit mode
4.9 years ago
dzisis1986 ▴ 70

Hi I have my sorted bam files like that :

bedtools genomecov -ibam Ath_FLC4C_A_2_sorted.bam -bg | head

1:13169-20070() 0   28  13
1:20064-28278() 1733    1761    441
1:28272-29965() 1665    1693    332
1:29959-36604() 3964    3992    367
1:52850-54453() 1575    1603    1523
1:83123-87907() 4756    4784    4
1:97909-99423() 1486    1514    1
1:101231-108778()   7519    7547    1
1:109424-109532()   80  108 407
1:109526-115903()   0   28  13

and

samtools view -h Ath_FLC4C_A_2_sorted.bam | head -30
@HD VN:1.0  SO:coordinate
@SQ SN:1:1-7512()   LN:7511
@SQ SN:1:7506-10949()   LN:3443
@SQ SN:1:10943-13175()  LN:2232
@SQ SN:1:13169-20070()  LN:6901
@SQ SN:1:20064-28278()  LN:8214
@SQ SN:1:28272-29965()  LN:1693
@SQ SN:1:29959-36604()  LN:6645
@SQ SN:1:36598-37518()  LN:920
@SQ SN:1:37512-40365()  LN:2853
@SQ SN:1:40359-48801()  LN:8442

and i cant view it to IGV broswer. There is always an error about Sequence name '1:13169-20070() ' doesn't match regex . The genome i load is IGV is also in the same format like :

>1:13169-20070()
CCTAAACCCTAAACCCTAAACCCTAAACCTCTGAATCCTTAATCCCTAAATCCCTAAATCTTTAAATCCT
ACATCCATGAATCCCTAAATACCTAATTCCCTAAACCCGAAACCGGTTTCTCTGGTTGAA

etc coming from Arabidopsis thaliana TAIR10. I believe that the problem is the format of Chromosome Notation in my bam file. Do you know how to change the format in a bam file remove the :, -, () and make it like :

Chr1 13169 20070  0      28      13
Chr1 20064 28278 1733    1761    441

Do you think that if i change this on the sam or bam file and recreate bam.bai files i will be able to visualize the results in IGV ?

bam igv view • 2.0k views
ADD COMMENT
0
Entering edit mode

I think TAIR chromosome names are just 1,2,3,4,5. No chr.

As for () you could try eliminating those parenthesis with sed 's/()//g' yourfile > new_file for all files.

ADD REPLY
0
Entering edit mode

Yes i know so my bam files are in the correct format for my reference ,fa as i described above ! This sed doesnt work for my bam file it destroys the format and i cant view it with samtools !

ADD REPLY
0
Entering edit mode

Issue seems to be that IGV can't handle those (). You could try your luck with tablet, IGB or one of the other browsers to see if you have any luck with existing files.

ADD REPLY

Login before adding your answer.

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