I want to convert IGVs TDF file to a readable (.txt) format. Is there any tool/ library available for it?
1
0
Entering edit mode
8.1 years ago

I searched the IGV website but they have tools to convert TDF to wig, bigwig formats and these are all binary files. I want to read the TDF file and find the count of the bases at each location in my target region. If its not possible then is there any other way to achieve it?

next-gen IGV alignment BAM • 5.3k views
ADD COMMENT
2
Entering edit mode
8.1 years ago

igvtools has an undocumented option to convert tdf to bedgraph (see also https://groups.google.com/forum/#!topic/igv-help/RcZw5YB5SOQ):

igvtools tdftobedgraph in.tdf out.bedgraph

Besides, if you can convert tdf to bigWig then there is a bigWigToBedGraph program from UCSC.

ADD COMMENT
0
Entering edit mode

Thanks for the prompt reply !! I tried the above command but it looks like its giving me total number of bases(depth/coverage) at each locus. But I want count of each base covering each location e.g. chr7:1000 is covered by A:10, T:20, G:30,C:40 bases. Is there a way it can be done?

ADD REPLY
0
Entering edit mode

I don't think tdf stores the base count at each position (it wouldn't be so fast and small otherwise). For that you need the bam file or the output of mpileup. Have a look at this thread Calculate The Frequency Of Nucleotides At Each Position In An Mpileup File where, among other answers, I suggest using pysamstats

ADD REPLY

Login before adding your answer.

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