Converting .txt file back to SAM/BAM file format

1,977 views
Skip to first unread message

chri...@arimagenomics.com

unread,
Oct 20, 2016, 4:36:26 PM10/20/16
to 3D Genomics

Hi,
I am trying to convert the .txt file (which is used to make a .hic file) back into SAM or BAM format.
do you know if there is a way to do it? If not, do you have a suggestion about how to achieve this?
Many thanks in advance.
Christian

chri...@arimagenomics.com

unread,
Oct 20, 2016, 8:15:08 PM10/20/16
to 3D Genomics
Alternatively, is there a way to convert .hic to BAM or SAM?
Message has been deleted

Neva Durand

unread,
Oct 21, 2016, 9:40:35 AM10/21/16
to chri...@arimagenomics.com, 3D Genomics
Hello Christian,

It's a little tricky for a number of reasons.

1 - You have to set the flags correctly. The reads are aligned separately and then paired, and the flags should refer to their mate and what strand it aligns to.
2 - The position that we record is the 5' end position where the read started. BAM/SAM records where the alignment started (and reverses for reverse strand). We do this for duplicate removal by parsing the CIGAR string. You can find out what we do in the file chimeric_blacklist.awk
3 - We don't store the base pair quality information in merged_nodups; the BAM standard allows for no quality information but it's something to keep in mind

From a .hic file is even worse, as we bin the reads and so lose the exact position/alignment/strand information as well as the sequence information.

May I ask what you're trying to accomplish, i.e. why you would want to convert merged_nodups or another valid pairs file to BAM?

Best
Neva

--
You received this message because you are subscribed to the Google Groups "3D Genomics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 3d-genomics+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/3d-genomics/99b595a9-e25b-402f-b072-4f72cf6a453b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Neva Cherniavsky Durand, Ph.D.
Staff Scientist, Aiden Lab
Reply all
Reply to author
Forward
0 new messages