Conversion From Sam To Bed With Max Information
2
0
Entering edit mode
10.3 years ago
roll ▴ 350

I am trying to convert my sam file into bed file in such a way that i will keep some information from the sam file.

I am primarily interested in keeping the actual short sequences in the bed format so that i do not lose track.

I used sam to bam and then bedtools but i ended up getting something like this

chr1 123 456 0 255 +

I have so many short sequences and how will i know which of my sequence is which

sam bam conversion bed • 2.8k views
ADD COMMENT
2
Entering edit mode

Why? Why do you want to do that? There is very likely a better way to go about things. While you could probably shove either the read name or the sequence into the 4th column, that's probably just a waste of space.

ADD REPLY
0
Entering edit mode

I sorted this sompy by changinf the input file when i create the sam file. So it is sorted now. Thanks

ADD REPLY
0
Entering edit mode

Ummm, that doesn't parse, but OK.

ADD REPLY
0
Entering edit mode
10.3 years ago
roll ▴ 350

Change the input file format to include the names

ADD COMMENT
0
Entering edit mode
10.3 years ago

Version 2.4 of BEDOPS sam2bed preserves all read columns. Add the --keep-header option to preserve the header section.

To use, briefly:

$ sam2bed --keep-header < myReads.sam > mySortedReadsWithHeader.bed
ADD COMMENT

Login before adding your answer.

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