This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Convert Un-Indexed Sam File To Wig File

Dear All,

I want to convert an SAM file without head to an wiggle file. Can anyone help me with this? I haven't that BAM files. Thank you!

sam wiggle

2 answers

You may want to see this link on how to convert a SAM file (without a header) to a bam file. Afterwards you can use the BEDtool genomeCoverageBed to obtain a bedgraph file (which is similar to a wiggle file and probably will suit your needs)

Here (under software) is small sam2wig perl-script. It is not very memory efficient and/or fast, but my intention to write it was the normalization of multiple mapping reads, which cannot be done using samtools.

Feel free to try it.

Log in to answer this question.