This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Python script that converts sorted and indexed BAM (BAI) file into TSV(Tab Separated) file

Dear all...

We have a file with "BAI" format and need to convert it to "TSV" format using python script.

We need a python script that converts .BAI file into "TSV".

I am a beginner at python scripting.

python pysam htseq

Please try something yourself before asking the comunity to provide you with ready-made scripts. Please don't use all caps. Did you check samtools?

Hello malikbashirkhan2!

Questions similar to yours can already be found at:

We have closed your question to allow us to keep similar content in the same thread.

If you disagree with this please tell us why in a reply below. We'll be happy to talk about it.

Cheers!

SAM is a tab separated format, unless you are more specific, there is nothing to do for us. A bai file is just the index of a bam file. Which useful information do you want to extract from a bam index?

i want to convert it into tsv (tab seperated value) which i can easily convert it into spread sheet format.

SAM is tab separated. SAM data on spreadsheets is a REALLY BAD idea.

Try to open a SAM file in Excel, then you will see why do not want to convert into spread sheet format.

Emphasizing what Michael said, please don't use all caps, because it is rude.

0 answers

No answers yet.

Log in to answer this question.